Skip to content

Commit d891210

Browse files
committed
Merge pull request #11 from thinca/fix-slice-in-lhs-of-let
Fix for `let x[1 : 2] = n`
2 parents d823a89 + dcca9bb commit d891210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/vimlparser.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ function! s:VimLParser.parse_lvalue()
17031703
throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos)
17041704
endif
17051705
endif
1706-
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG
1706+
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG
17071707
return node
17081708
endif
17091709
throw s:Err('Invalid Expression', node.pos)

0 commit comments

Comments
 (0)