aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2023-03-11 14:53:03 +0100
committerDanielGavin <danielgavin5@hotmail.com>2023-03-11 14:53:03 +0100
commitcba92b209574d68a054c5108672535162017ffba (patch)
treeeba2982ea9512b66460c9c6ad1bc74303a6ec60a /src
parent29816e89e1ef85c671b070c74308b97c675dcbee (diff)
remove indexer notification when odin builtin packages error out
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin36
-rw-r--r--src/server/build.odin5
2 files changed, 4 insertions, 37 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index ffafa46..9235f0a 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -1483,42 +1483,6 @@ clear_local_group :: proc(ast_context: ^AstContext, id: int) {
ast_context.locals[id] = {}
}
-/*
-get_local_lhs_and_rhs :: proc(
- ast_context: ^AstContext,
- offset: int,
- name: string,
-) -> DocumentLocal {
- for _, locals in &ast_context.locals {
- if local_stack, ok := locals[name]; ok {
- for i := len(local_stack) - 1; i >= 0; i -= 1 {
- if local_stack[i].offset <= offset {
- if i < 0 {
- return {}
- } else {
- ret := local_stack[i].rhs
- if ident, ok := ret.derived.(^ast.Ident);
- ok && ident.name == name {
- if i - 1 < 0 {
- return {}
- }
-
- if _, ok := ast_context.parameters[ident.name];
- ok {
- return local_stack[i]
- }
- }
- return local_stack[i]
- }
- }
- }
- }
- }
-
- return {}
-}
-*/
-
get_local :: proc(
ast_context: ^AstContext,
offset: int,
diff --git a/src/server/build.odin b/src/server/build.odin
index 1e94d0c..a14fd43 100644
--- a/src/server/build.odin
+++ b/src/server/build.odin
@@ -119,7 +119,10 @@ try_build_package :: proc(pkg_name: string) {
ok = parser.parse_file(&p, &file)
if !ok {
- log.errorf("error in parse file for indexing %v", fullpath)
+ if !strings.contains("builtin/builtin.odin", fullpath) &&
+ !strings.contains("intrinsics/intrinsics.odin", fullpath) {
+ log.errorf("error in parse file for indexing %v", fullpath)
+ }
continue
}