mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 04:20:17 +00:00
fix a precedence error
This commit is contained in:
parent
84cdb20687
commit
d78dfb9d7f
@ -114,9 +114,9 @@ public:
|
||||
#undef METHOD
|
||||
#undef NO_INFIX
|
||||
|
||||
#define EXPR() parsePrecedence(PREC_COMMA) // no '=' and ',' just a simple expression
|
||||
#define EXPR_TUPLE() parsePrecedence(PREC_ASSIGNMENT) // no '=', but ',' is allowed
|
||||
#define EXPR_ANY() parsePrecedence(PREC_NONE)
|
||||
#define EXPR() parsePrecedence(PREC_LOGICAL_OR) // no '=' and ',' just a simple expression
|
||||
#define EXPR_TUPLE() parsePrecedence(PREC_COMMA) // no '=', but ',' is allowed
|
||||
#define EXPR_ANY() parsePrecedence(PREC_ASSIGNMENT)
|
||||
}
|
||||
|
||||
_Str eatStringUntil(char quote) {
|
||||
@ -620,7 +620,7 @@ __LISTCOMP:
|
||||
}
|
||||
|
||||
(this->*prefix)();
|
||||
while (rules[peek()].precedence > precedence) {
|
||||
while (rules[peek()].precedence >= precedence) {
|
||||
lexToken();
|
||||
_TokenType op = parser->previous.type;
|
||||
GrammarFn infix = rules[op].infix;
|
||||
|
Loading…
x
Reference in New Issue
Block a user