@@ -386,4 +386,5 @@ extension Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@attached(member, names: named(CompileStatement))
|
@attached(member, names: named(CompileStatement))
|
||||||
public macro deriveCompilableStatement() = #externalMacro(module: "Macros", type: "DeriveCompilableStatement")
|
public macro deriveCompilableStatement() =
|
||||||
|
#externalMacro(module: "Macros", type: "DeriveCompilableStatement")
|
||||||
|
|||||||
@@ -37,17 +37,18 @@ extension TransitionStatement: Compilable {
|
|||||||
return .Error(
|
return .Error(
|
||||||
ErrorWithLocation(
|
ErrorWithLocation(
|
||||||
sourceLocation: node.toSourceLocation(),
|
sourceLocation: node.toSourceLocation(),
|
||||||
withError: "Cannot parse a transition statement without the name of the containing state."))
|
withError: "Cannot parse a transition statement without the name of the containing state."
|
||||||
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let stmts = context.lexical_context_statements else {
|
guard let stmts = context.lexical_context_statements else {
|
||||||
return .Error(
|
return .Error(
|
||||||
ErrorWithLocation(
|
ErrorWithLocation(
|
||||||
sourceLocation: node.toSourceLocation(),
|
sourceLocation: node.toSourceLocation(),
|
||||||
withError: "Cannot parse a transition statement without statements of the containing state."))
|
withError:
|
||||||
|
"Cannot parse a transition statement without statements of the containing state."))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#RequireNodeType<Node, P4Statement>(
|
#RequireNodeType<Node, P4Statement>(
|
||||||
node: node, type: "parserTransitionStatement", nice_type_name: "parser transition statement"
|
node: node, type: "parserTransitionStatement", nice_type_name: "parser transition statement"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user