diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-07-10 23:36:56 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-07-10 23:36:56 +0200 |
commit | f7b18cc72dd5b2ca90b6670dbe81c3ef3204d6d9 (patch) | |
tree | dcc40399f08285a9a308079098e735fb5bf192bd /module/c/compiler.scm | |
parent | Add of-type? to (hnh util type). (diff) | |
download | calp-f7b18cc72dd5b2ca90b6670dbe81c3ef3204d6d9.tar.gz calp-f7b18cc72dd5b2ca90b6670dbe81c3ef3204d6d9.tar.xz |
Resolve recursive macros.
Diffstat (limited to '')
-rw-r--r-- | module/c/compiler.scm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/module/c/compiler.scm b/module/c/compiler.scm index 801c3752..09d49578 100644 --- a/module/c/compiler.scm +++ b/module/c/compiler.scm @@ -25,23 +25,21 @@ ;; 6.10.8 (object-like-macro identifier: "__STDC__" - body: '(preprocessing-token (pp-number "1"))) + body: (lex "1")) (object-like-macro identifier: "__STDC_HOSTED__" - body: '(preprocessing-token (pp-number "1"))) + body: (lex "1")) (object-like-macro identifier: "__STDC_VERSION__" - body: '(preprocessing-token (pp-number "201112L"))) + body: (lex "201112L")) (object-like-macro identifier: "__DATE__" ;; TODO format should always be in ;; english, and not tranlated - body: `(preprocessing-token (string-literal ,(strftime "%b %_d %Y" now)))) + body: (lex (strftime "\"%b %_d %Y\"" now))) (object-like-macro identifier: "__TIME__" - body: `(preprocessing-token - (string-literal - ,(strftime "%H:%M:%S" now)))))) + body: (lex (strftime "\"%H:%M:%S\"" now))))) (define environment (-> (make-environment) |