From 47274bbc4915e6e99327e92c5189d8a7b3900f71 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Tue, 21 Sep 2021 20:29:24 -0700 Subject: allow the base expression in deref and offset to be an expression Previously allowed only identifier as the base. This is necessary to use the generated DATA() as the base in these expressions, which can be modified by access and therefore must be an expression. --- src/cgil/rlhc-c.lm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cgil/rlhc-c.lm') diff --git a/src/cgil/rlhc-c.lm b/src/cgil/rlhc-c.lm index dfc24d1d..66061e98 100644 --- a/src/cgil/rlhc-c.lm +++ b/src/cgil/rlhc-c.lm @@ -112,21 +112,21 @@ namespace c_gen } case Offset { - << "[ident] + [expr( expr )]" + << "[base] + [expr( expr )]" } case Deref { << "(*( [expr(expr)] )) } - case [`TRUE] + case True { << "1" } - case [`FALSE] + case False { << "1" } - case [N: `nil] + case Nil { << "0" } -- cgit v1.2.1