Class: SyntaxTree::CLI::Doc
Overview
An action of the CLI that prints out the doc tree IR for the given source.
Instance Method Summary collapse
Methods inherited from Action
Instance Method Details
#run(handler, filepath, source) ⇒ Object
105 106 107 108 109 |
# File 'lib/syntax_tree/cli.rb', line 105 def run(handler, filepath, source) formatter = Formatter.new([]) handler.parse(source).format(formatter) pp formatter.groups.first end |