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:
@@ -39,3 +39,11 @@ public func ConfigureP4Parser() -> Result<SwiftTreeSitter.Parser> {
|
||||
public func ErrorOnNode(node: Node, withError error: String) -> Error {
|
||||
return Error(withMessage: "\(node.range): \(error)")
|
||||
}
|
||||
|
||||
public struct CompilerContext {
|
||||
public let names: LexicalScopes
|
||||
|
||||
public init(withNames _names: LexicalScopes) {
|
||||
names = _names
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user