mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
EXPR_CMDARG also indicates the end of an expression
This commit is contained in:
parent
7172ab0ec5
commit
d6bcf36793
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ class RubyLex
|
||||||
|
|
||||||
def check_newline_depth_difference
|
def check_newline_depth_difference
|
||||||
depth_difference = 0
|
depth_difference = 0
|
||||||
if @tokens.size >= 2 and @tokens.last[2].end_with?("\n") and @tokens[-2][3].nobits?(Ripper::EXPR_END | Ripper::EXPR_ENDFN)
|
if @tokens.size >= 2 and @tokens.last[2].end_with?("\n") and @tokens[-2][3].nobits?(Ripper::EXPR_END | Ripper::EXPR_ENDFN | Ripper::EXPR_CMDARG)
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@tokens.each_with_index do |t, index|
|
@tokens.each_with_index do |t, index|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue