@@ -1211,7 +1211,7 @@ function! s:VimLParser.parse_cmd_append()
12111211endfunction
12121212
12131213function ! s: VimLParser .parse_cmd_insert ()
1214- return self .parse_cmd_append ()
1214+ call self .parse_cmd_append ()
12151215endfunction
12161216
12171217function ! s: VimLParser .parse_cmd_loadkeymap ()
@@ -1270,27 +1270,27 @@ function! s:VimLParser.parse_cmd_lua()
12701270endfunction
12711271
12721272function ! s: VimLParser .parse_cmd_mzscheme ()
1273- return self .parse_cmd_lua ()
1273+ call self .parse_cmd_lua ()
12741274endfunction
12751275
12761276function ! s: VimLParser .parse_cmd_perl ()
1277- return self .parse_cmd_lua ()
1277+ call self .parse_cmd_lua ()
12781278endfunction
12791279
12801280function ! s: VimLParser .parse_cmd_python ()
1281- return self .parse_cmd_lua ()
1281+ call self .parse_cmd_lua ()
12821282endfunction
12831283
12841284function ! s: VimLParser .parse_cmd_python3 ()
1285- return self .parse_cmd_lua ()
1285+ call self .parse_cmd_lua ()
12861286endfunction
12871287
12881288function ! s: VimLParser .parse_cmd_ruby ()
1289- return self .parse_cmd_lua ()
1289+ call self .parse_cmd_lua ()
12901290endfunction
12911291
12921292function ! s: VimLParser .parse_cmd_tcl ()
1293- return self .parse_cmd_lua ()
1293+ call self .parse_cmd_lua ()
12941294endfunction
12951295
12961296function ! s: VimLParser .parse_cmd_finish ()
@@ -1302,7 +1302,7 @@ endfunction
13021302
13031303" FIXME
13041304function ! s: VimLParser .parse_cmd_usercmd ()
1305- return self .parse_cmd_common ()
1305+ call self .parse_cmd_common ()
13061306endfunction
13071307
13081308function ! s: VimLParser .parse_cmd_function ()
@@ -1312,13 +1312,15 @@ function! s:VimLParser.parse_cmd_function()
13121312 " :function
13131313 if self .ends_excmds (self .reader.peek ())
13141314 call self .reader.seek_set (pos)
1315- return self .parse_cmd_common ()
1315+ call self .parse_cmd_common ()
1316+ return
13161317 endif
13171318
13181319 " :function /pattern
13191320 if self .reader.peekn (1 ) == # ' /'
13201321 call self .reader.seek_set (pos)
1321- return self .parse_cmd_common ()
1322+ call self .parse_cmd_common ()
1323+ return
13221324 endif
13231325
13241326 let left = self .parse_lvalue_func ()
@@ -1335,7 +1337,8 @@ function! s:VimLParser.parse_cmd_function()
13351337 " :function {name}
13361338 if self .reader.peekn (1 ) !=# ' ('
13371339 call self .reader.seek_set (pos)
1338- return self .parse_cmd_common ()
1340+ call self .parse_cmd_common ()
1341+ return
13391342 endif
13401343
13411344 " :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
@@ -1482,7 +1485,8 @@ function! s:VimLParser.parse_cmd_let()
14821485 " :let
14831486 if self .ends_excmds (self .reader.peek ())
14841487 call self .reader.seek_set (pos)
1485- return self .parse_cmd_common ()
1488+ call self .parse_cmd_common ()
1489+ return
14861490 endif
14871491
14881492 let lhs = self .parse_letlhs ()
@@ -1493,7 +1497,8 @@ function! s:VimLParser.parse_cmd_let()
14931497 " :let {var-name} ..
14941498 if self .ends_excmds (s1) || (s2 !=# ' +=' && s2 !=# ' -=' && s2 !=# ' .=' && s1 !=# ' =' )
14951499 call self .reader.seek_set (pos)
1496- return self .parse_cmd_common ()
1500+ call self .parse_cmd_common ()
1501+ return
14971502 endif
14981503
14991504 " :let left op right
@@ -4021,51 +4026,74 @@ function! s:Compiler.compile(node)
40214026 if a: node .type == s: NODE_TOPLEVEL
40224027 return self .compile_toplevel (a: node )
40234028 elseif a: node .type == s: NODE_COMMENT
4024- return self .compile_comment (a: node )
4029+ call self .compile_comment (a: node )
4030+ return s: NIL
40254031 elseif a: node .type == s: NODE_EXCMD
4026- return self .compile_excmd (a: node )
4032+ call self .compile_excmd (a: node )
4033+ return s: NIL
40274034 elseif a: node .type == s: NODE_FUNCTION
4028- return self .compile_function (a: node )
4035+ call self .compile_function (a: node )
4036+ return s: NIL
40294037 elseif a: node .type == s: NODE_DELFUNCTION
4030- return self .compile_delfunction (a: node )
4038+ call self .compile_delfunction (a: node )
4039+ return s: NIL
40314040 elseif a: node .type == s: NODE_RETURN
4032- return self .compile_return (a: node )
4041+ call self .compile_return (a: node )
4042+ return s: NIL
40334043 elseif a: node .type == s: NODE_EXCALL
4034- return self .compile_excall (a: node )
4044+ call self .compile_excall (a: node )
4045+ return s: NIL
40354046 elseif a: node .type == s: NODE_LET
4036- return self .compile_let (a: node )
4047+ call self .compile_let (a: node )
4048+ return s: NIL
40374049 elseif a: node .type == s: NODE_UNLET
4038- return self .compile_unlet (a: node )
4050+ call self .compile_unlet (a: node )
4051+ return s: NIL
40394052 elseif a: node .type == s: NODE_LOCKVAR
4040- return self .compile_lockvar (a: node )
4053+ call self .compile_lockvar (a: node )
4054+ return s: NIL
40414055 elseif a: node .type == s: NODE_UNLOCKVAR
4042- return self .compile_unlockvar (a: node )
4056+ call self .compile_unlockvar (a: node )
4057+ return s: NIL
40434058 elseif a: node .type == s: NODE_IF
4044- return self .compile_if (a: node )
4059+ call self .compile_if (a: node )
4060+ return s: NIL
40454061 elseif a: node .type == s: NODE_WHILE
4046- return self .compile_while (a: node )
4062+ call self .compile_while (a: node )
4063+ return s: NIL
40474064 elseif a: node .type == s: NODE_FOR
4048- return self .compile_for (a: node )
4065+ call self .compile_for (a: node )
4066+ return s: NIL
40494067 elseif a: node .type == s: NODE_CONTINUE
4050- return self .compile_continue (a: node )
4068+ call self .compile_continue (a: node )
4069+ return s: NIL
40514070 elseif a: node .type == s: NODE_BREAK
4052- return self .compile_break (a: node )
4071+ call self .compile_break (a: node )
4072+ return s: NIL
40534073 elseif a: node .type == s: NODE_TRY
4054- return self .compile_try (a: node )
4074+ call self .compile_try (a: node )
4075+ return s: NIL
40554076 elseif a: node .type == s: NODE_THROW
4056- return self .compile_throw (a: node )
4077+ call self .compile_throw (a: node )
4078+ return s: NIL
40574079 elseif a: node .type == s: NODE_ECHO
4058- return self .compile_echo (a: node )
4080+ call self .compile_echo (a: node )
4081+ return s: NIL
40594082 elseif a: node .type == s: NODE_ECHON
4060- return self .compile_echon (a: node )
4083+ call self .compile_echon (a: node )
4084+ return s: NIL
40614085 elseif a: node .type == s: NODE_ECHOHL
4062- return self .compile_echohl (a: node )
4086+ call self .compile_echohl (a: node )
4087+ return s: NIL
40634088 elseif a: node .type == s: NODE_ECHOMSG
4064- return self .compile_echomsg (a: node )
4089+ call self .compile_echomsg (a: node )
4090+ return s: NIL
40654091 elseif a: node .type == s: NODE_ECHOERR
4066- return self .compile_echoerr (a: node )
4092+ call self .compile_echoerr (a: node )
4093+ return s: NIL
40674094 elseif a: node .type == s: NODE_EXECUTE
4068- return self .compile_execute (a: node )
4095+ call self .compile_execute (a: node )
4096+ return s: NIL
40694097 elseif a: node .type == s: NODE_TERNARY
40704098 return self .compile_ternary (a: node )
40714099 elseif a: node .type == s: NODE_OR
@@ -4185,6 +4213,7 @@ function! s:Compiler.compile(node)
41854213 else
41864214 throw printf (' Compiler: unknown node: %s' , string (a: node ))
41874215 endif
4216+ return s: NIL
41884217endfunction
41894218
41904219function ! s: Compiler .compile_body (body)
0 commit comments