compiler: Refactor Compiler To Remove Ambiguities
There were significant overlaps in the names of data structures between the compiler and the language that made it necessary to litter the code with P4Lang.xxxx. This refactor removes that requirement in most places (Parser is ambiguous wherever TreeSitter is used -- cannot avoid that!) Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -41,7 +41,7 @@ func shrink(_ from: String) -> String {
|
||||
}
|
||||
};
|
||||
"""
|
||||
let program = try #UseOkResult(Program.Compile(simple_parser_declaration))
|
||||
let program = try #UseOkResult(SpecialCompilers.ProgramCompiler.Compile(simple_parser_declaration))
|
||||
let cg = try #UseOkResult(CodeGenerator().codeGen(program))
|
||||
|
||||
let expected = shrink(
|
||||
@@ -73,7 +73,7 @@ func shrink(_ from: String) -> String {
|
||||
}
|
||||
};
|
||||
"""
|
||||
let program = try #UseOkResult(Program.Compile(simple_parser_declaration))
|
||||
let program = try #UseOkResult(SpecialCompilers.ProgramCompiler.Compile(simple_parser_declaration))
|
||||
let cg = try #UseOkResult(CodeGenerator().codeGen(program))
|
||||
|
||||
/// TODO: Fix this test.
|
||||
|
||||
Reference in New Issue
Block a user