Reformat evaluator #1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from smnp.ast.node.colon import ColonNode
|
||||
from smnp.ast.parsers.expression import parseExpression
|
||||
from smnp.error.syntax import SyntaxException
|
||||
from smnp.token.type import TokenType
|
||||
|
||||
@@ -11,7 +12,7 @@ def parseColon(expr1, input, parent):
|
||||
expr2 = parseExpression(input, parent)
|
||||
|
||||
if expr2 is None:
|
||||
raise SyntaxException(input.current().pos, f"Expected expression '{input.current().value}'")
|
||||
raise SyntaxException(f"Expected expression '{input.current().value}'", input.current().pos)
|
||||
colon = ColonNode(expr1, expr2, parent, token.pos)
|
||||
expr1.parent = colon
|
||||
expr2.parent = colon
|
||||
|
||||
Reference in New Issue
Block a user