aboutsummaryrefslogtreecommitdiff
path: root/src/functionast.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-08 22:58:28 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-08 22:58:28 +0000
commit52be1ef0d126f09ba943c7afcf367e7d9347f2fd (patch)
treefd4b0dd148751c3c6c1b95296c3b82cb86051b83 /src/functionast.cpp
parent795d0737fed40d88a7801b451b7750ba90802345 (diff)
downloadbuild-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.gz
build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.bz2
build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.xz
build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.zip
tabconv: it's all spaces now.
Diffstat (limited to '')
-rw-r--r--src/functionast.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/functionast.cpp b/src/functionast.cpp
index d4ec61f..437ddd4 100644
--- a/src/functionast.cpp
+++ b/src/functionast.cpp
@@ -8,12 +8,12 @@
8using namespace Bu; 8using namespace Bu;
9 9
10FunctionAst::FunctionAst( const AstBranch *pRoot, class Runner *pRunner ) : 10FunctionAst::FunctionAst( const AstBranch *pRoot, class Runner *pRunner ) :
11 pRoot( pRoot ), 11 pRoot( pRoot ),
12 pRunner( pRunner ) 12 pRunner( pRunner )
13{ 13{
14 sName = dynamic_cast<AstLeaf *>( 14 sName = dynamic_cast<AstLeaf *>(
15 *(*pRoot->getBranchBegin()).begin() 15 *(*pRoot->getBranchBegin()).begin()
16 )->getStrValue(); 16 )->getStrValue();
17} 17}
18 18
19FunctionAst::~FunctionAst() 19FunctionAst::~FunctionAst()
@@ -22,26 +22,26 @@ FunctionAst::~FunctionAst()
22 22
23Bu::String FunctionAst::getName() const 23Bu::String FunctionAst::getName() const
24{ 24{
25 return sName; 25 return sName;
26} 26}
27 27
28Variable FunctionAst::call( Variable &input, VarList lParams ) 28Variable FunctionAst::call( Variable &input, VarList lParams )
29{ 29{
30 pContext->pushScope(); 30 pContext->pushScope();
31 31
32 AstBranch::NodeList::const_iterator vName = 32 AstBranch::NodeList::const_iterator vName =
33 (*(pRoot->getBranchBegin()+1)).begin(); 33 (*(pRoot->getBranchBegin()+1)).begin();
34 VarList::iterator vValue = lParams.begin(); 34 VarList::iterator vValue = lParams.begin();
35 for( ; vName && vValue; vName++, vValue++ ) 35 for( ; vName && vValue; vName++, vValue++ )
36 { 36 {
37 pContext->addVariable( 37 pContext->addVariable(
38 dynamic_cast<const AstLeaf *>(*vName)->getStrValue(), 38 dynamic_cast<const AstLeaf *>(*vName)->getStrValue(),
39 *vValue 39 *vValue
40 ); 40 );
41 } 41 }
42 pContext->addVariable("INPUT", input ); 42 pContext->addVariable("INPUT", input );
43 Variable vRet = pRunner->run( (*(pRoot->getBranchBegin()+2)).begin() ); 43 Variable vRet = pRunner->run( (*(pRoot->getBranchBegin()+2)).begin() );
44 pContext->popScope(); 44 pContext->popScope();
45 return vRet; 45 return vRet;
46} 46}
47 47