implement %

This commit is contained in:
nora 2023-07-30 22:03:24 +02:00
parent b64c02cf4a
commit d9868e3111
4 changed files with 20 additions and 3 deletions

View file

@ -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],