aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/include/function.hpp
blob: 77d1372c6632880160a28bfc1a421a1e8c216465 (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
#ifndef AST_FUNCTION_HPP
#define AST_FUNCTION_HPP

#include "node.hpp"

class Declaration;
class Statement;


class Function : public Node {
protected:
    Type* type;
    std::string id;
    Declaration* parameter_list;
    Statement* statement;
    
public:
    Function(const std::string& _id, Declaration* _parameter_list, Statement* _statement);

    virtual void print() const;
    virtual void printxml() const;
    virtual VariableStackBindings printasm(VariableStackBindings bindings) const;
};


#endif