From 3caf5c238a886d06b438ec6d42f2609b8625463f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 4 May 2020 22:52:27 -0400 Subject: rc: move newline handling into parser --- src/cmd/rc/test.rc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/cmd/rc/test.rc') diff --git a/src/cmd/rc/test.rc b/src/cmd/rc/test.rc index 8cb11e0f..5c658132 100644 --- a/src/cmd/rc/test.rc +++ b/src/cmd/rc/test.rc @@ -36,3 +36,30 @@ $#$x x for in while if not ~ ! @ switch fn x not$y a;b;c +if(x) +y +if(x) +{ +y +} +if not +z +for(x) +y +for(x in y) +z +while(x) +y +# yacc doesn't accept a newline before the brace +# even though the rule is written as if it would +switch x { +} +switch (x) { +} +z +x && +y +x || +y +x | +y -- cgit v1.2.3