mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Number sign comment (# bla bla) is a kind of newline character
This commit is contained in:
parent
bc0da8e3ff
commit
49b4507fd3
1 changed files with 2 additions and 2 deletions
|
@ -332,7 +332,7 @@ class RubyLex
|
|||
depth_difference = 0
|
||||
@tokens.each_with_index do |t, index|
|
||||
case t[1]
|
||||
when :on_ignored_nl, :on_nl
|
||||
when :on_ignored_nl, :on_nl, :on_comment
|
||||
if index != (@tokens.size - 1)
|
||||
depth_difference = 0
|
||||
end
|
||||
|
@ -381,7 +381,7 @@ class RubyLex
|
|||
@tokens.each_with_index do |t, index|
|
||||
corresponding_token_depth = nil
|
||||
case t[1]
|
||||
when :on_ignored_nl, :on_nl
|
||||
when :on_ignored_nl, :on_nl, :on_comment
|
||||
spaces_at_line_head = 0
|
||||
is_first_spaces_of_line = true
|
||||
is_first_printable_of_line = true
|
||||
|
|
Loading…
Add table
Reference in a new issue