class SyntaxTree::CLI::Doc

An action of the CLI that prints out the doc tree IR for the given source.

Public Instance Methods

run(item) click to toggle source
# File lib/syntax_tree/cli.rb, line 284
def run(item)
  source = item.source

  formatter_options = options.formatter_options
  formatter = Formatter.new(source, [], options: formatter_options)

  item.handler.parse(source).format(formatter)
  pp formatter.groups.first
end