Изменён приоритет при парсинге выражений присваивания
This commit is contained in:
parent
3a77f1850b
commit
92ebf9321e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user