Merge pull request #14 from catseye/fix-templabelcount

Declare templabelcount as a global in atom().
This commit is contained in:
Michael C. Martin 2013-01-10 22:25:03 -08:00
commit 1c7174e696
1 changed files with 2 additions and 0 deletions

View File

@ -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)