Skip to content

Commit a9aad6c

Browse files
committed
update generated code
1 parent 4a54801 commit a9aad6c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

js/vimlparser.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

py/vimlparser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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) != "(":

0 commit comments

Comments
 (0)