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:
@@ -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()))))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user