@@ -1112,7 +1112,7 @@ function! s:VimLParser.parse_cmd_append()
11121112endfunction
11131113
11141114function ! s: VimLParser .parse_cmd_insert ()
1115- return self .parse_cmd_append ()
1115+ call self .parse_cmd_append ()
11161116endfunction
11171117
11181118function ! s: VimLParser .parse_cmd_loadkeymap ()
@@ -1170,27 +1170,27 @@ function! s:VimLParser.parse_cmd_lua()
11701170endfunction
11711171
11721172function ! s: VimLParser .parse_cmd_mzscheme ()
1173- return self .parse_cmd_lua ()
1173+ call self .parse_cmd_lua ()
11741174endfunction
11751175
11761176function ! s: VimLParser .parse_cmd_perl ()
1177- return self .parse_cmd_lua ()
1177+ call self .parse_cmd_lua ()
11781178endfunction
11791179
11801180function ! s: VimLParser .parse_cmd_python ()
1181- return self .parse_cmd_lua ()
1181+ call self .parse_cmd_lua ()
11821182endfunction
11831183
11841184function ! s: VimLParser .parse_cmd_python3 ()
1185- return self .parse_cmd_lua ()
1185+ call self .parse_cmd_lua ()
11861186endfunction
11871187
11881188function ! s: VimLParser .parse_cmd_ruby ()
1189- return self .parse_cmd_lua ()
1189+ call self .parse_cmd_lua ()
11901190endfunction
11911191
11921192function ! s: VimLParser .parse_cmd_tcl ()
1193- return self .parse_cmd_lua ()
1193+ call self .parse_cmd_lua ()
11941194endfunction
11951195
11961196function ! s: VimLParser .parse_cmd_finish ()
@@ -1202,7 +1202,7 @@ endfunction
12021202
12031203" FIXME
12041204function ! s: VimLParser .parse_cmd_usercmd ()
1205- return self .parse_cmd_common ()
1205+ call self .parse_cmd_common ()
12061206endfunction
12071207
12081208function ! s: VimLParser .parse_cmd_function ()
@@ -1212,13 +1212,15 @@ function! s:VimLParser.parse_cmd_function()
12121212 " :function
12131213 if self .ends_excmds (self .reader.peek ())
12141214 call self .reader.seek_set (pos)
1215- return self .parse_cmd_common ()
1215+ call self .parse_cmd_common ()
1216+ return
12161217 endif
12171218
12181219 " :function /pattern
12191220 if self .reader.peekn (1 ) == # ' /'
12201221 call self .reader.seek_set (pos)
1221- return self .parse_cmd_common ()
1222+ call self .parse_cmd_common ()
1223+ return
12221224 endif
12231225
12241226 let left = self .parse_lvalue_func ()
@@ -1235,7 +1237,8 @@ function! s:VimLParser.parse_cmd_function()
12351237 " :function {name}
12361238 if self .reader.peekn (1 ) !=# ' ('
12371239 call self .reader.seek_set (pos)
1238- return self .parse_cmd_common ()
1240+ call self .parse_cmd_common ()
1241+ return
12391242 endif
12401243
12411244 " :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
@@ -1383,7 +1386,8 @@ function! s:VimLParser.parse_cmd_let()
13831386 " :let
13841387 if self .ends_excmds (self .reader.peek ())
13851388 call self .reader.seek_set (pos)
1386- return self .parse_cmd_common ()
1389+ call self .parse_cmd_common ()
1390+ return
13871391 endif
13881392
13891393 let lhs = self .parse_letlhs ()
@@ -1394,7 +1398,8 @@ function! s:VimLParser.parse_cmd_let()
13941398 " :let {var-name} ..
13951399 if self .ends_excmds (s1) || (s2 !=# ' +=' && s2 !=# ' -=' && s2 !=# ' .=' && s1 !=# ' =' )
13961400 call self .reader.seek_set (pos)
1397- return self .parse_cmd_common ()
1401+ call self .parse_cmd_common ()
1402+ return
13981403 endif
13991404
14001405 " :let left op right
@@ -3915,51 +3920,51 @@ function! s:Compiler.compile(node)
39153920 if a: node .type == s: NODE_TOPLEVEL
39163921 return self .compile_toplevel (a: node )
39173922 elseif a: node .type == s: NODE_COMMENT
3918- return self .compile_comment (a: node )
3923+ call self .compile_comment (a: node )
39193924 elseif a: node .type == s: NODE_EXCMD
3920- return self .compile_excmd (a: node )
3925+ call self .compile_excmd (a: node )
39213926 elseif a: node .type == s: NODE_FUNCTION
3922- return self .compile_function (a: node )
3927+ call self .compile_function (a: node )
39233928 elseif a: node .type == s: NODE_DELFUNCTION
3924- return self .compile_delfunction (a: node )
3929+ call self .compile_delfunction (a: node )
39253930 elseif a: node .type == s: NODE_RETURN
3926- return self .compile_return (a: node )
3931+ call self .compile_return (a: node )
39273932 elseif a: node .type == s: NODE_EXCALL
3928- return self .compile_excall (a: node )
3933+ call self .compile_excall (a: node )
39293934 elseif a: node .type == s: NODE_LET
3930- return self .compile_let (a: node )
3935+ call self .compile_let (a: node )
39313936 elseif a: node .type == s: NODE_UNLET
3932- return self .compile_unlet (a: node )
3937+ call self .compile_unlet (a: node )
39333938 elseif a: node .type == s: NODE_LOCKVAR
3934- return self .compile_lockvar (a: node )
3939+ call self .compile_lockvar (a: node )
39353940 elseif a: node .type == s: NODE_UNLOCKVAR
3936- return self .compile_unlockvar (a: node )
3941+ call self .compile_unlockvar (a: node )
39373942 elseif a: node .type == s: NODE_IF
3938- return self .compile_if (a: node )
3943+ call self .compile_if (a: node )
39393944 elseif a: node .type == s: NODE_WHILE
3940- return self .compile_while (a: node )
3945+ call self .compile_while (a: node )
39413946 elseif a: node .type == s: NODE_FOR
3942- return self .compile_for (a: node )
3947+ call self .compile_for (a: node )
39433948 elseif a: node .type == s: NODE_CONTINUE
3944- return self .compile_continue (a: node )
3949+ call self .compile_continue (a: node )
39453950 elseif a: node .type == s: NODE_BREAK
3946- return self .compile_break (a: node )
3951+ call self .compile_break (a: node )
39473952 elseif a: node .type == s: NODE_TRY
3948- return self .compile_try (a: node )
3953+ call self .compile_try (a: node )
39493954 elseif a: node .type == s: NODE_THROW
3950- return self .compile_throw (a: node )
3955+ call self .compile_throw (a: node )
39513956 elseif a: node .type == s: NODE_ECHO
3952- return self .compile_echo (a: node )
3957+ call self .compile_echo (a: node )
39533958 elseif a: node .type == s: NODE_ECHON
3954- return self .compile_echon (a: node )
3959+ call self .compile_echon (a: node )
39553960 elseif a: node .type == s: NODE_ECHOHL
3956- return self .compile_echohl (a: node )
3961+ call self .compile_echohl (a: node )
39573962 elseif a: node .type == s: NODE_ECHOMSG
3958- return self .compile_echomsg (a: node )
3963+ call self .compile_echomsg (a: node )
39593964 elseif a: node .type == s: NODE_ECHOERR
3960- return self .compile_echoerr (a: node )
3965+ call self .compile_echoerr (a: node )
39613966 elseif a: node .type == s: NODE_EXECUTE
3962- return self .compile_execute (a: node )
3967+ call self .compile_execute (a: node )
39633968 elseif a: node .type == s: NODE_TERNARY
39643969 return self .compile_ternary (a: node )
39653970 elseif a: node .type == s: NODE_OR
@@ -4079,6 +4084,7 @@ function! s:Compiler.compile(node)
40794084 else
40804085 throw printf (' Compiler: unknown node: %s' , string (a: node ))
40814086 endif
4087+ return s: NIL
40824088endfunction
40834089
40844090function ! s: Compiler .compile_body (body)
0 commit comments