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(filepath, source) ⇒ Object



45
46
47
# File 'lib/syntax_tree/cli.rb', line 45

def run(filepath, source)
  pp SyntaxTree.parse(source)
end