blob: c46aca2fd53471a18db50c67c966bd968cfd39c6 (
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
25
26
27
28
29
30
31
32
33
34
|
#ifndef AST_DECLARATION_HPP
#define AST_DECLARATION_HPP
#include "ast.hpp"
// Declaration that holds a list of declarations
class Declaration : public Node {
protected:
Type* type;
std::string id;
Initializer* init;
Declaration* next_decl;
Declaration* list_next_decl;
public:
Declaration(const std::string& _id = "");
virtual void print() const;
virtual void printxml() const;
virtual void printasm() const;
void addDeclaration(Declaration* _next_decl);
void addList(Declaration* _next_decl);
void setType(Type* _type);
Declaration* getNext() const;
Declaration* getNextListItem() const;
std::string getId() const;
std::string getType() const;
};
#endif
|