aboutsummaryrefslogtreecommitdiff
path: root/src/types.c
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-03 06:53:58 -0500
committerMustafa Quraish <[email protected]>2022-02-03 06:55:06 -0500
commit108e3fd89cbe6de0c3a293cfd18ca5892a9c9c20 (patch)
tree96f9c32a6b1982b5cad4f82dc8592f83e2dc7015 /src/types.c
parentAdd an implicit block around a `for` loop, allow statement init (diff)
downloadcup-108e3fd89cbe6de0c3a293cfd18ca5892a9c9c20.tar.xz
cup-108e3fd89cbe6de0c3a293cfd18ca5892a9c9c20.zip
Add pre-increment and pre-decrement operators.
The implementation is very hacky, maybe there's a better way to go about doing this. Maybe just keep it as single AST node and do the work during codegen?
Diffstat (limited to 'src/types.c')
-rw-r--r--src/types.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/types.c b/src/types.c
index 6c7c0e5..abbba86 100644
--- a/src/types.c
+++ b/src/types.c
@@ -146,6 +146,7 @@ Node *handle_unary_expr_types(Node *node, Token *token)
// Default to not changing the type
node->expr_type = old_type;
}
+
return node;
}