From 56a17f4d966b2d53cd19a8ccc5ea237cd4cb13c2 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Fri, 28 Sep 2018 14:11:01 +0300 Subject: expr: add missing modulo operation --- src/compiler/expr.lm | 1 + 1 file changed, 1 insertion(+) (limited to 'src/compiler') diff --git a/src/compiler/expr.lm b/src/compiler/expr.lm index c5548cc..b17cc39 100644 --- a/src/compiler/expr.lm +++ b/src/compiler/expr.lm @@ -167,6 +167,7 @@ context collapser | [number::type WS `~] { lhs.value = parse value[$bitnot(r1.value)] } | [number::type WS number::type WS `*] { lhs.value = parse value[$(r1.value * r3.value)] } | [number::type WS number::type WS `/] { lhs.value = parse value[$(r1.value / r3.value)] } + | [number::type WS number::type WS `%] { lhs.value = parse value[$modulo(r1.value, r3.value)] } | [number::type WS number::type WS `#+] { lhs.value = parse value[$(r1.value + r3.value)] } | [number::type WS number::type WS `#-] { lhs.value = parse value[$(r1.value - r3.value)] } | [number::type WS number::type WS `<<] { lhs.value = parse value[$shiftl(r1.value, r3.value)] } -- cgit v1.2.3-70-g09d2