Class: YARD::Parser::OrderedParser
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/yard/parser/source_parser.rb |
Overview
Responsible for parsing a list of files in order. The #parse method of this class can be called from the SourceParser#globals globals state list to re-enter parsing for the remainder of files in the list recursively.
Class Method Summary
-
.new(global_state, files) ⇒ OrderedParser
constructor
Creates a new
OrderedParser
with the global state and a list of files to parse.
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(global_state, files) ⇒ OrderedParser
Note:
OrderedParser
sets itself as the ordered_parser
key on
global_state for later use in ::YARD::Handlers::Processor
.
Creates a new OrderedParser
with the global state and a list
of files to parse.
Instance Attribute Details
#files ⇒ Array<String> (rw)
# File 'lib/yard/parser/source_parser.rb', line 22
attr_accessor :files
Instance Method Details
#parse
Parses the remainder of the #files list.
# File 'lib/yard/parser/source_parser.rb', line 41
def parse until files.empty? file = files.shift log.capture("Parsing #{file}") do SourceParser.new(SourceParser.parser_type, @global_state).parse(file) end end end