aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ast.c b/src/ast.c
index 75c8afc..4b72f43 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -24,6 +24,7 @@ int funccall_init(FunctionCall *self, BufferView name, ScopedAllocator *allocato
void lhsexpr_init(LhsExpr *self, int isConst, BufferView var_name) {
self->isConst = isConst;
+ self->type_name = create_buffer_view_null();
self->var_name = var_name;
self->rhs_expr = ast_none();
}
@@ -41,4 +42,10 @@ int string_init(String *self, BufferView str) {
void number_init(Number *self, i64 value, bool is_integer) {
self->value.integer = value;
self->is_integer = is_integer;
+}
+
+void binop_init(Binop *self) {
+ self->lhs = ast_none();
+ self->rhs = ast_none();
+ self->type = BINOP_ADD;
} \ No newline at end of file