Fix incorrect precedence of pow operator in GDScript

This commit is contained in:
Yuri Rubinsky 2022-05-12 10:02:03 +03:00
parent 516ec892b4
commit be8eb6625e
2 changed files with 2 additions and 1 deletions

View File

@ -3273,7 +3273,7 @@ GDScriptParser::ParseRule *GDScriptParser::get_rule(GDScriptTokenizer::Token::Ty
{ &GDScriptParser::parse_unary_operator, &GDScriptParser::parse_binary_operator, PREC_ADDITION_SUBTRACTION }, // PLUS,
{ &GDScriptParser::parse_unary_operator, &GDScriptParser::parse_binary_operator, PREC_ADDITION_SUBTRACTION }, // MINUS,
{ nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // STAR,
{ nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // STAR_STAR,
{ nullptr, &GDScriptParser::parse_binary_operator, PREC_POWER }, // STAR_STAR,
{ nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // SLASH,
{ nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // PERCENT,
// Assignment

View File

@ -1265,6 +1265,7 @@ private:
PREC_FACTOR,
PREC_SIGN,
PREC_BIT_NOT,
PREC_POWER,
PREC_TYPE_TEST,
PREC_AWAIT,
PREC_CALL,