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

def parse
  parse_namespaces
  parse_methods
  parse_attributes
  parse_aliases
  parse_constants
  parse_includes
end

#tokenizeObject

Raises:

  • (NotImplementedError)

Since:

  • 0.5.6



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

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