class RedParse::ListInNode::AliasNode

Public Class Methods

new(aliasword,to,from) click to toggle source
Calls superclass method RedParse::ListInNode::Node::new
# File lib/redparse/node.rb, line 5003
def initialize(aliasword,to,from)
  @offset=aliasword.offset
  to=baresym2str(to)
  from=baresym2str(from)
  super(to,from)
end

Public Instance Methods

image() click to toggle source
# File lib/redparse/node.rb, line 5014
def image; "(alias)" end
parsetree(o) click to toggle source
# File lib/redparse/node.rb, line 5015
def parsetree(o)
  if VarNode===to and to.ident[0]==?$
    [:valias, to.ident.to_sym, from.ident.to_sym]
  else
    [:alias, str2parsetree(to,o), str2parsetree(from,o)]
  end
end
unparse(o=default_unparse_options) click to toggle source
# File lib/redparse/node.rb, line 5010
def unparse o=default_unparse_options
  "alias #{str_unparse to,o} #{str_unparse from,o}"      
end