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

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

Overview

Legacy Ruby parser

Since:

  • 0.5.6

Instance Method Summary collapse

Methods inherited from Base

parse

Constructor Details

#initialize(source, filename) ⇒ RubyParser

Returns a new instance of RubyParser.

Since:

  • 0.5.6



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

def initialize(source, filename)
  @source = source
end

Instance Method Details

#enumeratorObject

Since:

  • 0.5.6



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

def enumerator
  @parse
end

#parseObject

Since:

  • 0.5.6



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

def parse
  @parse ||= StatementList.new(@source)
end

#tokenizeObject

Since:

  • 0.5.6



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

def tokenize
  @tokenize ||= TokenList.new(@source)
end