We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af1621d commit cf2524aCopy full SHA for cf2524a
Classes/parser.py
@@ -23,7 +23,12 @@ def parseBlock():
23
def parseCommand():
24
result = None
25
26
- if (Parser.tokens.actual.type == 'IDENTIFIER'):
+ if (Parser.tokens.actual.type == "LINE_END"):
27
+ Parser.tokens.selectNext()
28
+ if (not result):
29
+ result = NoOp()
30
+
31
+ elif (Parser.tokens.actual.type == 'IDENTIFIER'):
32
iden = Parser.tokens.actual.value
33
Parser.tokens.selectNext()
34
@@ -47,10 +52,8 @@ def parseCommand():
47
52
else:
48
53
raise NameError("Expected Parenthesis")
49
54
50
- if (Parser.tokens.actual.type == "LINE_END"):
51
- Parser.tokens.selectNext()
- if (not result):
- result = NoOp()
55
+ else:
56
+ raise NameError(f"Unexpected token {Parser.tokens.actual.type}")
57
58
return result
59
0 commit comments