Class: Rubinius::AST::Yield
- Inherits:
-
SendWithArguments
- Object
- Node
- Send
- SendWithArguments
- Rubinius::AST::Yield
- Defined in:
- lib/compiler/ast/sends.rb
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
Attributes inherited from SendWithArguments
Attributes inherited from Send
#block, #check_for_local, #name, #privately, #receiver, #variable
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, arguments, unwrap) ⇒ Yield
constructor
A new instance of Yield.
- #to_sexp ⇒ Object
Methods inherited from SendWithArguments
Methods inherited from Send
#arguments_sexp, #check_local_reference, #receiver_sexp, #sexp_name
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, arguments, unwrap) ⇒ Yield
Returns a new instance of Yield.
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/compiler/ast/sends.rb', line 578 def initialize(line, arguments, unwrap) @line = line if arguments.kind_of? ArrayLiteral and not unwrap arguments = ArrayLiteral.new line, [arguments] end @arguments = ActualArguments.new line, arguments @argument_count = @arguments.size @yield_splat = false if @arguments.splat? splat = @arguments.splat.value if (splat.kind_of? ArrayLiteral or splat.kind_of? EmptyArray) and not unwrap @argument_count += 1 else @yield_splat = true end end end |
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags.
576 577 578 |
# File 'lib/compiler/ast/sends.rb', line 576 def flags @flags end |
Instance Method Details
#to_sexp ⇒ Object
599 600 601 |
# File 'lib/compiler/ast/sends.rb', line 599 def to_sexp arguments_sexp :yield end |