aboutsummaryrefslogtreecommitdiff
path: root/src/server/locals.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-24 10:19:02 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-24 15:31:47 -0400
commit9949af4debee31d6bc182056aa8436bbfefe8be2 (patch)
tree880e169a70369a357d1ab60fbc9263703ef279e9 /src/server/locals.odin
parentdb53fc4924383e41b1631ef35a80377446a99c4e (diff)
Move position context code into it's own file
Diffstat (limited to 'src/server/locals.odin')
-rw-r--r--src/server/locals.odin13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/locals.odin b/src/server/locals.odin
index 38b52c0..c913ab1 100644
--- a/src/server/locals.odin
+++ b/src/server/locals.odin
@@ -4,6 +4,19 @@ import "core:fmt"
import "core:log"
import "core:odin/ast"
+DocumentLocal :: struct {
+ lhs: ^ast.Expr,
+ rhs: ^ast.Expr,
+ offset: int,
+ resolved_global: bool, //Some locals have already been resolved and are now in global space
+ local_global: bool, //Some locals act like globals, i.e. functions defined inside functions.
+ pkg: string,
+ variable: bool,
+ parameter: bool,
+}
+
+LocalGroup :: map[string][dynamic]DocumentLocal
+
store_local :: proc(
ast_context: ^AstContext,
lhs: ^ast.Expr,