From 879ff29a10b07194b8240aa0a7d4cb19cf397801 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 8 Jan 2022 18:16:29 -0500 Subject: fix control statement parsing --- src/shell.pest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shell.pest') 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 } -- cgit v1.2.3-54-g00ecf