Colobot
|
The CBotCStack class Management of the stack of compilation. More...
#include <CBotCStack.h>
Public Member Functions | |
CBotCStack (CBotCStack *ppapa) | |
CBotCStack. More... | |
~CBotCStack () | |
CBotCStack Destructor. More... | |
bool | IsOk () |
IsOk. More... | |
CBotError | GetError () |
GetError. More... | |
CBotError | GetError (int &start, int &end) |
GetError Gives error number. More... | |
void | SetType (CBotTypResult &type) |
SetType Set the type of instruction on the stack. More... | |
CBotTypResult | GetTypResult (CBotVar::GetTypeMode mode=CBotVar::GetTypeMode::NORMAL) |
GetTypResult Gives the type of value on the stack. Type of instruction on the stack. More... | |
int | GetType (CBotVar::GetTypeMode mode=CBotVar::GetTypeMode::NORMAL) |
GetType Gives the type of value on the stack. More... | |
CBotClass * | GetClass () |
GetClass Gives the class of the value on the stack. More... | |
void | AddVar (CBotVar *p) |
AddVar Adds a local variable. More... | |
CBotVar * | FindVar (CBotToken *&p) |
FindVar Finds a variable. Seeks a variable on the stack the token may be a result of TokenTypVar (object of a class) or a pointer in the source. More... | |
CBotVar * | FindVar (CBotToken &Token) |
FindVar. More... | |
bool | CheckVarLocal (CBotToken *&pToken) |
CheckVarLocal Test whether a variable is already defined locally. More... | |
CBotVar * | CopyVar (CBotToken &Token) |
CopyVar Finds and makes a copy. More... | |
CBotCStack * | TokenStack (CBotToken *pToken=nullptr, bool bBlock=false) |
TokenStack Used only at compile. More... | |
CBotInstr * | Return (CBotInstr *p, CBotCStack *pParent) |
Return Transmits the result upper. More... | |
CBotFunction * | ReturnFunc (CBotFunction *p, CBotCStack *pParent) |
ReturnFunc Transmits the result upper. More... | |
void | SetVar (CBotVar *var) |
SetVar. More... | |
void | SetCopyVar (CBotVar *var) |
SetCopyVar Puts on the stack a copy of a variable. More... | |
CBotVar * | GetVar () |
GetVar. More... | |
void | SetStartError (int pos) |
SetStartError. More... | |
void | SetError (CBotError n, int pos) |
SetError. More... | |
void | SetError (CBotError n, CBotToken *p) |
SetError. More... | |
void | ResetError (CBotError n, int start, int end) |
ResetError. More... | |
void | SetRetType (CBotTypResult &type) |
SetRetType. More... | |
CBotTypResult | GetRetType () |
GetRetType. More... | |
void | SetProgram (CBotProgram *p) |
SetProgram. More... | |
CBotProgram * | GetProgram () |
GetProgram. More... | |
CBotTypResult | CompileCall (CBotToken *&p, CBotVar **ppVars, long &nIdent) |
CompileCall. More... | |
bool | CheckCall (CBotToken *&pToken, CBotDefParam *pParam) |
CheckCall Test if a procedure name is already defined somewhere. More... | |
bool | NextToken (CBotToken *&p) |
NextToken. More... | |
The CBotCStack class Management of the stack of compilation.
CBot::CBotCStack::CBotCStack | ( | CBotCStack * | ppapa | ) |
ppapa |
CBot::CBotCStack::~CBotCStack | ( | ) |
CBotCStack Destructor.
bool CBot::CBotCStack::IsOk | ( | ) |
IsOk.
CBotError CBot::CBotCStack::GetError | ( | ) |
GetError.
CBotError CBot::CBotCStack::GetError | ( | int & | start, |
int & | end | ||
) |
GetError Gives error number.
start | |
end |
void CBot::CBotCStack::SetType | ( | CBotTypResult & | type | ) |
SetType Set the type of instruction on the stack.
type |
CBotTypResult CBot::CBotCStack::GetTypResult | ( | CBotVar::GetTypeMode | mode = CBotVar::GetTypeMode::NORMAL | ) |
GetTypResult Gives the type of value on the stack. Type of instruction on the stack.
mode |
int CBot::CBotCStack::GetType | ( | CBotVar::GetTypeMode | mode = CBotVar::GetTypeMode::NORMAL | ) |
GetType Gives the type of value on the stack.
mode |
CBotClass * CBot::CBotCStack::GetClass | ( | ) |
GetClass Gives the class of the value on the stack.
void CBot::CBotCStack::AddVar | ( | CBotVar * | p | ) |
AddVar Adds a local variable.
p |
FindVar Finds a variable. Seeks a variable on the stack the token may be a result of TokenTypVar (object of a class) or a pointer in the source.
p |
bool CBot::CBotCStack::CheckVarLocal | ( | CBotToken *& | pToken | ) |
CheckVarLocal Test whether a variable is already defined locally.
pToken |
CopyVar Finds and makes a copy.
Token |
CBotCStack * CBot::CBotCStack::TokenStack | ( | CBotToken * | pToken = nullptr , |
bool | bBlock = false |
||
) |
TokenStack Used only at compile.
pToken | |
bBlock |
CBotInstr * CBot::CBotCStack::Return | ( | CBotInstr * | p, |
CBotCStack * | pParent | ||
) |
Return Transmits the result upper.
p | |
pParent |
CBotFunction * CBot::CBotCStack::ReturnFunc | ( | CBotFunction * | p, |
CBotCStack * | pParent | ||
) |
ReturnFunc Transmits the result upper.
p | |
pParent |
void CBot::CBotCStack::SetVar | ( | CBotVar * | var | ) |
SetVar.
var |
void CBot::CBotCStack::SetCopyVar | ( | CBotVar * | var | ) |
SetCopyVar Puts on the stack a copy of a variable.
var |
CBotVar * CBot::CBotCStack::GetVar | ( | ) |
GetVar.
void CBot::CBotCStack::SetStartError | ( | int | pos | ) |
SetStartError.
pos |
void CBot::CBotCStack::SetError | ( | CBotError | n, |
int | pos | ||
) |
SetError.
n | |
pos |
void CBot::CBotCStack::ResetError | ( | CBotError | n, |
int | start, | ||
int | end | ||
) |
ResetError.
n | |
start | |
end |
void CBot::CBotCStack::SetRetType | ( | CBotTypResult & | type | ) |
SetRetType.
type |
CBotTypResult CBot::CBotCStack::GetRetType | ( | ) |
GetRetType.
void CBot::CBotCStack::SetProgram | ( | CBotProgram * | p | ) |
SetProgram.
p |
CBotProgram * CBot::CBotCStack::GetProgram | ( | ) |
GetProgram.
CBotTypResult CBot::CBotCStack::CompileCall | ( | CBotToken *& | p, |
CBotVar ** | ppVars, | ||
long & | nIdent | ||
) |
CompileCall.
p | |
ppVars | |
nIdent |
bool CBot::CBotCStack::CheckCall | ( | CBotToken *& | pToken, |
CBotDefParam * | pParam | ||
) |
CheckCall Test if a procedure name is already defined somewhere.
pToken | |
pParam |
bool CBot::CBotCStack::NextToken | ( | CBotToken *& | p | ) |
NextToken.
p |