Class: Mirah::Commands::Parse

Inherits:
Base
  • Object
show all
Defined in:
lib/mirah/commands/parse.rb

Constant Summary

Constants included from Logging::Logged

Logging::Logged::VLEVELS

Instance Attribute Summary

Attributes inherited from Base

#args, #argument_processor, #state

Instance Method Summary collapse

Methods inherited from Base

#execute_base, #initialize

Methods included from Logging::Logged

#error, #info, #log, #logger, #logger_name, #logging?, #vlog, #warning

Constructor Details

This class inherits a constructor from Mirah::Commands::Base

Instance Method Details

#command_nameObject



31
32
33
# File 'lib/mirah/commands/parse.rb', line 31

def command_name
  :parse
end

#executeObject



21
22
23
24
25
26
27
28
29
# File 'lib/mirah/commands/parse.rb', line 21

def execute
  execute_base do
    parser = Mirah::Parser.new(@state, nil, false)

    parser.parse_from_args(args).each do |ast|
      puts parser.format_ast(ast)
    end
  end
end