Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (24 sloc) 758 Bytes
/*
* CGetParamCommandNode.cpp
* Forge
*
* Created by Uli Kusterer on 18.12.10.
* Copyright 2010 Uli Kusterer. All rights reserved.
*
*/
#include "CGetParamCommandNode.h"
#include "CValueNode.h"
#include "CCodeBlock.h"
namespace Carlson
{
void CGetParamCommandNode::GenerateCode( CCodeBlock* inCodeBlock )
{
CValueNode * destValue = GetParamAtIndex( 0 );
CValueNode * paramIdx = GetParamAtIndex( 1 );
CLocalVariableRefValueNode * varValue = NULL;
if(( varValue = dynamic_cast<CLocalVariableRefValueNode*>(destValue) ))
inCodeBlock->GenerateAssignParamToVariableInstruction( varValue->GetBPRelativeOffset(), paramIdx->GetAsInt() );
else
throw CForgeParseError("Can't assign to this value.",mLineNum);
}
} // namespace Carlson
You can’t perform that action at this time.