Class: Duby::AST::JRubyAst::DAsgnNode

Inherits:
Object
  • Object
show all
Defined in:
lib/duby/transform.rb

Instance Method Summary collapse

Instance Method Details

#transform(transformer, parent) ⇒ Object



1049
1050
1051
1052
1053
1054
1055
1056
# File 'lib/duby/transform.rb', line 1049

def transform(transformer, parent)
  case value_node
  when SymbolNode, ConstNode
    LocalDeclaration.new(parent, position, name) {|local_decl| [value_node.type_reference(local_decl)]}
  else
    LocalAssignment.new(parent, position, name) {|local| [transformer.transform(value_node, local)]}
  end
end