@@ -39,7 +39,8 @@ extension AST.Statement: Compilable {
|
||||
"assignmentStatement": AST.ParserAssignmentStatement.self,
|
||||
"expressionStatement": AST.ExpressionStatement.self,
|
||||
"variableDeclaration": AST.VariableDeclarationStatement.self,
|
||||
"conditionalStatement": AST.ConditionalStatement.self, "blockStatement": AST.BlockStatement.self,
|
||||
"conditionalStatement": AST.ConditionalStatement.self,
|
||||
"blockStatement": AST.BlockStatement.self,
|
||||
"return_statement": AST.ReturnStatement.self,
|
||||
]
|
||||
guard let parser = statementParsers[statement.nodeType ?? ""] else {
|
||||
@@ -176,8 +177,9 @@ extension AST.ParserState: Compilable {
|
||||
sourceLocation: node.toSourceLocation(),
|
||||
withError: "Missing transition statement of state declaration")))
|
||||
|
||||
let updated_context = context.update(withContextName: (state_identifier as! AST.Identifier)).update(withContextStatements: parsed_s)
|
||||
let updated_context = context.update(withContextName: (state_identifier as! AST.Identifier))
|
||||
.update(withContextStatements: parsed_s)
|
||||
|
||||
return AST.TransitionStatement.Compile(node: current_node!, withContext: updated_context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user