2013-06-02 09:47:27 +02:00
|
|
|
/* The scully programming language.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) Peter Dahlberg, Markus Hauschild and Florian Sattler, 2013.
|
|
|
|
|
* Licensed under the GNU GPL v2.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-06-01 02:50:47 +02:00
|
|
|
#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:
|
2013-06-01 16:22:01 +02:00
|
|
|
FunctionDefinition(Type type, std::string name, ParameterList* params, StatementList* sl);
|
2013-06-01 02:50:47 +02:00
|
|
|
virtual ~FunctionDefinition();
|
|
|
|
|
|
|
|
|
|
virtual void accept(ASTVisitor* visitor);
|
|
|
|
|
|
2013-06-01 16:22:01 +02:00
|
|
|
Type getType();
|
2013-06-01 02:50:47 +02:00
|
|
|
std::string getName();
|
|
|
|
|
ParameterList* getParams();
|
|
|
|
|
StatementList* getSl();
|
|
|
|
|
private:
|
2013-06-01 16:22:01 +02:00
|
|
|
Type type_;
|
2013-06-01 02:50:47 +02:00
|
|
|
std::string name_;
|
|
|
|
|
ParameterList* params_;
|
|
|
|
|
StatementList* sl_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // FUNCTIONDEFINITION_H
|