22 #include "CBot/CBotToken.h" 23 #include "CBot/CBotCStack.h" 264 static void IncLvl(std::string& label);
282 static bool ChkLvl(
const std::string& label,
int type);
322 static std::vector<std::string> m_labelLvl;
Class for one CBot instruction.
Definition: CBotInstr.h:86
virtual void RestoreState(CBotStack *&pj, bool bMain)
RestoreState.
Definition: CBotInstr.cpp:289
The execution stack.
Definition: CBotStack.h:44
int GetTokenType()
GetTokenType Return the type of the token assicated with the instruction.
Definition: CBotInstr.cpp:114
static CBotInstr * Compile(CBotToken *&p, CBotCStack *pStack)
Compile an instruction.
Definition: CBotInstr.cpp:168
virtual bool Execute(CBotStack *&pj)
Execute.
Definition: CBotInstr.cpp:273
Compilation of assignment of an array - {{1, 2, 3}, {3, 2, 1}}.
Definition: CBotListArray.h:30
CBotToken m_token
Keeps the token.
Definition: CBotInstr.h:304
virtual std::string GetDebugData()
Returns additional data associated with this instruction for debugging purposes.
Definition: CBotInstr.h:295
Various utilities used for debugging.
Definition: CBotDebug.h:29
void AddNext3(CBotInstr *n)
AddNext3.
Definition: CBotInstr.cpp:134
A CBot variable.
Definition: CBotVar.h:42
static CBotInstr * CompileArray(CBotToken *&p, CBotCStack *pStack, CBotTypResult type, bool first=true)
CompileArray.
Definition: CBotInstr.cpp:322
CBotInstr * m_next3b
Necessary for reporting tables.
Definition: CBotInstr.h:312
CBotToken * GetToken()
GetToken Return associated token.
Definition: CBotInstr.cpp:120
The CBotCStack class Management of the stack of compilation.
Definition: CBotCStack.h:35
CBotInstr * GetNext3b()
GetNext3b.
Definition: CBotInstr.cpp:162
void AddNext3b(CBotInstr *n)
AddNext3b.
Definition: CBotInstr.cpp:142
static int m_LoopLvl
Counter of nested loops, to determine the break and continue valid.
Definition: CBotInstr.h:315
void AddNext(CBotInstr *n)
AddNext Adds the statement following the other.
Definition: CBotInstr.cpp:126
virtual std::map< std::string, CBotInstr * > GetDebugLinks()
Definition: CBotInstr.cpp:362
static void DecLvl()
DecLvl Free a level.
Definition: CBotInstr.cpp:88
Definition of an integer variable - int a, b = 12.
Definition: CBotDefInt.h:30
virtual bool CompCase(CBotStack *&pj, int val)
CompCase This routine is defined only for the subclass CBotCase this allows to make the call on all i...
Definition: CBotInstr.cpp:316
virtual void RestoreStateVar(CBotStack *&pile, bool bMain)
RestoreStateVar.
Definition: CBotInstr.cpp:310
Definition of class instance variable.
Definition: CBotDefClass.h:40
CBotInstr * m_next
Linked command.
Definition: CBotInstr.h:306
CBotInstr * GetNext3()
GetNext3.
Definition: CBotInstr.cpp:156
CBotInstr * m_next2b
Second list definition chain.
Definition: CBotInstr.h:308
virtual bool ExecuteVar(CBotVar *&pVar, CBotCStack *&pile)
ExecuteVar.
Definition: CBotInstr.cpp:296
void SetToken(CBotToken *p)
SetToken Set the token corresponding to the instruction.
Definition: CBotInstr.cpp:108
static bool ChkLvl(const std::string &label, int type)
ChkLvl Control validity of break and continue.
Definition: CBotInstr.cpp:95
virtual const std::string GetDebugName()=0
Returns the name of this class.
Class to define the complete type of a variable.
Definition: CBotTypResult.h:47
static void IncLvl()
IncLvl Adds a level (switch statement).
Definition: CBotInstr.cpp:80
CBotInstr()
Constructor.
Definition: CBotInstr.cpp:54
CBot engine.
Definition: CBotCallMethode.cpp:28
CBotInstr * m_next3
Third list for indices and fields.
Definition: CBotInstr.h:310
CBotInstr * GetNext()
GetNext Returns next statement.
Definition: CBotInstr.cpp:150
virtual ~CBotInstr()
Destructor.
Definition: CBotInstr.cpp:63
Class representing one token of a program.
Definition: CBotToken.h:80