From 53ec113f81d2e0a9f114482e7ca25dec36e0ef29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind?= Date: Sat, 23 Apr 2022 23:08:12 +0200 Subject: [PATCH] Added an extention to the relation --- exercises/06/vslc/src/parser.y | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exercises/06/vslc/src/parser.y b/exercises/06/vslc/src/parser.y index 1057d47..85a364f 100644 --- a/exercises/06/vslc/src/parser.y +++ b/exercises/06/vslc/src/parser.y @@ -219,6 +219,11 @@ relation: | expression '>' expression { $$ = NODE(RELATION, strdup(">"), 2, $1, $3); } + /* This can actually be extented with the following (with some minor tweaks to the generator.c) + | expression { + $$ = NODE(RELATION, NULL, 1, $1); + } + That will allow to have "if 1 then" or "while 1 do" */ ; expression: