diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2020-12-24 01:57:18 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2020-12-24 01:57:18 +0100 |
| commit | cee93b98af7d2d8fec2479e1f42bbfb269e5a8f3 (patch) | |
| tree | 7325ba29fd4c0ed4a324a179595cc2b2a8593c11 /src/server/analysis.odin | |
| parent | b705b47a80ce8d2037b961ad429d1f4c6bc295e9 (diff) | |
fixed error not indexing runtime package because of the new odin change
Diffstat (limited to 'src/server/analysis.odin')
| -rw-r--r-- | src/server/analysis.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index d3d0c22..2096fd4 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -785,7 +785,6 @@ resolve_type_identifier :: proc(ast_context: ^AstContext, node: ast.Ident) -> (i //if there are more of these variables that hard builtin, move them to the indexer else if node.name == "context" { - log.info("found context"); return index.lookup("Context", ast_context.current_package); } //keywords @@ -1149,6 +1148,8 @@ make_symbol_struct_from_ast :: proc(ast_context: ^AstContext, v: ast.Struct_Type get_globals :: proc(file: ast.File, ast_context: ^AstContext) { + ast_context.variables["context"] = true; + for decl in file.decls { if value_decl, ok := decl.derived.(ast.Value_Decl); ok { @@ -1159,6 +1160,7 @@ get_globals :: proc(file: ast.File, ast_context: ^AstContext) { if value_decl.type != nil { ast_context.globals[str] = value_decl.type; + ast_context.variables[str] = value_decl.is_mutable; } else { @@ -1933,7 +1935,6 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> return {}, true; } -//ERROR can't got to common.Position get_completion_list :: proc(document: ^Document, position: common.Position) -> (CompletionList, bool) { list: CompletionList; |