From: NeilBrown Date: Sat, 18 Dec 2021 10:46:14 +0000 (+1100) Subject: oceani: exercise more parsing options for blocks. X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=00ebc52dd6c8c5bc85795cd1eec6552ca49954e7 oceani: exercise more parsing options for blocks. This tests some untested code. Signed-off-by: NeilBrown --- 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 = $