mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Check the end token of heredoc correctly
This commit is contained in:
parent
5a229b0a88
commit
55c34b994b
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ class RubyLex
|
|||
return false
|
||||
elsif !@tokens.empty? and @tokens.last[2] == "\\\n"
|
||||
return true
|
||||
elsif @tokens.size >= 1 and @tokens[-1][1] == :on_heredoc_end # "EOH\n"
|
||||
return false
|
||||
elsif @tokens.size >= 2 and @tokens[-2][3].anybits?(continued_bits)
|
||||
# end of literal except for regexp
|
||||
return true
|
||||
|
|
Loading…
Add table
Reference in a new issue