File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1464,7 +1464,8 @@ VimLParser.prototype.parse_cmd_function = function() {
14641464 this . reader . skip_white ( ) ;
14651465 if ( left . type == NODE_IDENTIFIER ) {
14661466 var s = left . value ;
1467- if ( s [ 0 ] != "<" && ! isupper ( s [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
1467+ var ss = viml_split ( s , "\\zs" ) ;
1468+ if ( ss [ 0 ] != "<" && ! isupper ( ss [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
14681469 throw Err ( viml_printf ( "E128: Function name must start with a capital or contain a colon: %s" , s ) , left . pos ) ;
14691470 }
14701471 }
Original file line number Diff line number Diff line change @@ -1176,7 +1176,8 @@ def parse_cmd_function(self):
11761176 self .reader .skip_white ()
11771177 if left .type == NODE_IDENTIFIER :
11781178 s = left .value
1179- if s [0 ] != "<" and not isupper (s [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
1179+ ss = viml_split (s , "\\ zs" )
1180+ if ss [0 ] != "<" and not isupper (ss [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
11801181 raise VimLParserException (Err (viml_printf ("E128: Function name must start with a capital or contain a colon: %s" , s ), left .pos ))
11811182 # :function {name}
11821183 if self .reader .peekn (1 ) != "(" :
You can’t perform that action at this time.
0 commit comments