|
@@ -1,8 +1,8 @@
|
|
|
-/* see copyright notice in squirrel.h */
|
|
|
|
|
-#ifndef _SQCOMPILER_H_
|
|
|
|
|
-#define _SQCOMPILER_H_
|
|
|
|
|
-
|
|
|
|
|
-struct SQVM;
|
|
|
|
|
|
|
+/* see copyright notice in squirrel.h */
|
|
|
|
|
+#ifndef _SQCOMPILER_H_
|
|
|
|
|
+#define _SQCOMPILER_H_
|
|
|
|
|
+
|
|
|
|
|
+struct SQVM;
|
|
|
|
|
|
|
|
#define SQ_KEYWORDS_LIST() \
|
|
#define SQ_KEYWORDS_LIST() \
|
|
|
ENUM_TK(3WAYSCMP)\
|
|
ENUM_TK(3WAYSCMP)\
|
|
@@ -50,6 +50,7 @@ struct SQVM;
|
|
|
ENUM_TK(__FUNCTION__)\
|
|
ENUM_TK(__FUNCTION__)\
|
|
|
ENUM_TK(FUNCTION)\
|
|
ENUM_TK(FUNCTION)\
|
|
|
ENUM_TK(GE)\
|
|
ENUM_TK(GE)\
|
|
|
|
|
+ ENUM_TK(GOTO)\
|
|
|
ENUM_TK(IDENTIFIER)\
|
|
ENUM_TK(IDENTIFIER)\
|
|
|
ENUM_TK(IF)\
|
|
ENUM_TK(IF)\
|
|
|
ENUM_TK(IGNORE)\
|
|
ENUM_TK(IGNORE)\
|
|
@@ -129,7 +130,7 @@ struct SQVM;
|
|
|
//ENUM_TK(VARGV)
|
|
//ENUM_TK(VARGV)
|
|
|
|
|
|
|
|
#define ENUM_TK(tk) TK_##tk,
|
|
#define ENUM_TK(tk) TK_##tk,
|
|
|
-enum SQKeywordsEnum {
|
|
|
|
|
|
|
+enum SQKeywordsEnum {
|
|
|
TK_FIRST_ENUM_TOKEN = 258,
|
|
TK_FIRST_ENUM_TOKEN = 258,
|
|
|
/*
|
|
/*
|
|
|
the above token is only for internal purposes
|
|
the above token is only for internal purposes
|
|
@@ -143,8 +144,8 @@ enum SQKeywordsEnum {
|
|
|
TK_LAST_ENUM_TOKEN
|
|
TK_LAST_ENUM_TOKEN
|
|
|
};
|
|
};
|
|
|
#undef ENUM_TK
|
|
#undef ENUM_TK
|
|
|
-
|
|
|
|
|
-typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s);
|
|
|
|
|
|
|
+
|
|
|
|
|
+typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s);
|
|
|
bool Compile(SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out,
|
|
bool Compile(SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out,
|
|
|
- bool raiseerror, bool lineinfo, bool show_warnings, SQInteger max_nested_includes=10);
|
|
|
|
|
-#endif //_SQCOMPILER_H_
|
|
|
|
|
|
|
+ bool raiseerror, bool lineinfo, bool show_warnings, SQInteger max_nested_includes=10);
|
|
|
|
|
+#endif //_SQCOMPILER_H_
|