Class: CodeTools::AST::Lambda
- Defined in:
- lib/rubinius/ast/definitions.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#body ⇒ Object
Returns the value of attribute body.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, arguments, body) ⇒ Lambda
constructor
A new instance of Lambda.
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
281 282 283 |
# File 'lib/rubinius/ast/definitions.rb', line 281 def arguments @arguments end |
#body ⇒ Object
Returns the value of attribute body.
281 282 283 |
# File 'lib/rubinius/ast/definitions.rb', line 281 def body @body end |
Instance Method Details
#bytecode(g) ⇒ Object
289 290 291 292 293 294 295 |
# File 'lib/rubinius/ast/definitions.rb', line 289 def bytecode(g) pos(g) g.push_rubinius @body.bytecode(g) g.send_with_block :lambda, 0, false end |
#to_sexp ⇒ Object
297 298 299 |
# File 'lib/rubinius/ast/definitions.rb', line 297 def to_sexp [:lambda, @arguments.to_sexp, [:scope, @body.body.to_sexp]] end |