mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
A preceding token of "do" of block has EXPR_CMDARG or EXPR_ENDFN
meth do # the preceding token of "do" has EXPR_CMDARG end meth() do # the preceding token of "do" has EXPR_ENDFN end
This commit is contained in:
parent
49b4507fd3
commit
19a310b0ac
1 changed files with 2 additions and 2 deletions
|
@ -306,7 +306,7 @@ class RubyLex
|
|||
next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
|
||||
case t[2]
|
||||
when 'do'
|
||||
if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_CMDARG)
|
||||
if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN)
|
||||
# method_with_bock do; end
|
||||
indent += 1
|
||||
else
|
||||
|
@ -349,7 +349,7 @@ class RubyLex
|
|||
next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
|
||||
case t[2]
|
||||
when 'do'
|
||||
if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_CMDARG)
|
||||
if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN)
|
||||
# method_with_bock do; end
|
||||
depth_difference += 1
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue