The CBotCStack class Management of the stack of compilation.
More...
#include <src/CBot/CBotCStack.h>
|
| 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.
◆ CBotCStack()
CBot::CBotCStack::CBotCStack |
( |
CBotCStack * |
ppapa | ) |
|
◆ ~CBotCStack()
CBot::CBotCStack::~CBotCStack |
( |
| ) |
|
◆ IsOk()
bool CBot::CBotCStack::IsOk |
( |
| ) |
|
◆ GetError() [1/2]
◆ GetError() [2/2]
CBotError CBot::CBotCStack::GetError |
( |
int & |
start, |
|
|
int & |
end |
|
) |
| |
GetError Gives error number.
- Parameters
-
- Returns
◆ SetType()
SetType Set the type of instruction on the stack.
- Parameters
-
◆ GetTypResult()
GetTypResult Gives the type of value on the stack. Type of instruction on the stack.
- Parameters
-
- Returns
◆ GetType()
GetType Gives the type of value on the stack.
- Parameters
-
- Returns
◆ GetClass()
GetClass Gives the class of the value on the stack.
- Returns
◆ AddVar()
void CBot::CBotCStack::AddVar |
( |
CBotVar * |
p | ) |
|
AddVar Adds a local variable.
- Parameters
-
◆ FindVar() [1/2]
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.
- Parameters
-
- Returns
◆ FindVar() [2/2]
FindVar.
- Parameters
-
- Returns
◆ CheckVarLocal()
bool CBot::CBotCStack::CheckVarLocal |
( |
CBotToken *& |
pToken | ) |
|
CheckVarLocal Test whether a variable is already defined locally.
- Parameters
-
- Returns
◆ CopyVar()
CopyVar Finds and makes a copy.
- Parameters
-
- Returns
◆ TokenStack()
CBotCStack * CBot::CBotCStack::TokenStack |
( |
CBotToken * |
pToken = nullptr , |
|
|
bool |
bBlock = false |
|
) |
| |
TokenStack Used only at compile.
- Parameters
-
- Returns
◆ Return()
Return Transmits the result upper.
- Parameters
-
- Returns
◆ ReturnFunc()
ReturnFunc Transmits the result upper.
- Parameters
-
- Returns
◆ SetVar()
void CBot::CBotCStack::SetVar |
( |
CBotVar * |
var | ) |
|
◆ SetCopyVar()
void CBot::CBotCStack::SetCopyVar |
( |
CBotVar * |
var | ) |
|
SetCopyVar Puts on the stack a copy of a variable.
- Parameters
-
◆ GetVar()
CBotVar * CBot::CBotCStack::GetVar |
( |
| ) |
|
◆ SetStartError()
void CBot::CBotCStack::SetStartError |
( |
int |
pos | ) |
|
SetStartError.
- Parameters
-
◆ SetError() [1/2]
void CBot::CBotCStack::SetError |
( |
CBotError |
n, |
|
|
int |
pos |
|
) |
| |
◆ SetError() [2/2]
◆ ResetError()
void CBot::CBotCStack::ResetError |
( |
CBotError |
n, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
◆ SetRetType()
◆ GetRetType()
◆ SetProgram()
◆ GetProgram()
◆ CompileCall()
CompileCall.
- Parameters
-
- Returns
◆ CheckCall()
CheckCall Test if a procedure name is already defined somewhere.
- Parameters
-
- Returns
◆ NextToken()
bool CBot::CBotCStack::NextToken |
( |
CBotToken *& |
p | ) |
|
NextToken.
- Parameters
-
- Returns
The documentation for this class was generated from the following files:
- src/CBot/CBotCStack.h
- src/CBot/CBotCStack.cpp