blob: 57e0ac18ae5077d41c69f5a98965c746e7f9b703 (
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_FUNCTION_HPP
#define AST_FUNCTION_HPP
#include "node.hpp"
#include <memory>
class Declaration;
class Statement;
class Type;
class Function;
typedef std::shared_ptr<Declaration> DeclarationPtr;
typedef std::shared_ptr<Statement> StatementPtr;
typedef std::shared_ptr<Type> TypePtr;
typedef std::shared_ptr<Function> FunctionPtr;
class Function : public Node {
protected:
TypePtr type;
std::string id;
DeclarationPtr parameter_list;
StatementPtr 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
|