File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1622,7 +1622,7 @@ VimLParser.prototype.parse_cmd_function = function() {
16221622 if ( left . type == NODE_IDENTIFIER ) {
16231623 var s = left . value ;
16241624 var ss = viml_split ( s , "\\zs" ) ;
1625- if ( ss [ 0 ] != "<" && ! isupper ( ss [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
1625+ if ( ss [ 0 ] != "<" && ss [ 0 ] != "_" && ! isupper ( ss [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
16261626 throw Err ( viml_printf ( "E128: Function name must start with a capital or contain a colon: %s" , s ) , left . pos ) ;
16271627 }
16281628 }
Original file line number Diff line number Diff line change @@ -1338,7 +1338,7 @@ def parse_cmd_function(self):
13381338 if left .type == NODE_IDENTIFIER :
13391339 s = left .value
13401340 ss = viml_split (s , "\\ zs" )
1341- if ss [0 ] != "<" and not isupper (ss [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
1341+ if ss [0 ] != "<" and ss [ 0 ] != "_" and not isupper (ss [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
13421342 raise VimLParserException (Err (viml_printf ("E128: Function name must start with a capital or contain a colon: %s" , s ), left .pos ))
13431343 # :function {name}
13441344 if self .reader .peekn (1 ) != "(" :
You can’t perform that action at this time.
0 commit comments