aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc/test.rc
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-05-04 22:52:27 -0400
committerRuss Cox <rsc@swtch.com>2020-05-04 23:41:15 -0400
commit3caf5c238a886d06b438ec6d42f2609b8625463f (patch)
treeb72b8b652b2a465eaf8aa1b5940e5192d669a337 /src/cmd/rc/test.rc
parent47d4646eebac34c0b94951cfcf1b81ed2ca513e1 (diff)
downloadplan9port-3caf5c238a886d06b438ec6d42f2609b8625463f.tar.gz
plan9port-3caf5c238a886d06b438ec6d42f2609b8625463f.tar.bz2
plan9port-3caf5c238a886d06b438ec6d42f2609b8625463f.zip
rc: move newline handling into parser
Diffstat (limited to 'src/cmd/rc/test.rc')
-rw-r--r--src/cmd/rc/test.rc27
1 files changed, 27 insertions, 0 deletions
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