FunctionDefinition plus use more stuff in the grammar

This commit is contained in:
Markus Hauschild
2013-06-01 02:50:47 +02:00
parent 5c011f3ac4
commit e2dcf5f507
5 changed files with 78 additions and 18 deletions

View File

@@ -0,0 +1,28 @@
#ifndef FUNCTIONDEFINITION_H
#define FUNCTIONDEFINITION_H
#include "AST/ASTElement.h"
#include "AST/ParameterList.h"
#include "AST/StatementList.h"
#include "AST/Type.h"
#include <string>
class FunctionDefinition : public ASTElement {
public:
FunctionDefinition(Type *type, std::string name, ParameterList* params, StatementList* sl);
virtual ~FunctionDefinition();
virtual void accept(ASTVisitor* visitor);
Type* getType();
std::string getName();
ParameterList* getParams();
StatementList* getSl();
private:
Type* type_;
std::string name_;
ParameterList* params_;
StatementList* sl_;
};
#endif // FUNCTIONDEFINITION_H