mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 08:55:04 +01:00
implement %
This commit is contained in:
parent
b64c02cf4a
commit
d9868e3111
4 changed files with 20 additions and 3 deletions
|
|
@ -191,6 +191,7 @@ export type BinaryKind =
|
|||
| "-"
|
||||
| "*"
|
||||
| "/"
|
||||
| "%"
|
||||
| "&"
|
||||
| "|"
|
||||
| "<"
|
||||
|
|
@ -211,13 +212,14 @@ export const COMPARISON_KINDS: BinaryKind[] = [
|
|||
export const EQUALITY_KINDS: BinaryKind[] = ["==", "!="];
|
||||
export const LOGICAL_KINDS: BinaryKind[] = ["&", "|"];
|
||||
export const ARITH_TERM_KINDS: BinaryKind[] = ["+", "-"];
|
||||
export const ARITH_FACTOR_KINDS: BinaryKind[] = ["*", "/"];
|
||||
export const ARITH_FACTOR_KINDS: BinaryKind[] = ["*", "/", "%"];
|
||||
|
||||
const BINARY_KIND_PREC_CLASS = new Map<BinaryKind, number>([
|
||||
["+", 0],
|
||||
["-", 0],
|
||||
["*", 0],
|
||||
["/", 0],
|
||||
["%", 0],
|
||||
["&", 1],
|
||||
["|", 2],
|
||||
["<", 3],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue