mescc: Tinycc support: ignore [ULL], UL, LL, L.
* module/language/c99/compiler.mes (cstring->number): Drop suffix.
This commit is contained in:
parent
eff1e97cdf
commit
ef4868eb13
|
@ -1318,10 +1318,15 @@
|
|||
(_ ((jump i386:jump-z (wrap-as (i386:accu-zero?))) o)))))
|
||||
|
||||
(define (cstring->number s)
|
||||
(cond ((string-prefix? "0x" s) (string->number (string-drop s 2) 16))
|
||||
((string-prefix? "0b" s) (string->number (string-drop s 2) 2))
|
||||
((string-prefix? "0" s) (string->number s 8))
|
||||
(else (string->number s))))
|
||||
(let ((s (cond ((string-suffix? "ULL" s) (string-drop-right s 3))
|
||||
((string-suffix? "UL" s) (string-drop-right s 2))
|
||||
((string-suffix? "LL" s) (string-drop-right s 2))
|
||||
((string-suffix? "L" s) (string-drop-right s 1))
|
||||
(else s))))
|
||||
(cond ((string-prefix? "0x" s) (string->number (string-drop s 2) 16))
|
||||
((string-prefix? "0b" s) (string->number (string-drop s 2) 2))
|
||||
((string-prefix? "0" s) (string->number s 8))
|
||||
(else (string->number s)))))
|
||||
|
||||
(define (struct-field info)
|
||||
(lambda (o)
|
||||
|
|
Loading…
Reference in a new issue