We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7d1417 commit 0c88682Copy full SHA for 0c88682
src/Parser/JsonPathParser.php
@@ -336,13 +336,15 @@ protected function parseFunction(): FunctionNode
336
337
$this->consume(LeftParenthesisToken::class);
338
339
- $argumentNodes = [
340
- $this->parseFunctionArgument()
341
- ];
+ $argumentNodes = [];
342
343
- while ($this->getCurrentToken()::class === CommaToken::class) {
344
- $this->consume(CommaToken::class);
+ if ($this->getCurrentToken()::class !== RightParenthesisToken::class) {
345
$argumentNodes[] = $this->parseFunctionArgument();
+
+ while ($this->getCurrentToken()::class === CommaToken::class) {
+ $this->consume(CommaToken::class);
346
+ $argumentNodes[] = $this->parseFunctionArgument();
347
+ }
348
}
349
350
$this->consume(RightParenthesisToken::class);
0 commit comments