summaryrefslogtreecommitdiffstats
path: root/src/shell.pest
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-08 18:16:29 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-08 18:16:29 -0500
commit879ff29a10b07194b8240aa0a7d4cb19cf397801 (patch)
treed4f75d0aba0a799d274638d97816c98d0e8a2b55 /src/shell.pest
parent629aac44ac08f3b0d665f240038de6e70ed95533 (diff)
downloadnbsh-879ff29a10b07194b8240aa0a7d4cb19cf397801.tar.gz
nbsh-879ff29a10b07194b8240aa0a7d4cb19cf397801.zip
fix control statement parsing
Diffstat (limited to 'src/shell.pest')
-rw-r--r--src/shell.pest2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.pest b/src/shell.pest
index 118ceec..8c0e79c 100644
--- a/src/shell.pest
+++ b/src/shell.pest
@@ -35,7 +35,7 @@ control_for = ${ "for" ~ w ~ bareword ~ w ~ "in" ~ w ~ pipeline }
control_end = ${ "end" }
control = ${ control_if | control_while | control_for | control_end }
-command = ${ pipeline | control }
+command = ${ control | pipeline }
commands = ${ command ~ (w? ~ ";" ~ w? ~ command)* }
line = ${ SOI ~ w? ~ commands ~ w? ~ EOI }