Class: CoderCompanion::Cpp::CppParser
- Inherits:
-
LanguageParser
- Object
- LanguageParser
- CoderCompanion::Cpp::CppParser
- Defined in:
- lib/codercompanion/cpp/cpp_parser.rb
Constant Summary collapse
- CPP_EXTENSIONS =
['.h', '.hpp']
Instance Attribute Summary
Attributes inherited from LanguageParser
Instance Method Summary collapse
-
#initialize ⇒ CppParser
constructor
A new instance of CppParser.
- #parse(files) ⇒ Object
Methods inherited from LanguageParser
Constructor Details
#initialize ⇒ CppParser
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
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 |