From a104f80e61f7e6a110a209cf7cc5ffd09d6b5b4f Mon Sep 17 00:00:00 2001 From: "Konstantin Kirik (snegovick)" Date: Sat, 13 Dec 2025 14:45:13 +0300 Subject: Add variable substitution --- module/sh9parser.m | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'module/sh9parser.m') diff --git a/module/sh9parser.m b/module/sh9parser.m index 22d3f09..aa8a403 100644 --- a/module/sh9parser.m +++ b/module/sh9parser.m @@ -33,11 +33,19 @@ ShModule: adt { name: string; vars: list of ref ModVar; procs: list of ref ModProc; + find_var: fn(m: self ref ShModule, name: string): ref ModVar; + set_var: fn(m: self ref ShModule, v: ref ModVar); + print_vars: fn(m: self ref ShModule); }; ParserCtx: adt { modules: list of ref ShModule; add_module: fn(ctx: self ref ParserCtx, name: string); + current_module: string; + get_current_module: fn(ctx: self ref ParserCtx): ref ShModule; + find_var_in_current_module: fn(ctx: self ref ParserCtx, name: string): ref ModVar; + find_module: fn(ctx: self ref ParserCtx, name: string): ref ShModule; + print_all_vars: fn(ctx: self ref ParserCtx); }; GrammarNode: adt { -- cgit v1.2.3