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(item) ⇒ Object
156 157 158 159 160 161 162 |
# File 'lib/syntax_tree/cli.rb', line 156 def run(item) source = item.source formatter = Formatter.new(source, []) item.handler.parse(source).format(formatter) pp formatter.groups.first end |