Class: YARD::Parser::Ruby::Legacy::RubyParser
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::YARD::Parser::Base
|
|
Instance Chain:
self,
::YARD::Parser::Base
|
|
Inherits: |
YARD::Parser::Base
|
Defined in: | lib/yard/parser/ruby/legacy/ruby_parser.rb |
Overview
::YARD::Parser::Ruby::Legacy
Ruby parser
Class Method Summary
- .new(source, _filename) ⇒ RubyParser constructor
::YARD::Parser::Base
- Inherited
Instance Method Summary
::YARD::Parser::Base
- Inherited
#enumerator | This method should be implemented to return a list of semantic tokens representing the source code to be post-processed. |
#parse | This method should be implemented to parse the source and return itself. |
#tokenize | This method should be implemented to tokenize given source. |
Constructor Details
.new(source, _filename) ⇒ RubyParser
# File 'lib/yard/parser/ruby/legacy/ruby_parser.rb', line 9
def initialize(source, _filename) @source = source end
Instance Method Details
#encoding_line
# File 'lib/yard/parser/ruby/legacy/ruby_parser.rb', line 26
def encoding_line; @parse.encoding_line end
#enumerator
# File 'lib/yard/parser/ruby/legacy/ruby_parser.rb', line 22
def enumerator @parse end
#parse
# File 'lib/yard/parser/ruby/legacy/ruby_parser.rb', line 13
def parse @parse ||= StatementList.new(@source) self end
#shebang_line
# File 'lib/yard/parser/ruby/legacy/ruby_parser.rb', line 27
def shebang_line; @parse.shebang_line end