Fix parser for empty argument lists

This commit is contained in:
John Lorentzson 2025-07-06 22:21:40 +02:00
parent 156edc2f09
commit 5d9932637d

View file

@ -145,9 +145,12 @@ parser's debug output.")
(setf name (match-syntax primary))
(cond ((and (typep name 'token-name)
(match-token 'token-open-paren))
(setf arguments (match-syntax arglist))
(consume-token 'token-close-paren
"Close parenthesis ')' is required to end function call argument list.")
(cond ((match-token 'token-close-paren)
(setf arguments '()))
(t
(setf arguments (match-syntax arglist))
(consume-token 'token-close-paren
"Close parenthesis ')' is required to end function call argument list.")))
(make-instance 'node-call
:source *syntax-source*
:comment *token-comment*