Convert 'for' to a statement (#7086)

This commit is contained in:
JT
2022-11-11 09:05:34 +13:00
committed by GitHub
parent f1118020a1
commit 18d7e64660
5 changed files with 77 additions and 114 deletions

View File

@ -4732,6 +4732,16 @@ pub fn parse_expression(
spans[0],
)),
),
b"for" => (
parse_call(
working_set,
&spans[pos..],
spans[0],
expand_aliases_denylist,
)
.0,
Some(ParseError::BuiltinCommandInPipeline("for".into(), spans[0])),
),
b"let" => (
parse_call(
working_set,
@ -4866,7 +4876,6 @@ pub fn parse_expression(
)),
),
b"for" => parse_for(working_set, spans, expand_aliases_denylist),
_ => parse_call(
working_set,
&spans[pos..],