This tests some untested code.
Signed-off-by: NeilBrown <neil@brown.name>
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
$TERM { } ;
$*binode
- Block -> { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl; // UNTESTED
- }$
- | { SimpleStatements } ${ $0 = reorder_bilist($<SS); // UNTESTED
- }$
+ Block -> { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl; }$
+ | { SimpleStatements } ${ $0 = reorder_bilist($<SS); }$
| SimpleStatements ; ${ $0 = reorder_bilist($<SS); }$
- | SimpleStatements EOL ${ $0 = reorder_bilist($<SS); // UNTESTED
+ | SimpleStatements EOL ${ $0 = reorder_bilist($<SS);
}$
| IN OptNL Statementlist OUT ${ $0 = $<Sl; }$