bin op stuff
This commit is contained in:
+32
-61
@@ -513,23 +513,6 @@ decrement = {
|
||||
"--"
|
||||
}
|
||||
|
||||
compound_assign = {
|
||||
"="
|
||||
| "+="
|
||||
| "-="
|
||||
| "/="
|
||||
| "%="
|
||||
| "&="
|
||||
| "|="
|
||||
| "^="
|
||||
| "<<="
|
||||
| ">>="
|
||||
}
|
||||
|
||||
assign = {
|
||||
compound_assign ~ expr
|
||||
}
|
||||
|
||||
postfix = {
|
||||
field_px
|
||||
| call_px
|
||||
@@ -540,7 +523,6 @@ postfix = {
|
||||
| try_px
|
||||
| increment
|
||||
| decrement
|
||||
| assign
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
@@ -564,51 +546,40 @@ prefix = {
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
// OPERATORS (Arranged carefully for PEG priority matching)
|
||||
// OPERATORS
|
||||
// ------------------------------------------------------
|
||||
|
||||
shl = { "<<" }
|
||||
shr = { ">>" }
|
||||
range_inc = { "..=" }
|
||||
range_exc = { ".." }
|
||||
lte = { "<=" }
|
||||
gte = { ">=" }
|
||||
eq = { "==" }
|
||||
neq = { "!=" }
|
||||
and = { "&&" }
|
||||
or = { "||" }
|
||||
add = { "+" }
|
||||
sub = { "-" }
|
||||
mul = { "*" }
|
||||
div = { "/" }
|
||||
rem = { "%" }
|
||||
lt = { "<" }
|
||||
gt = { ">" }
|
||||
bitand = { "&" }
|
||||
bitor = { "|" }
|
||||
bitxor = { "^" }
|
||||
|
||||
bin_op = _{
|
||||
shl
|
||||
| shr
|
||||
| range_inc
|
||||
| range_exc
|
||||
| lte
|
||||
| gte
|
||||
| eq
|
||||
| neq
|
||||
| and
|
||||
| or
|
||||
| lt
|
||||
| gt
|
||||
| add
|
||||
| sub
|
||||
| mul
|
||||
| div
|
||||
| rem
|
||||
| bitand
|
||||
| bitor
|
||||
| bitxor
|
||||
bin_op = {
|
||||
"+="
|
||||
| "-="
|
||||
| "/="
|
||||
| "%="
|
||||
| "&="
|
||||
| "|="
|
||||
| "^="
|
||||
| "<<="
|
||||
| ">>="
|
||||
| "<<"
|
||||
| ">>"
|
||||
| "..="
|
||||
| ".."
|
||||
| "<="
|
||||
| ">="
|
||||
| "=="
|
||||
| "!="
|
||||
| "&&"
|
||||
| "||"
|
||||
| "+"
|
||||
| "-"
|
||||
| "*"
|
||||
| "/"
|
||||
| "%"
|
||||
| "<"
|
||||
| ">"
|
||||
| "&"
|
||||
| "|"
|
||||
| "^"
|
||||
| "="
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user