aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/include/primitives.hpp
blob: f4c5087dbda536fdf875ad67c71c954c2c48afea (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_PRIMITIVES_HPP
#define AST_PRIMITIVES_HPP

#include "ast.hpp"


class Declarator : public BasePrimitive {
public:
    Declarator(const std::string& _id) : BasePrimitive(_id) {}

    virtual void printxml() const {
	std::cout << "<Variable id=\"" << id << "\" />" << std::endl;
    }
};


class Parameter : public BasePrimitive {
public:
    Parameter(const std::string& _id) : BasePrimitive(_id) {}

    virtual void printxml() const {
        std::cout << "<Parameter id=\"" << id << "\" />" << std::endl;
    }
};


#endif