summaryrefslogtreecommitdiff
path: root/cpp.sig
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-04-04 18:24:46 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-04-04 18:24:46 +0200
commit7b29b31648fd737e7bbc007f480b799add91bc6b (patch)
treee724c15c959d98ece73c186b82a61100f4e8d06a /cpp.sig
parentd7d4830443f1e385af862462f976553c8a9033e1 (diff)
Beginning of the preprocessor
Diffstat (limited to 'cpp.sig')
-rw-r--r--cpp.sig25
1 files changed, 25 insertions, 0 deletions
diff --git a/cpp.sig b/cpp.sig
new file mode 100644
index 0000000..378a5d4
--- /dev/null
+++ b/cpp.sig
@@ -0,0 +1,25 @@
+signature CPP = sig
+ type t
+ type tkPos
+ type tkExpectedValue
+
+ exception TkExpected of tkExpectedValue
+
+ datatype tkExp =
+ Tk of Tokenizer.token |
+ Id |
+ NumConst |
+ StrLiteral |
+ UnOp |
+ BinOp |
+ Op
+
+ val create: string -> t
+ val getToken: t -> Tokenizer.token * t
+ val getLastPos: t -> tkPos
+
+ val prepAndRaise: t -> tkPos -> tkExp list -> 'a
+ val tkExpectedPrint: tkExpectedValue -> unit
+
+ val debugPrint: string -> unit
+end