mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 23:45:55 +02:00
parent
31ef2f43a7
commit
6b76a765ab
2 changed files with 13 additions and 6 deletions
|
@ -2500,11 +2500,22 @@ module Prism
|
||||||
# yield 1
|
# yield 1
|
||||||
# ^^^^^^^
|
# ^^^^^^^
|
||||||
def visit_yield_node(node)
|
def visit_yield_node(node)
|
||||||
if node.arguments.nil?
|
if node.arguments.nil? && node.lparen_loc.nil?
|
||||||
bounds(node.location)
|
bounds(node.location)
|
||||||
on_yield0
|
on_yield0
|
||||||
else
|
else
|
||||||
arguments = visit(node.arguments)
|
arguments =
|
||||||
|
if node.arguments.nil?
|
||||||
|
bounds(node.location)
|
||||||
|
on_args_new
|
||||||
|
else
|
||||||
|
visit(node.arguments)
|
||||||
|
end
|
||||||
|
|
||||||
|
unless node.lparen_loc.nil?
|
||||||
|
bounds(node.lparen_loc)
|
||||||
|
arguments = on_paren(arguments)
|
||||||
|
end
|
||||||
|
|
||||||
bounds(node.location)
|
bounds(node.location)
|
||||||
on_yield(arguments)
|
on_yield(arguments)
|
||||||
|
|
|
@ -167,7 +167,6 @@ module Prism
|
||||||
seattlerb/str_single_double_escaped_newline.txt
|
seattlerb/str_single_double_escaped_newline.txt
|
||||||
seattlerb/thingy.txt
|
seattlerb/thingy.txt
|
||||||
seattlerb/yield_call_assocs.txt
|
seattlerb/yield_call_assocs.txt
|
||||||
seattlerb/yield_empty_parens.txt
|
|
||||||
single_method_call_with_bang.txt
|
single_method_call_with_bang.txt
|
||||||
spanning_heredoc.txt
|
spanning_heredoc.txt
|
||||||
spanning_heredoc_newlines.txt
|
spanning_heredoc_newlines.txt
|
||||||
|
@ -197,7 +196,6 @@ module Prism
|
||||||
unparser/corpus/literal/since/27.txt
|
unparser/corpus/literal/since/27.txt
|
||||||
unparser/corpus/literal/since/31.txt
|
unparser/corpus/literal/since/31.txt
|
||||||
unparser/corpus/literal/while.txt
|
unparser/corpus/literal/while.txt
|
||||||
unparser/corpus/literal/yield.txt
|
|
||||||
unparser/corpus/semantic/dstr.txt
|
unparser/corpus/semantic/dstr.txt
|
||||||
unparser/corpus/semantic/literal.txt
|
unparser/corpus/semantic/literal.txt
|
||||||
unparser/corpus/semantic/while.txt
|
unparser/corpus/semantic/while.txt
|
||||||
|
@ -276,9 +274,7 @@ module Prism
|
||||||
whitequark/ternary.txt
|
whitequark/ternary.txt
|
||||||
whitequark/ternary_ambiguous_symbol.txt
|
whitequark/ternary_ambiguous_symbol.txt
|
||||||
whitequark/trailing_forward_arg.txt
|
whitequark/trailing_forward_arg.txt
|
||||||
whitequark/yield.txt
|
|
||||||
xstring.txt
|
xstring.txt
|
||||||
yield.txt
|
|
||||||
]
|
]
|
||||||
|
|
||||||
relatives.each do |relative|
|
relatives.each do |relative|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue