@@ -1112,7 +1112,7 @@ function! s:VimLParser.parse_cmd_append()
1112
1112
endfunction
1113
1113
1114
1114
function ! s: VimLParser .parse_cmd_insert ()
1115
- return self .parse_cmd_append ()
1115
+ call self .parse_cmd_append ()
1116
1116
endfunction
1117
1117
1118
1118
function ! s: VimLParser .parse_cmd_loadkeymap ()
@@ -1170,27 +1170,27 @@ function! s:VimLParser.parse_cmd_lua()
1170
1170
endfunction
1171
1171
1172
1172
function ! s: VimLParser .parse_cmd_mzscheme ()
1173
- return self .parse_cmd_lua ()
1173
+ call self .parse_cmd_lua ()
1174
1174
endfunction
1175
1175
1176
1176
function ! s: VimLParser .parse_cmd_perl ()
1177
- return self .parse_cmd_lua ()
1177
+ call self .parse_cmd_lua ()
1178
1178
endfunction
1179
1179
1180
1180
function ! s: VimLParser .parse_cmd_python ()
1181
- return self .parse_cmd_lua ()
1181
+ call self .parse_cmd_lua ()
1182
1182
endfunction
1183
1183
1184
1184
function ! s: VimLParser .parse_cmd_python3 ()
1185
- return self .parse_cmd_lua ()
1185
+ call self .parse_cmd_lua ()
1186
1186
endfunction
1187
1187
1188
1188
function ! s: VimLParser .parse_cmd_ruby ()
1189
- return self .parse_cmd_lua ()
1189
+ call self .parse_cmd_lua ()
1190
1190
endfunction
1191
1191
1192
1192
function ! s: VimLParser .parse_cmd_tcl ()
1193
- return self .parse_cmd_lua ()
1193
+ call self .parse_cmd_lua ()
1194
1194
endfunction
1195
1195
1196
1196
function ! s: VimLParser .parse_cmd_finish ()
@@ -1202,7 +1202,7 @@ endfunction
1202
1202
1203
1203
" FIXME
1204
1204
function ! s: VimLParser .parse_cmd_usercmd ()
1205
- return self .parse_cmd_common ()
1205
+ call self .parse_cmd_common ()
1206
1206
endfunction
1207
1207
1208
1208
function ! s: VimLParser .parse_cmd_function ()
@@ -1212,13 +1212,15 @@ function! s:VimLParser.parse_cmd_function()
1212
1212
" :function
1213
1213
if self .ends_excmds (self .reader.peek ())
1214
1214
call self .reader.seek_set (pos)
1215
- return self .parse_cmd_common ()
1215
+ call self .parse_cmd_common ()
1216
+ return
1216
1217
endif
1217
1218
1218
1219
" :function /pattern
1219
1220
if self .reader.peekn (1 ) == # ' /'
1220
1221
call self .reader.seek_set (pos)
1221
- return self .parse_cmd_common ()
1222
+ call self .parse_cmd_common ()
1223
+ return
1222
1224
endif
1223
1225
1224
1226
let left = self .parse_lvalue_func ()
@@ -1235,7 +1237,8 @@ function! s:VimLParser.parse_cmd_function()
1235
1237
" :function {name}
1236
1238
if self .reader.peekn (1 ) !=# ' ('
1237
1239
call self .reader.seek_set (pos)
1238
- return self .parse_cmd_common ()
1240
+ call self .parse_cmd_common ()
1241
+ return
1239
1242
endif
1240
1243
1241
1244
" :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
@@ -1383,7 +1386,8 @@ function! s:VimLParser.parse_cmd_let()
1383
1386
" :let
1384
1387
if self .ends_excmds (self .reader.peek ())
1385
1388
call self .reader.seek_set (pos)
1386
- return self .parse_cmd_common ()
1389
+ call self .parse_cmd_common ()
1390
+ return
1387
1391
endif
1388
1392
1389
1393
let lhs = self .parse_letlhs ()
@@ -1394,7 +1398,8 @@ function! s:VimLParser.parse_cmd_let()
1394
1398
" :let {var-name} ..
1395
1399
if self .ends_excmds (s1) || (s2 !=# ' +=' && s2 !=# ' -=' && s2 !=# ' .=' && s1 !=# ' =' )
1396
1400
call self .reader.seek_set (pos)
1397
- return self .parse_cmd_common ()
1401
+ call self .parse_cmd_common ()
1402
+ return
1398
1403
endif
1399
1404
1400
1405
" :let left op right
@@ -3915,51 +3920,51 @@ function! s:Compiler.compile(node)
3915
3920
if a: node .type == s: NODE_TOPLEVEL
3916
3921
return self .compile_toplevel (a: node )
3917
3922
elseif a: node .type == s: NODE_COMMENT
3918
- return self .compile_comment (a: node )
3923
+ call self .compile_comment (a: node )
3919
3924
elseif a: node .type == s: NODE_EXCMD
3920
- return self .compile_excmd (a: node )
3925
+ call self .compile_excmd (a: node )
3921
3926
elseif a: node .type == s: NODE_FUNCTION
3922
- return self .compile_function (a: node )
3927
+ call self .compile_function (a: node )
3923
3928
elseif a: node .type == s: NODE_DELFUNCTION
3924
- return self .compile_delfunction (a: node )
3929
+ call self .compile_delfunction (a: node )
3925
3930
elseif a: node .type == s: NODE_RETURN
3926
- return self .compile_return (a: node )
3931
+ call self .compile_return (a: node )
3927
3932
elseif a: node .type == s: NODE_EXCALL
3928
- return self .compile_excall (a: node )
3933
+ call self .compile_excall (a: node )
3929
3934
elseif a: node .type == s: NODE_LET
3930
- return self .compile_let (a: node )
3935
+ call self .compile_let (a: node )
3931
3936
elseif a: node .type == s: NODE_UNLET
3932
- return self .compile_unlet (a: node )
3937
+ call self .compile_unlet (a: node )
3933
3938
elseif a: node .type == s: NODE_LOCKVAR
3934
- return self .compile_lockvar (a: node )
3939
+ call self .compile_lockvar (a: node )
3935
3940
elseif a: node .type == s: NODE_UNLOCKVAR
3936
- return self .compile_unlockvar (a: node )
3941
+ call self .compile_unlockvar (a: node )
3937
3942
elseif a: node .type == s: NODE_IF
3938
- return self .compile_if (a: node )
3943
+ call self .compile_if (a: node )
3939
3944
elseif a: node .type == s: NODE_WHILE
3940
- return self .compile_while (a: node )
3945
+ call self .compile_while (a: node )
3941
3946
elseif a: node .type == s: NODE_FOR
3942
- return self .compile_for (a: node )
3947
+ call self .compile_for (a: node )
3943
3948
elseif a: node .type == s: NODE_CONTINUE
3944
- return self .compile_continue (a: node )
3949
+ call self .compile_continue (a: node )
3945
3950
elseif a: node .type == s: NODE_BREAK
3946
- return self .compile_break (a: node )
3951
+ call self .compile_break (a: node )
3947
3952
elseif a: node .type == s: NODE_TRY
3948
- return self .compile_try (a: node )
3953
+ call self .compile_try (a: node )
3949
3954
elseif a: node .type == s: NODE_THROW
3950
- return self .compile_throw (a: node )
3955
+ call self .compile_throw (a: node )
3951
3956
elseif a: node .type == s: NODE_ECHO
3952
- return self .compile_echo (a: node )
3957
+ call self .compile_echo (a: node )
3953
3958
elseif a: node .type == s: NODE_ECHON
3954
- return self .compile_echon (a: node )
3959
+ call self .compile_echon (a: node )
3955
3960
elseif a: node .type == s: NODE_ECHOHL
3956
- return self .compile_echohl (a: node )
3961
+ call self .compile_echohl (a: node )
3957
3962
elseif a: node .type == s: NODE_ECHOMSG
3958
- return self .compile_echomsg (a: node )
3963
+ call self .compile_echomsg (a: node )
3959
3964
elseif a: node .type == s: NODE_ECHOERR
3960
- return self .compile_echoerr (a: node )
3965
+ call self .compile_echoerr (a: node )
3961
3966
elseif a: node .type == s: NODE_EXECUTE
3962
- return self .compile_execute (a: node )
3967
+ call self .compile_execute (a: node )
3963
3968
elseif a: node .type == s: NODE_TERNARY
3964
3969
return self .compile_ternary (a: node )
3965
3970
elseif a: node .type == s: NODE_OR
@@ -4079,6 +4084,7 @@ function! s:Compiler.compile(node)
4079
4084
else
4080
4085
throw printf (' Compiler: unknown node: %s' , string (a: node ))
4081
4086
endif
4087
+ return s: NIL
4082
4088
endfunction
4083
4089
4084
4090
function ! s: Compiler .compile_body (body)
0 commit comments