Renamed EQUALS.

This commit is contained in:
Jussi Pakkanen 2013-01-25 21:29:59 +02:00
parent 81fbb83f84
commit b2df86d5cc
2 changed files with 4 additions and 4 deletions

View File

@ -258,7 +258,7 @@ class Interpreter():
if node is None: if node is None:
return return
if not isinstance(node, nodes.CodeBlock): if not isinstance(node, nodes.CodeBlock):
raise InvalidCode('Tried to execute a non-codeblock. Possibly a bug in the parser.') raise InvalidCode('Line %d: Tried to execute a non-codeblock. Possibly a bug in the parser.' % node.lineno())
statements = node.get_statements() statements = node.get_statements()
i = 0 i = 0
while i < len(statements): while i < len(statements):

View File

@ -33,7 +33,7 @@ tokens = ['LPAREN',
'RBRACE', 'RBRACE',
'ATOM', 'ATOM',
'COMMENT', 'COMMENT',
'EQUALS', 'ASSIGN',
'COMMA', 'COMMA',
'DOT', 'DOT',
'STRING', 'STRING',
@ -41,7 +41,7 @@ tokens = ['LPAREN',
'EOL', 'EOL',
] + list(reserved.values()) ] + list(reserved.values())
t_EQUALS = '=' t_ASSIGN = '='
t_LPAREN = '\(' t_LPAREN = '\('
t_RPAREN = '\)' t_RPAREN = '\)'
t_LBRACKET = '\[' t_LBRACKET = '\['
@ -112,7 +112,7 @@ def p_expression_string(t):
t[0] = nodes.StringExpression(t[1], t.lineno(1)) t[0] = nodes.StringExpression(t[1], t.lineno(1))
def p_statement_assign(t): def p_statement_assign(t):
'statement : expression EQUALS statement' 'statement : expression ASSIGN statement'
t[0] = nodes.Assignment(t[1], t[3], t.lineno(1)) t[0] = nodes.Assignment(t[1], t[3], t.lineno(1))
def p_statement_func_call(t): def p_statement_func_call(t):