Изменён приоритет при парсинге выражений присваивания

This commit is contained in:
Victor 2015-04-16 00:07:40 +03:00
parent 3a77f1850b
commit 92ebf9321e

View File

@ -206,14 +206,6 @@ public final class Parser {
private boolean command() {
final Token token = get(0);
if (match(token, TokenType.WORD)) {
if (match(TokenType.EQ)) {
// variable = expression
Variables.setVariable(token.getText(), expression().eval());
return false;
}
}
if (match(token, TokenType.RENPY_PAUSE)) {
consume(TokenType.LPAREN);
final double pause = consumeDouble();
@ -237,6 +229,14 @@ public final class Parser {
return false;
}
if (match(token, TokenType.WORD)) {
if (match(TokenType.EQ)) {
// variable = expression
Variables.setVariable(token.getText(), expression().eval());
return false;
}
}
return false;
}