Class: Duby::AST::JRubyAst::VCallNode

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

Instance Method Summary collapse

Instance Method Details

#transform(transformer, parent) ⇒ Object



992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
# File 'lib/duby/transform.rb', line 992

def transform(transformer, parent)
  if name == 'raise'
    Raise.new(parent, position) do
      []
    end
  elsif name == 'null'
    Null.new(parent, position)
  else
    macro = AST.macro(name)
    if macro
      transformer.expand(self, parent, &macro)
    else
      FunctionalCall.new(parent, position, name) do |call|
        [
          [],
          nil
        ]
      end
    end
  end
end

#type_reference(parent) ⇒ Object



1014
1015
1016
# File 'lib/duby/transform.rb', line 1014

def type_reference(parent)
  AST::type name
end