Refactor Compilation Interface

Compilation interface(s) now contain a compilation context.
The change will make it easier to expand on what each step
of the compilation process needs to know to complete its task
without having to make major changes to the interface.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-13 06:25:30 -04:00
parent df841a0a1b
commit 2f7d05a3fd
7 changed files with 111 additions and 98 deletions
+2 -2
View File
@@ -111,8 +111,8 @@ import P4Lang
let result = try! #require(p.parse(simple))
#expect(
#RequireErrorResult<(EvaluatableStatement, LexicalScopes)>(
#RequireErrorResult<(EvaluatableStatement, CompilerContext)>(
Error(withMessage: "{2, 154}: Did not find assignment statement"),
ParserAssignmentStatement.Compile(
node: result.rootNode!, withTypesInScope: LexicalScopes())))
node: result.rootNode!, withContext: CompilerContext(withNames: LexicalScopes()))))
}