зеркало из https://github.com/github/ruby.git
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:
Родитель
49b4507fd3
Коммит
19a310b0ac
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче