File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1511,13 +1511,17 @@ function! s:VimLParser.parse_heredoc()
15111511 let node.op = words[-1 ]
15121512 let lines = []
15131513 call self .parse_trail ()
1514- while self .reader.peek () !=# ' <EOF>'
1515- let line = self .reader.readline ()
1514+ while s: TRUE
1515+ if self .reader.peek () == # ' <EOF>'
1516+ break
1517+ endif
1518+ let line = self .reader.getn (-1 )
15161519 if line == # node.op
15171520 let node.str = join (lines , " \n " ) . " \n "
15181521 return node
15191522 endif
15201523 call add (lines , line )
1524+ call self .reader.get ()
15211525 endwhile
15221526 return s: NIL
15231527endfunction
@@ -1566,6 +1570,7 @@ function! s:VimLParser.parse_cmd_let()
15661570 elseif s2 == # ' =<<'
15671571 call self .reader.getn (len (s2))
15681572 call self .reader.skip_white ()
1573+ let node.op = ' ='
15691574 let node.right = self .parse_heredoc ()
15701575 call self .add_node (node)
15711576 return
Original file line number Diff line number Diff line change 1- (let a (heredoc () "EOS" "hello\n world\n")))
1+ (let = a (heredoc () "EOS" "hello\n world\n")))
2+ (let = a (heredoc (trim) "EOS" "\thello\nworld\n")))
Original file line number Diff line number Diff line change @@ -2,3 +2,7 @@ let a =<< EOS
22hello
33 world
44EOS
5+ let a = << trim EOS
6+ hello
7+ world
8+ EOS
You can’t perform that action at this time.
0 commit comments