Resolve long-standing left/right binding issue with '**'
This commit is contained in:
parent
b966db7b91
commit
79a4a02b58
@ -812,7 +812,7 @@ static void compare(int exprType, RewindState *rewind) {
|
||||
static void binary(int exprType, RewindState *rewind) {
|
||||
KrkTokenType operatorType = parser.previous.type;
|
||||
ParseRule * rule = getRule(operatorType);
|
||||
parsePrecedence((Precedence)(rule->precedence + 1));
|
||||
parsePrecedence((Precedence)(rule->precedence + (rule->precedence != PREC_EXPONENT)));
|
||||
invalidTarget(exprType, "operator");
|
||||
|
||||
switch (operatorType) {
|
||||
|
1
test/testPow.krk
Normal file
1
test/testPow.krk
Normal file
@ -0,0 +1 @@
|
||||
print(2**3**4)
|
1
test/testPow.krk.expect
Normal file
1
test/testPow.krk.expect
Normal file
@ -0,0 +1 @@
|
||||
2417851639229258349412352
|
Loading…
Reference in New Issue
Block a user