diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/index/build.odin | 6 | ||||
| -rw-r--r-- | src/server/documents.odin | 6 | ||||
| -rw-r--r-- | src/server/requests.odin | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/index/build.odin b/src/index/build.odin index bf1536a..890de2b 100644 --- a/src/index/build.odin +++ b/src/index/build.odin @@ -59,9 +59,15 @@ build_static_index :: proc(allocator := context.allocator, config: ^common.Confi warn = no_warning_handler, }; + //have to cheat the parser since it really wants to parse an entire package with the new changes... + pkg := new(ast.Package); + pkg.kind = .Normal; + pkg.fullpath = fullpath; + file := ast.File { fullpath = fullpath, src = data, + pkg = pkg, }; ok = parser.parse_file(&p, &file); diff --git a/src/server/documents.odin b/src/server/documents.odin index 7e9aa67..bf8a04f 100644 --- a/src/server/documents.odin +++ b/src/server/documents.odin @@ -386,9 +386,15 @@ parse_document :: proc(document: ^Document, config: ^common.Config) -> ([] Parse context.allocator = common.scratch_allocator(document.allocator); + //have to cheat the parser since it really wants to parse an entire package with the new changes... + pkg := new(ast.Package); + pkg.kind = .Normal; + pkg.fullpath = document.uri.path; + document.ast = ast.File { fullpath = document.uri.path, src = document.text[:document.used_text], + pkg = pkg, }; parser.parse_file(&p, &document.ast); diff --git a/src/server/requests.odin b/src/server/requests.odin index 97c17ef..f9f986c 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -857,7 +857,7 @@ request_semantic_token_range :: proc(task: ^common.Task) { symbols: SemanticTokens; - if config.enable_semantic_tokens { + if false && config.enable_semantic_tokens { symbols = get_semantic_tokens(document, semantic_params.range); } |