try and balance precedence for prefix ops
This commit is contained in:
@@ -51,9 +51,9 @@ typedef enum {
|
||||
PRECEDENCE_SUM = 6,
|
||||
PRECEDENCE_PRODUCT = 7,
|
||||
PRECEDENCE_EXPONENT = 8,
|
||||
PRECEDENCE_PREFIX = 9,
|
||||
PRECEDENCE_CALL = 10,
|
||||
PRECEDENCE_SET = 11,
|
||||
PRECEDENCE_SET = 9,
|
||||
PRECEDENCE_PREFIX = 10,
|
||||
PRECEDENCE_CALL = 11,
|
||||
PRECEDENCE_INDEX = 12,
|
||||
PRECEDENCE_DOT = 13
|
||||
} CometPrecedenceType;
|
||||
|
||||
10
test.comet
10
test.comet
@@ -1,10 +1,8 @@
|
||||
func main() -> int {
|
||||
mut int x = (2 + 3) * (4 + 5)
|
||||
int y = x + 5
|
||||
int[*] x = new int[3]
|
||||
int[*] y = new int[3]
|
||||
|
||||
if (x + 5 == y) {
|
||||
x = 45
|
||||
}
|
||||
x:#y = 13
|
||||
|
||||
return x + 5
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user