sqcompiler.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* see copyright notice in squirrel.h */
  2. #ifndef _SQCOMPILER_H_
  3. #define _SQCOMPILER_H_
  4. struct SQVM;
  5. #define TK_IDENTIFIER 258
  6. #define TK_STRING_LITERAL 259
  7. #define TK_INTEGER 260
  8. #define TK_FLOAT 261
  9. #define TK_BASE 262
  10. #define TK_DELETE 263
  11. #define TK_EQ 264
  12. #define TK_NE 265
  13. #define TK_LE 266
  14. #define TK_GE 267
  15. #define TK_SWITCH 268
  16. #define TK_ARROW 269
  17. #define TK_AND 270
  18. #define TK_OR 271
  19. #define TK_IF 272
  20. #define TK_ELSE 273
  21. #define TK_WHILE 274
  22. #define TK_BREAK 275
  23. #define TK_FOR 276
  24. #define TK_DO 277
  25. #define TK_NULL 278
  26. #define TK_FOREACH 279
  27. #define TK_IN 280
  28. #define TK_NEWSLOT 281
  29. #define TK_MODULO 282
  30. #define TK_LOCAL 283
  31. #define TK_CLONE 284
  32. #define TK_FUNCTION 285
  33. #define TK_RETURN 286
  34. #define TK_TYPEOF 287
  35. #define TK_UMINUS 288
  36. #define TK_PLUSEQ 289
  37. #define TK_MINUSEQ 290
  38. #define TK_CONTINUE 291
  39. #define TK_YIELD 292
  40. #define TK_TRY 293
  41. #define TK_CATCH 294
  42. #define TK_THROW 295
  43. #define TK_SHIFTL 296
  44. #define TK_SHIFTR 297
  45. #define TK_RESUME 298
  46. #define TK_DOUBLE_COLON 299
  47. #define TK_CASE 300
  48. #define TK_DEFAULT 301
  49. #define TK_THIS 302
  50. #define TK_PLUSPLUS 303
  51. #define TK_MINUSMINUS 304
  52. #define TK_3WAYSCMP 305
  53. #define TK_USHIFTR 306
  54. #define TK_CLASS 307
  55. #define TK_EXTENDS 308
  56. #define TK_CONSTRUCTOR 310
  57. #define TK_INSTANCEOF 311
  58. #define TK_VARPARAMS 312
  59. //#define TK_VARGC 313
  60. //#define TK_VARGV 314
  61. #define TK_TRUE 315
  62. #define TK_FALSE 316
  63. #define TK_MULEQ 317
  64. #define TK_DIVEQ 318
  65. #define TK_MODEQ 319
  66. #define TK_ATTR_OPEN 320
  67. #define TK_ATTR_CLOSE 321
  68. #define TK_STATIC 322
  69. #define TK_ENUM 323
  70. #define TK_CONST 324
  71. #define TK___LINE__ 325
  72. #define TK___FILE__ 326
  73. #define TK_IGNORE 327
  74. #define TK_LOCAL_CHAR_T 328
  75. #define TK_LOCAL_WCHAR_T 329
  76. #define TK_LOCAL_BOOL_T 330
  77. #define TK_LOCAL_TABLE_T 331
  78. #define TK_LOCAL_ARRAY_T 332
  79. #define TK_LOCAL_INT8_T 333
  80. #define TK_LOCAL_INT16_T 334
  81. #define TK_LOCAL_INT32_T 335
  82. #define TK_LOCAL_INT64_T 336
  83. #define TK_LOCAL_INT_T 337
  84. #define TK_LOCAL_UINT8_T 338
  85. #define TK_LOCAL_UINT16_T 339
  86. #define TK_LOCAL_UINT32_T 340
  87. #define TK_LOCAL_UINT64_T 341
  88. #define TK_LOCAL_UINT_T 342
  89. #define TK_LOCAL_FLOAT_T 343
  90. #define TK_LOCAL_DOUBLE_T 344
  91. #define TK_LOCAL_LONG_DOUBLE_T 345
  92. #define TK_BIT_AND_EQ 346
  93. #define TK_BIT_OR_EQ 347
  94. #define TK_BIT_XOR_EQ 348
  95. #define TK_BIT_SHIFT_LEFT_EQ 349
  96. #define TK_BIT_SHIFT_RIGHT_EQ 350
  97. typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s);
  98. bool Compile(SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out, bool raiseerror, bool lineinfo);
  99. #endif //_SQCOMPILER_H_