aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/include/declaration.hpp
blob: 7fdee1c3bf2442d9004d2f3aca4d7ef9a5977027 (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
#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* decl;
    
public:
    Declaration(const Type* _type = nullptr,
		const std::string _id = "",
		const Initializer* _init = nullptr);

    virtual void print() const;
    virtual void printxml() const;
    virtual void printasm() const;

    
};

#endif