Class: CoderCompanion::Cpp::CppParser

Inherits:
LanguageParser show all
Defined in:
lib/codercompanion/cpp/cpp_parser.rb

Constant Summary collapse

CPP_EXTENSIONS =
['.h', '.hpp']

Instance Attribute Summary

Attributes inherited from LanguageParser

#excluded, #tree_walker

Instance Method Summary collapse

Methods inherited from LanguageParser

#create_project_json

Constructor Details

#initializeCppParser

Returns a new instance of CppParser.



7
8
9
# File 'lib/codercompanion/cpp/cpp_parser.rb', line 7

def initialize
    @tree_walker = CoderCompanion::Cpp::CppTreeWalker.new
end

Instance Method Details

#parse(files) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/codercompanion/cpp/cpp_parser.rb', line 11

def parse(files)
    raise NotImplementedError, "cpp parser is not yet implemented"
=begin
    begin
        results = RbGCCXML.parse(files, :cxxflags => ["--debug", "-stdlib=libstdc++"])
        return [results]
    rescue RuntimeError => e
        CoderCompanion::j_print CoderCompanion::error_format("An error occured while parsing your code.")
        exit
    end
=end
end