aboutsummaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-04 06:16:18 -0500
committerMustafa Quraish <[email protected]>2022-02-05 08:56:15 -0500
commit8fd0a145947011f113abaab245e35f1adfb6eb48 (patch)
tree957bcf38c33d697c2fe5dd997bc294ae28adcaec /src/parser.h
parentUpdate README.md (diff)
downloadcup-8fd0a145947011f113abaab245e35f1adfb6eb48.tar.xz
cup-8fd0a145947011f113abaab245e35f1adfb6eb48.zip
Allow `builtins.c` to inject constants into program, use for syscalls
We can now directly expose the `syscallN()` APIs to the program and define the `open()`, `write()` etc syscalls in the stdlib. This simplifies the implementation a decent bunch :^)
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
index 7f7dacb..dd72686 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -3,5 +3,6 @@
#include "ast.h"
#include "lexer.h"
+void push_constant(char *name, i64 value);
Node *parse_program(Lexer *lexer);
void print_ast(Node *node); \ No newline at end of file