v8toolkit
0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
Main Page
Namespaces
Classes
Files
File List
File Members
class_parser
ast_consumer.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
clang.h
"
4
5
#include "
class_handler.h
"
6
7
8
/**
9
* Defines what will be matched and sent to
10
*/
11
class
MyASTConsumer
:
public
ASTConsumer
{
12
private
:
13
14
// matcher that is parameterized in constructor
15
ast_matchers::MatchFinder Matcher;
16
17
// MatchCallback object called for each element matched by matcher
18
ClassHandler
HandlerForClass;
19
20
CompilerInstance & ci;
21
22
public
:
23
MyASTConsumer
(CompilerInstance &CI);
24
25
void
HandleTranslationUnit
(ASTContext &Context)
override
{
26
// Run the matchers when we have the whole TU parsed.
27
// matchers configured in constructor
28
Matcher.matchAST(Context);
29
}
30
31
32
};
class_handler.h
ASTConsumer
MyASTConsumer::MyASTConsumer
MyASTConsumer(CompilerInstance &CI)
Definition:
ast_consumer.cpp:7
clang.h
MyASTConsumer
Definition:
ast_consumer.h:11
ClassHandler
Definition:
class_handler.h:10
MyASTConsumer::HandleTranslationUnit
void HandleTranslationUnit(ASTContext &Context) override
Definition:
ast_consumer.h:25
Generated on Mon May 22 2017 12:46:56 for v8toolkit by
1.8.11