Allow whitespace around JavaScript function arguments

Closes #1530
This commit is contained in:
Tobie Morgan Hitchcock 2022-12-17 16:23:20 +00:00
parent 1a0bf7f1eb
commit 0c2fe82f32

View file

@ -177,7 +177,9 @@ fn script(i: &str) -> IResult<&str, Function> {
let (i, _) = alt((tag("fn::script"), tag("fn"), tag("function")))(i)?;
let (i, _) = mightbespace(i)?;
let (i, _) = tag("(")(i)?;
let (i, _) = mightbespace(i)?;
let (i, a) = separated_list0(commas, value)(i)?;
let (i, _) = mightbespace(i)?;
let (i, _) = tag(")")(i)?;
let (i, _) = mightbespace(i)?;
let (i, _) = char('{')(i)?;