soml-parser/lib/ast/expression_list.rb
Torsten Ruger 95fbc3de1a move attributes under contractor
as it is essential that attributes are in the same order for the json
to work
2015-07-11 22:00:11 +03:00

21 lines
386 B
Ruby

module Ast
class ExpressionList < Expression
attr_reader :expressions
def initialize expressions
@expressions = expressions
end
def attributes
[:expressions]
end
def inspect
self.class.name + ".new( ["+ expressions.collect(&:inspect).join( ",") +"])"
end
def to_s
expressions.collect(&:inspect).join("\n")
end
end
end