compiler: Refactor Language Element Tags
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -21,7 +21,7 @@ public struct CSTVisitorDriver {
|
||||
public init() {}
|
||||
|
||||
public func visit<T>(
|
||||
expression: any CST.AnExpression, visitor: any CSTVisitor<T>, context: T
|
||||
expression: any CST.Categories.Expression, visitor: any CSTVisitor<T>, context: T
|
||||
) -> Result<T> {
|
||||
return switch expression {
|
||||
case let e as CST.BinaryOperatorExpression:
|
||||
@@ -32,7 +32,7 @@ public struct CSTVisitorDriver {
|
||||
}
|
||||
|
||||
public func visit<T>(
|
||||
state: any CST.AnState, visitor: any CSTVisitor<T>, context: T
|
||||
state: any CST.Categories.State, visitor: any CSTVisitor<T>, context: T
|
||||
) -> Result<T> {
|
||||
return switch state {
|
||||
case let s as CST.ParserStateDirectTransition:
|
||||
@@ -46,7 +46,7 @@ public struct CSTVisitorDriver {
|
||||
}
|
||||
|
||||
public func visit<T>(
|
||||
statement: any CST.Statement, visitor: any CSTVisitor<T>, context: T
|
||||
statement: any CST.Categories.Statement, visitor: any CSTVisitor<T>, context: T
|
||||
) -> Result<T> {
|
||||
return switch statement {
|
||||
case let s as CST.Parser: visitor.visit(node: s, driver: self, context: context)
|
||||
|
||||
Reference in New Issue
Block a user