diff options
Diffstat (limited to 'include/ast.h')
-rw-r--r-- | include/ast.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ast.h b/include/ast.h index e49ad08..7b16796 100644 --- a/include/ast.h +++ b/include/ast.h @@ -65,12 +65,12 @@ typedef struct { AstValue value; AstType type; AstResolveStatus resolve_status; - StructDecl *resolved_type; + LhsExpr *resolved_type; } Ast; struct Scope { Buffer ast_objects; - HashMap/*(key=BufferView, value=Ast)*/ named_objects; + HashMap/*(key=BufferView, value=Ast<LhsExpr>)*/ named_objects; Scope *parent; }; @@ -81,7 +81,6 @@ struct FileScopeReference { struct Variable { BufferView name; - Ast resolved_variable; }; struct FunctionDecl { @@ -104,6 +103,7 @@ struct StructField { }; struct LhsExpr { + bool is_pub; bool is_const; BufferView var_name; Variable type; @@ -149,7 +149,7 @@ CHECK_RESULT int funcdecl_init(FunctionDecl *self, Scope *parent, ScopedAllocato CHECK_RESULT int funccall_init(FunctionCall *self, BufferView name, ScopedAllocator *allocator); CHECK_RESULT int structdecl_init(StructDecl *self, Scope *parent, ScopedAllocator *allocator); void structfield_init(StructField *self, BufferView name, BufferView type_name); -void lhsexpr_init(LhsExpr *self, bool is_const, BufferView var_name); +void lhsexpr_init(LhsExpr *self, bool is_pub, bool is_const, BufferView var_name); void import_init(Import *self, BufferView path); CHECK_RESULT int string_init(String *self, BufferView str); void number_init(Number *self, i64 value, bool is_integer); |