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

Inherits:
Base
  • Object
show all
Defined in:
lib/yard/parser/ruby/ruby_parser.rb

Overview

Ruby 1.9 parser

Instance Method Summary collapse

Methods inherited from Base

parse

Constructor Details

#initialize(source, filename) ⇒ RubyParser

Returns a new instance of RubyParser.



8
9
10
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 8

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

Instance Method Details

#enumeratorObject



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

def enumerator; @parser.enumerator end

#parseObject



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

def parse; @parser.parse end

#tokenizeObject



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

def tokenize; @parser.tokens end