module AST
Public Instance Methods
new_ast(op, *obj)
click to toggle source
# File lib/ast_ext/node.rb, line 44 def new_ast(op, *obj) args = obj.collect do |o| o.is_a?(Node) ? o : Node.new(o) end args.unshift self if is_a?(Node) args.unshift Node.new(self) if is_a?(Fixnum) args.unshift Node.new(self) if self.is_a?(Symbolic::Variable) Node.new(op, args) end