From 8fd0a145947011f113abaab245e35f1adfb6eb48 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Fri, 4 Feb 2022 06:16:18 -0500 Subject: 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 :^) --- src/parser.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/parser.h') 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 -- cgit v1.2.3