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

- (CParser) initialize(source, file = '(stdin)')



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

- (Object) parse



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

- (Object) tokenize

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