Files
scully/inc/AST/FunctionDefinition.h
2013-06-02 09:47:27 +02:00

35 lines
787 B
C++

/* The scully programming language.
*
* Copyright (c) Peter Dahlberg, Markus Hauschild and Florian Sattler, 2013.
* Licensed under the GNU GPL v2.
*/
#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