aboutsummaryrefslogtreecommitdiff
path: root/module/c/cpp-environment
diff options
context:
space:
mode:
Diffstat (limited to 'module/c/cpp-environment')
-rw-r--r--module/c/cpp-environment/function-like-macro.scm17
-rw-r--r--module/c/cpp-environment/internal-macro.scm11
-rw-r--r--module/c/cpp-environment/object-like-macro.scm13
3 files changed, 41 insertions, 0 deletions
diff --git a/module/c/cpp-environment/function-like-macro.scm b/module/c/cpp-environment/function-like-macro.scm
new file mode 100644
index 00000000..0a0611e3
--- /dev/null
+++ b/module/c/cpp-environment/function-like-macro.scm
@@ -0,0 +1,17 @@
+(define-module (c cpp-environment function-like-macro)
+ :use-module (hnh util object)
+ :export (function-like-macro
+ function-like-macro?
+ identifier
+ identifier-list
+ body
+ variadic?))
+
+(define-type (function-like-macro)
+ (identifier type: string?)
+ (identifier-list type: (list-of string?))
+ ;; TODO import these
+ (body type: list? ; (list-of (or whitespace-token? preprocessing-token?))
+ )
+ (variadic? type: boolean?
+ default: #f))
diff --git a/module/c/cpp-environment/internal-macro.scm b/module/c/cpp-environment/internal-macro.scm
new file mode 100644
index 00000000..3c946738
--- /dev/null
+++ b/module/c/cpp-environment/internal-macro.scm
@@ -0,0 +1,11 @@
+(define-module (c cpp-environment internal-macro)
+ :use-module (hnh util object)
+ :export (internal-macro
+ internal-macro?
+ identifier body))
+
+(define-type (internal-macro)
+ (identifier type: string?)
+ (body type: procedure?
+ ;; Arity 2
+ ))
diff --git a/module/c/cpp-environment/object-like-macro.scm b/module/c/cpp-environment/object-like-macro.scm
new file mode 100644
index 00000000..5d4c8810
--- /dev/null
+++ b/module/c/cpp-environment/object-like-macro.scm
@@ -0,0 +1,13 @@
+(define-module (c cpp-environment object-like-macro)
+ :use-module (hnh util object)
+ :export (object-like-macro
+ object-like-macro?
+ identifier
+ body))
+
+
+(define-type (object-like-macro)
+ (identifier type: string?)
+ ;; TODO import these
+ (body type: list? ; (list-of (or whitespace-token? preprocessing-token?))
+ ))