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
20
# File 'lib/yard/parser/c_parser.rb', line 14

def parse
  parse_modules
  parse_classes
  parse_methods
  parse_constants
  parse_includes
end

#tokenizeObject

Raises:

  • (NotImplementedError)

Since:

  • 0.5.6


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

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