function arg spans include the entire list

This commit is contained in:
ConnorSkees 2020-04-13 12:20:56 -04:00
parent f0895db939
commit 2b784f273a

View File

@ -283,7 +283,7 @@ pub(crate) fn eat_call_args<I: Iterator<Item = Token>>(
devour_whitespace_or_comment(toks)?;
let mut name = String::new();
let mut val: Vec<Token> = Vec::new();
let span = toks.peek().unwrap().pos();
let mut span = toks.peek().unwrap().pos();
loop {
match toks.peek().unwrap().kind {
'$' => {
@ -324,6 +324,7 @@ pub(crate) fn eat_call_args<I: Iterator<Item = Token>>(
},
val,
);
span = span.merge(tok.pos());
return Ok(CallArgs(args, span));
}
',' => break,