lib/atp/ast/factories.rb in atp-0.3.0 vs lib/atp/ast/factories.rb in atp-0.3.1

- old
+ new

@@ -3,9 +3,10 @@ module Factories def n(type, *children) options = children.last.is_a?(Hash) ? children.pop : {} options[:file] ||= options.delete(:source_file) || try(:source_file) options[:line_number] ||= options.delete(:source_line_number) || try(:source_line_number) + options[:description] ||= options.delete(:description) || try(:description) ATP::AST::Node.new(type, children, options) end def n0(type, options = {}) n(type, options)