Class: SyntaxTree::JSON::AST::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/json/ast.rb

Overview

This is the parent node of all of the nodes in the AST.

Direct Known Subclasses

Array, False, Null, Number, Object, Root, String, True

Instance Method Summary collapse

Instance Method Details

#format(q) ⇒ Object



8
9
10
# File 'lib/syntax_tree/json/ast.rb', line 8

def format(q)
  accept(Format.new(q))
end

#pretty_print(q) ⇒ Object



12
13
14
# File 'lib/syntax_tree/json/ast.rb', line 12

def pretty_print(q)
  accept(PrettyPrint.new(q))
end