blob: 82260900866c4b8b90c02865d3d0f33fa440dd85 (
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
35
|
#ifndef AST_DECLARATION_HPP
#define AST_DECLARATION_HPP
#include "node.hpp"
class Expression;
class Declaration : public Node {
private:
Type* type;
std::string id;
Expression* init;
Declaration* next_decl;
Declaration* list_next_decl;
public:
Declaration(const std::string& _id = "");
virtual void print() const;
virtual void printxml() const;
virtual VariableStackBindings printasm(VariableStackBindings bindings) 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
|