diff options
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -17,8 +17,9 @@ int funcdecl_add_to_body(FunctionDecl *self, Ast ast) { return BUFFER_OK; } -void funccall_init(FunctionCall *self, BufferView name) { +int funccall_init(FunctionCall *self, BufferView name, ScopedAllocator *allocator) { self->name = name; + return buffer_init(&self->args, allocator); } void lhsexpr_init(LhsExpr *self, int isConst, BufferView var_name) { @@ -30,3 +31,14 @@ void lhsexpr_init(LhsExpr *self, int isConst, BufferView var_name) { void import_init(Import *self, BufferView path) { self->path = path; } + +int string_init(String *self, BufferView str) { + /* TODO: Convert special characters. For example \n should be converted to binary newline etc */ + self->str = str; + return 0; +} + +void number_init(Number *self, i64 value, bool is_integer) { + self->value.integer = value; + self->is_integer = is_integer; +}
\ No newline at end of file |