LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
call-graph-visitor.hh
Go to the documentation of this file.
1 
5 #ifndef CALLGRAPH_CALL_GRAPH_VISITOR_HH
6 # define CALLGRAPH_CALL_GRAPH_VISITOR_HH
7 
8 # include <ast/default-visitor.hh>
10 # include <callgraph/fundec-graph.hh>
11 
12 namespace callgraph
13 {
14 
17  : protected ast::DefaultConstVisitor
18  , protected ast::NonObjectConstVisitor
19  {
20  public:
22  using super_type::operator();
23 
24  public:
25  virtual ~CallGraphVisitor();
26 
27  public:
28  const CallGraph* create(const ast::Ast& tree);
29  CallGraph* create(ast::Ast& tree);
30 
31  protected:
32  virtual void operator()(const ast::CallExp& e) override;
33  virtual void operator()(const ast::FunctionDecs& e) override;
34  virtual void operator()(const ast::FunctionDec& e) override;
35 
36  protected:
40  CallGraph* callgraph = nullptr;
41  };
42 
43 } // namespace callgraph
44 
45 #endif // !CALLGRAPH_CALL_GRAPH_VISITOR_HH