diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2020-11-12 15:50:42 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2020-11-12 15:50:42 +0100 |
| commit | 091efd3e488482a20fc4f3cbf109814e2705d8ef (patch) | |
| tree | 09cb0f43e634824437ea3fa0d27f76349ad0653c /src/index | |
| parent | 2fba6caddadc6d7d10f6af5892de6fd44d2291d4 (diff) | |
can now handle the bad expression where field is in specified in the selector expression.
Diffstat (limited to 'src/index')
| -rw-r--r-- | src/index/symbol.odin | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/index/symbol.odin b/src/index/symbol.odin index 90e2a88..d55acc6 100644 --- a/src/index/symbol.odin +++ b/src/index/symbol.odin @@ -16,7 +16,7 @@ import "shared:common" SymbolStructValue :: struct { names: [] string, - types: [] ^ast.Node, + types: [] ^ast.Expr, }; SymbolValue :: union { @@ -35,8 +35,10 @@ Symbol :: struct { SymbolType :: enum { Function = 3, + Field = 5, + Package = 9, //set by ast symbol + Keyword = 14, //set by ast symbol Struct = 22, - Package = 9, //not used by the indexer itself but can be set when creating symbols from ast }; SymbolCollection :: struct { @@ -67,7 +69,7 @@ make_symbol_collection :: proc(allocator := context.allocator) -> SymbolCollecti collect_struct_fields :: proc(collection: ^SymbolCollection, fields: ^ast.Field_List, src: [] byte) -> SymbolStructValue { names := make([dynamic] string, 0, collection.allocator); - types := make([dynamic] ^ast.Node, 0, collection.allocator); + types := make([dynamic] ^ast.Expr, 0, collection.allocator); for field in fields.list { |