123456789_123456789_123456789_123456789_123456789_

Class: YARD::Parser::Ruby::RubyParser

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: YARD::Parser::Base
Defined in: lib/yard/parser/ruby/ruby_parser.rb

Overview

Class Method Summary

::YARD::Parser::Base - Inherited

.new

This default constructor does nothing.

.parse

Convenience method to create a new parser and #parse

Instance Attribute Summary

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

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 13

def initialize(source, filename)
  @parser = RipperParser.new(source, filename)
end

Instance Attribute Details

#encoding_line (readonly)

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 21

def encoding_line; @parser.encoding_line end

#enumerator (readonly)

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 19

def enumerator; @parser.enumerator end

#frozen_string_line (readonly)

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 22

def frozen_string_line; @parser.frozen_string_line end

#shebang_line (readonly)

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 20

def shebang_line; @parser.shebang_line end

Instance Method Details

#parse

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 17

def parse; @parser.parse end

#tokenize

[ GitHub ]

  
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 18

def tokenize; @parser.tokens end