aboutsummaryrefslogtreecommitdiff
path: root/module/c/cpp-environment
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-23 20:44:05 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-23 20:49:19 +0200
commit08b84c6b42312aa2bb4d854367b4a17cafcf28c2 (patch)
tree761d997180ca5d40f0481c1a63fd07728b7ddb69 /module/c/cpp-environment
parentIntroduce key: to define-type. (diff)
downloadcalp-08b84c6b42312aa2bb4d854367b4a17cafcf28c2.tar.gz
calp-08b84c6b42312aa2bb4d854367b4a17cafcf28c2.tar.xz
Merge cpp-environment sub-modules into main module.
The modules where sepparate before to allow multiple objects to share keys for the constructor. This is not needed any more since the introduction of key: to define-type.
Diffstat (limited to 'module/c/cpp-environment')
-rw-r--r--module/c/cpp-environment/function-like-macro.scm25
-rw-r--r--module/c/cpp-environment/internal-macro.scm11
-rw-r--r--module/c/cpp-environment/object-like-macro.scm18
3 files changed, 0 insertions, 54 deletions
diff --git a/module/c/cpp-environment/function-like-macro.scm b/module/c/cpp-environment/function-like-macro.scm
deleted file mode 100644
index 59b47c9c..00000000
--- a/module/c/cpp-environment/function-like-macro.scm
+++ /dev/null
@@ -1,25 +0,0 @@
-(define-module (c cpp-environment function-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 (function-like-macro
- function-like-macro?
- identifier
- identifier-list
- body
- variadic?))
-
-(define-type (function-like-macro
- printer: (lambda (r p)
- (format p "#<#define ~a~a ~a>"
- (identifier r)
- (append (identifier-list r)
- (if (variadic? r)
- '("...") '()))
- (unlex (body r)))))
- (identifier type: string?)
- (identifier-list type: (list-of string?))
- (body type: (list-of lexeme?))
- (variadic? type: boolean?
- default: #f))
diff --git a/module/c/cpp-environment/internal-macro.scm b/module/c/cpp-environment/internal-macro.scm
deleted file mode 100644
index 3c946738..00000000
--- a/module/c/cpp-environment/internal-macro.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-(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
deleted file mode 100644
index 90a3ad23..00000000
--- a/module/c/cpp-environment/object-like-macro.scm
+++ /dev/null
@@ -1,18 +0,0 @@
-(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
- printer: (lambda (r p)
- (format p "#<#define ~a ~a>"
- (identifier r)
- (unlex (body r)))))
- (identifier type: string?)
- (body type: (list-of lexeme?)))