aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser/include/ast_top.hpp
blob: 142dfb8c1a4e2d321c6cfc6481a55e1c83f2a2cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef TOP_AST_HPP
#define TOP_AST_HPP

#include "ast.hpp"

#include <vector>

class ast_Top {
public:
    void print() {
	for(size_t i = 0; i < ast_vec.size(); ++i) {
	    ast_vec[i]->print();
	}
    }
 
    void push(const ast_Base *stmnt) {
	ast_vec.push_back(stmnt);
    }
   
private:
    std::vector<const ast_Base *> ast_vec;
};

#endif