Fixed many parsing and logic bugs.

Finished more opcodes.
This commit is contained in:
David Anderson
2004-08-07 17:07:50 +00:00
parent a1e955370b
commit e61fa39515
8 changed files with 489 additions and 160 deletions

View File

@ -23,6 +23,23 @@
#ifndef _INCLUDE_AMXCOMPILER_H
#define _INCLUDE_AMXCOMPILER_H
#define CHK_PARAMS(d) \
if (paramList.size() > d) \
{ \
CError->ErrorMsg(Warning_Param_Count, paramList.size(), d); \
} else if (paramList.size() < d) { \
CError->ErrorMsg(Err_Param_Count, paramList.size(), d); \
delete ASM; \
ASM = 0; \
}
#define PUSH_PARAM(n,sym) \
if (paramList.size() >= n) \
{ \
ASM->params.push_back(Eval(*(paramList[n-1]), sym)); \
lastCip++; \
}
typedef enum
{
Token_None,
@ -60,6 +77,7 @@ public:
bool Compile();
int CurLine() { return curLine; }
ErrorMngr *ErrorHandler() { return CError; }
void PrintCodeList();
public:
int FindArguments(std::string &text, std::vector<std::string*> &List, int &end, bool simple = false);
private: