context
¶
Classes:
SemanticContext
dataclass
¶
SemanticContext(
scopes: ScopeStack = ScopeStack(),
diagnostics: DiagnosticBag = DiagnosticBag(),
functions: dict[str, SemanticFunction] = dict(),
structs: dict[str, StructDefStmt] = dict(),
current_function: SemanticFunction | None = None,
loop_depth: int = 0,
_symbol_counter: int = 0,
)
Methods:
-
in_function– -
in_loop– -
next_symbol_id– -
scope–
in_function
¶
in_function(function: SemanticFunction) -> Iterator[None]
Source code in src/irx/analysis/context.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
in_loop
¶
in_loop() -> Iterator[None]
Source code in src/irx/analysis/context.py
94 95 96 97 98 99 100 101 102 103 104 105 | |
next_symbol_id
¶
Source code in src/irx/analysis/context.py
49 50 51 52 53 54 55 56 57 58 59 | |
scope
¶
Source code in src/irx/analysis/context.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |