Class: YARD::Parser::CParser

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

Instance Method Summary collapse

Methods inherited from Base

#enumerator, parse

Constructor Details

#initialize(source, file = '(stdin)') ⇒ CParser

Returns a new instance of CParser.



8
9
10
11
12
# File 'lib/yard/parser/c_parser.rb', line 8

def initialize(source, file = '(stdin)')
  @file = file
  @namespaces = {}
  @content = clean_source(source)
end

Instance Method Details

#parseObject



14
15
16
17
18
19
# File 'lib/yard/parser/c_parser.rb', line 14

def parse
  parse_modules
  parse_classes
  parse_methods
  parse_includes
end

#tokenizeObject

Raises:

  • (NotImplementedError)

Since:

  • 0.5.6



22
23
24
# File 'lib/yard/parser/c_parser.rb', line 22

def tokenize
  raise NotImplementedError, "no tokenization support for C/C++ files"
end