mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-12-21 12:29:46 +00:00
Declare templabelcount as a global in atom().
This commit is contained in:
parent
4ad16be245
commit
45784e9b95
@ -16,6 +16,7 @@ import os.path
|
||||
|
||||
|
||||
loadedfiles = {}
|
||||
templabelcount = 0
|
||||
|
||||
|
||||
class Lexeme(object):
|
||||
@ -205,6 +206,7 @@ def parse_expr(line):
|
||||
|
||||
def atom():
|
||||
"Parses lowest-priority expression components."
|
||||
global templabelcount
|
||||
next = line.lookahead(0).type
|
||||
if next == "NUM":
|
||||
return IR.ConstantExpr(line.expect("NUM").value)
|
||||
|
Loading…
Reference in New Issue
Block a user