From 7b0bfa91b400e89f32f19ef2987200562bbe3f8f Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sat, 5 Feb 2022 22:34:44 -0500 Subject: [cup] Add support for builtin functions, add `print()` --- compiler/codegen.cup | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/codegen.cup') diff --git a/compiler/codegen.cup b/compiler/codegen.cup index d35f901..8c8ec95 100644 --- a/compiler/codegen.cup +++ b/compiler/codegen.cup @@ -1,3 +1,4 @@ +import "compiler/builtins.cup" import "compiler/ast.cup" import "std/file.cup" @@ -381,4 +382,6 @@ fn generate_program(ast: Node*, file: File*) { emit_asm(" call func_main\n"); emit_asm(" mov rdi, rax\n"); generate_syscall(SYS_exit); + + generate_builtins(); } \ No newline at end of file -- cgit v1.2.3