class TL1::AST::Node
The base class for all AST
nodes
Attributes
fields[R]
Public Instance Methods
<=>(other)
click to toggle source
# File lib/tl1/ast.rb, line 81 def <=>(other) return unless other.is_a?(Node) fields <=> other.fields end
as_json(fields = nil)
click to toggle source
# File lib/tl1/ast.rb, line 86 def as_json(fields = nil) fields ||= @fields { node: NODES_BY_CLASS[self.class], fields: fields } end
to_json()
click to toggle source
# File lib/tl1/ast.rb, line 91 def to_json as_json.to_json end