aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-01-05 09:33:03 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-01-05 09:33:03 +0100
commit93df32b34b80da4d62644004160294d1d068a934 (patch)
treeed42f20ebda9993b1ad0ebe552043be5e9bd7bc5 /src/common
parent508b2487f45fac7a58549e4c5f8cde3f250ae568 (diff)
more refractoring by trying to store the variable information on the symbol.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/position.odin1
-rw-r--r--src/common/types.odin3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/position.odin b/src/common/position.odin
index 41bf00a..4e84568 100644
--- a/src/common/position.odin
+++ b/src/common/position.odin
@@ -55,7 +55,6 @@ get_absolute_position :: proc(position: Position, document_text: []u8) -> (Absol
}
get_relative_token_position :: proc(offset: int, document_text: []u8, current_start: int) -> Position {
-
start_index := current_start;
data := document_text[start_index:];
diff --git a/src/common/types.odin b/src/common/types.odin
index 317269b..0956e89 100644
--- a/src/common/types.odin
+++ b/src/common/types.odin
@@ -37,8 +37,9 @@ Document :: struct {
ast: ast.File,
imports: []Package,
package_name: string,
- allocator: ^Scratch_Allocator, //because does not support freeing I use arena allocators for each document
+ allocator: ^Scratch_Allocator, //because parser does not support freeing I use arena allocators for each document
operating_on: int, //atomic
+ symbol_cache: map[int]rawptr, //Stores all the symbol data for this current iteration of the file. Gets cleared every change.
}
parser_warning_handler :: proc(pos: tokenizer.Pos, msg: string, args: ..any) {