diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-25 14:28:29 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-25 14:28:29 +0200 |
| commit | fe6c562284950191820f4b08924cca088d852a39 (patch) | |
| tree | 213047f82ff7205736ff06f91288e796e01a4ab9 | |
| parent | f920050b631ce749320db6e3f178982b0cad38dc (diff) | |
Undo variable/constant change
| -rw-r--r-- | src/server/collector.odin | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin index 6829e78..53a5199 100644 --- a/src/server/collector.odin +++ b/src/server/collector.odin @@ -508,6 +508,12 @@ collect_symbols :: proc( package_map, uri, ) + + if expr.mutable { + token_type = .Variable + } else { + token_type = .Constant + } case: // default symbol.value = collect_generic( @@ -516,14 +522,16 @@ collect_symbols :: proc( package_map, uri, ) + + if expr.mutable { + token_type = .Variable + } else { + token_type = .Unresolved + } + token = expr.expr } - if expr.mutable && token_type == .Constant || token_type == .Variable { - token_type = .Variable - } else if token_type == .Constant || token_type == .Variable { - token_type = .Constant - } symbol.range = common.get_token_range(expr.name_expr, file.src) symbol.name = get_index_unique_string(collection, name) |