Skip to content

Commit c43d781

Browse files
committed
fixed parse error for last comma in arglist
1 parent 73c9766 commit c43d781

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autoload/vimlparser.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,6 +3047,11 @@ function! s:ExprParser.parse_expr8()
30473047
call add(node.rlist, self.parse_expr1())
30483048
let token = self.tokenizer.get()
30493049
if token.type == s:TOKEN_COMMA
3050+
" TODO: Vim allows foo(a, b, ). Lint should be warn it.
3051+
if self.tokenizer.peek().type == s:TOKEN_PCLOSE
3052+
call self.tokenizer.get()
3053+
break
3054+
endif
30503055
elseif token.type == s:TOKEN_PCLOSE
30513056
break
30523057
else

0 commit comments

Comments
 (0)