Class: YARD::Parser::C::CParser
- Defined in:
- lib/yard/parser/c/c_parser.rb
Instance Method Summary collapse
- #enumerator ⇒ Object
-
#initialize(source, file = '(stdin)') ⇒ CParser
constructor
A new instance of CParser.
- #parse ⇒ Object
- #tokenize ⇒ Object
Constructor Details
#initialize(source, file = '(stdin)') ⇒ CParser
Returns a new instance of CParser.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/yard/parser/c/c_parser.rb', line 5 def initialize(source, file = '(stdin)') @file = file @namespaces = {} @content = source @index = 0 @line = 1 @state = nil @newline = true @statements = [] @last_comment = nil @last_statement = nil end |
Instance Method Details
#enumerator ⇒ Object
23 24 25 |
# File 'lib/yard/parser/c/c_parser.rb', line 23 def enumerator @statements end |
#parse ⇒ Object
18 19 20 21 |
# File 'lib/yard/parser/c/c_parser.rb', line 18 def parse parse_toplevel enumerator end |
#tokenize ⇒ Object
27 28 29 |
# File 'lib/yard/parser/c/c_parser.rb', line 27 def tokenize raise NotImplementedError, "no tokenization support for C/C++ files" end |