mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-09-27 04:54:58 +00:00
Merge pull request #14 from catseye/fix-templabelcount
Declare templabelcount as a global in atom().
This commit is contained in:
commit
1c7174e696
@ -16,6 +16,7 @@ import os.path
|
|||||||
|
|
||||||
|
|
||||||
loadedfiles = {}
|
loadedfiles = {}
|
||||||
|
templabelcount = 0
|
||||||
|
|
||||||
|
|
||||||
class Lexeme(object):
|
class Lexeme(object):
|
||||||
@ -205,6 +206,7 @@ def parse_expr(line):
|
|||||||
|
|
||||||
def atom():
|
def atom():
|
||||||
"Parses lowest-priority expression components."
|
"Parses lowest-priority expression components."
|
||||||
|
global templabelcount
|
||||||
next = line.lookahead(0).type
|
next = line.lookahead(0).type
|
||||||
if next == "NUM":
|
if next == "NUM":
|
||||||
return IR.ConstantExpr(line.expect("NUM").value)
|
return IR.ConstantExpr(line.expect("NUM").value)
|
||||||
|
Loading…
Reference in New Issue
Block a user