From 9900b0dae9a6f41c7780981417b003a450323eb3 Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Thu, 25 Apr 2024 08:27:31 -0400 Subject: [PATCH] fix parsing multiple arg tokens The `Comma` token needs to be popped in order to move the logic forward and let the loop work on the next token. --- src/command/parser.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command/parser.rs b/src/command/parser.rs index f895906..3af17d5 100644 --- a/src/command/parser.rs +++ b/src/command/parser.rs @@ -235,6 +235,7 @@ impl<'a> FunctionCall<'a> { if input.front().map(|t| t.token()) != Some(TokenKind::Comma) { break; } + input.pop_front(); } expect_token(input, |t| t == TokenKind::ClosedParen)?; Ok(Some(FunctionCall {