From 00ebc52dd6c8c5bc85795cd1eec6552ca49954e7 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 18 Dec 2021 21:46:14 +1100 Subject: [PATCH] oceani: exercise more parsing options for blocks. This tests some untested code. Signed-off-by: NeilBrown --- csrc/oceani-tests.mdc | 7 +++++++ csrc/oceani.mdc | 8 +++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/csrc/oceani-tests.mdc b/csrc/oceani-tests.mdc index 0b7c76a..d262881 100644 --- a/csrc/oceani-tests.mdc +++ b/csrc/oceani-tests.mdc @@ -702,6 +702,13 @@ Test functions. They don't return anything, so we need to get them to print do n = 4 // xkcd:221 + // exercise the parsing options + func t1 (a:number) { + print "t1" + } + func t2 (a:string) {print "string"} + func t3() print "t3" + ###### output: functions done 1 done diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 6723b14..cd37f1b 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -4550,12 +4550,10 @@ the common header for all reductions to use. $TERM { } ; $*binode - Block -> { IN OptNL Statementlist OUT OptNL } ${ $0 = $ { IN OptNL Statementlist OUT OptNL } ${ $0 = $