Class: Rubinius::ToolSet.current::TS::AST::Defined
- Defined in:
- lib/rubinius/ast/definitions.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
Returns the value of attribute expression.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, expr) ⇒ Defined
constructor
A new instance of Defined.
- #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
#initialize(line, expr) ⇒ Defined
Returns a new instance of Defined.
1141 1142 1143 1144 |
# File 'lib/rubinius/ast/definitions.rb', line 1141 def initialize(line, expr) @line = line @expression = expr end |
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
1139 1140 1141 |
# File 'lib/rubinius/ast/definitions.rb', line 1139 def expression @expression end |
Instance Method Details
#bytecode(g) ⇒ Object
1146 1147 1148 1149 1150 |
# File 'lib/rubinius/ast/definitions.rb', line 1146 def bytecode(g) pos(g) @expression.defined(g) end |
#to_sexp ⇒ Object
1152 1153 1154 |
# File 'lib/rubinius/ast/definitions.rb', line 1152 def to_sexp [:defined, @expression.to_sexp] end |