rc: move newline handling into parser

This commit is contained in:
Russ Cox 2020-05-04 22:52:27 -04:00
parent 47d4646eeb
commit 3caf5c238a
6 changed files with 67 additions and 24 deletions

View file

@ -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