diff options
Diffstat (limited to 'module/c/cpp-environment/object-like-macro.scm')
-rw-r--r-- | module/c/cpp-environment/object-like-macro.scm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/module/c/cpp-environment/object-like-macro.scm b/module/c/cpp-environment/object-like-macro.scm index 5d4c8810..90a3ad23 100644 --- a/module/c/cpp-environment/object-like-macro.scm +++ b/module/c/cpp-environment/object-like-macro.scm @@ -1,13 +1,18 @@ (define-module (c cpp-environment object-like-macro) :use-module (hnh util object) + :use-module (hnh util type) + :use-module ((c lex2) :select (lexeme?)) + :use-module ((c unlex) :select (unlex)) :export (object-like-macro object-like-macro? identifier body)) -(define-type (object-like-macro) +(define-type (object-like-macro + printer: (lambda (r p) + (format p "#<#define ~a ~a>" + (identifier r) + (unlex (body r))))) (identifier type: string?) - ;; TODO import these - (body type: list? ; (list-of (or whitespace-token? preprocessing-token?)) - )) + (body type: (list-of lexeme?))) |