aboutsummaryrefslogtreecommitdiff
path: root/module/c/parse.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-30 00:23:06 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-07 21:17:22 +0200
commitd3abced2923c409ed27393f6ff554b5638c025e2 (patch)
treefd3da9db46e2ad12387c5723c69b29faad3be9b2 /module/c/parse.scm
parentC-parser add strings. (diff)
downloadcalp-d3abced2923c409ed27393f6ff554b5638c025e2.tar.gz
calp-d3abced2923c409ed27393f6ff554b5638c025e2.tar.xz
C parser add unary minus.
Diffstat (limited to 'module/c/parse.scm')
-rw-r--r--module/c/parse.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/c/parse.scm b/module/c/parse.scm
index ad716132..15240bc1 100644
--- a/module/c/parse.scm
+++ b/module/c/parse.scm
@@ -123,6 +123,7 @@
((&) 'pointer)
((++) 'pre-increment)
((--) 'pre-decrement)
+ ((-) '-)
(else (scm-error 'c-parse-error "parse-lexeme-tree"
"Unknown prefix operator ~s"
(list op) #f)))]
@@ -150,6 +151,10 @@
`(,(parse-lexeme-tree op)
,(parse-lexeme-tree arg))]
+
+
+
+
;; resolved-operator and ternary are the return "types"
;; of resolve-order-of-operations
[(('resolved-operator op) args ...)