summaryrefslogtreecommitdiff
path: root/src/astfunction.cpp
blob: e27e5854c3d7203b19637833143d3bf676882564 (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
#include "astfunction.h"
#include "astbranch.h"

#include "gamestate.h"

AstFunction::AstFunction( const Bu::String &sName ) :
	sName( sName ),
	pAst( NULL )
{
}

AstFunction::~AstFunction()
{
	delete pAst;
}

void AstFunction::call( class GameState &gState )
{
	gState.run( pAst, true );
}

void AstFunction::addParam( const Bu::String &sName )
{
	lParam.append( sName );
}

void AstFunction::setAst( class AstBranch *pAst )
{
	this->pAst = pAst;
}