diff options
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -12,11 +12,6 @@ int funcdecl_init(FunctionDecl *self, ScopedAllocator *allocator) { return buffer_init(&self->body, allocator); } -int funcdecl_add_to_body(FunctionDecl *self, Ast ast) { - return_if_error(buffer_append(&self->body, &ast, sizeof(ast))); - return BUFFER_OK; -} - int funccall_init(FunctionCall *self, BufferView name, ScopedAllocator *allocator) { self->name = name; return buffer_init(&self->args, allocator); @@ -49,4 +44,13 @@ void binop_init(Binop *self) { self->rhs = ast_none(); self->type = BINOP_ADD; self->grouped = bool_false; +} + +int scope_init(Scope *self, ScopedAllocator *allocator) { + return buffer_init(&self->ast_objects, allocator); +} + +void scope_resolve(Scope *self) { + /* TODO: Implement. Also use longjmp to jump back to compiler on error */ + (void)self; }
\ No newline at end of file |