Class: SyntaxTree::CLI::AST

Inherits:
Action
  • Object
show all
Defined in:
lib/syntax_tree/cli.rb

Overview

An action of the CLI that prints out the AST for the given source.

Instance Method Summary collapse

Methods inherited from Action

#failure, #success

Instance Method Details

#run(handler, _filepath, source) ⇒ Object



51
52
53
# File 'lib/syntax_tree/cli.rb', line 51

def run(handler, _filepath, source)
  pp handler.parse(source)
end