Class: Rubinius::AST::Defined

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/definitions.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

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, expr) ⇒ Defined

Returns a new instance of Defined.



739
740
741
742
# File 'lib/compiler/ast/definitions.rb', line 739

def initialize(line, expr)
  @line = line
  @expression = expr
end

Instance Attribute Details

#expressionObject

Returns the value of attribute expression.



737
738
739
# File 'lib/compiler/ast/definitions.rb', line 737

def expression
  @expression
end

Instance Method Details

#to_sexpObject



744
745
746
# File 'lib/compiler/ast/definitions.rb', line 744

def to_sexp
  [:defined, @expression.to_sexp]
end