token.h 399 B

1234567891011121314151617181920212223
  1. #ifndef AFUN_TOKEN_H
  2. #define AFUN_TOKEN_H
  3. #include "tool.hpp"
  4. enum af_TokenType {
  5. TK_ERROR = -1,
  6. TK_PREFIX = 0, // 前缀
  7. TK_LP = 1,
  8. TK_LB = 2,
  9. TK_LC = 3,
  10. TK_RP = 4,
  11. TK_RB = 5,
  12. TK_RC = 6,
  13. TK_ELEMENT_SHORT = 7,
  14. TK_ELEMENT_LONG = 8,
  15. TK_COMMENT = 9,
  16. TK_SPACE = 10,
  17. TK_EOF = 11,
  18. };
  19. typedef enum af_TokenType af_TokenType;
  20. #endif //AFUN_TOKEN_H