tokens.h 967 B

12345678910111213141516171819202122232425262728293031
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. /*****************************************************************************
  7. *
  8. * Define the token kind enum. Note that all entries from the keyword
  9. * table are defined first, such that the first entry has the value 0.
  10. */
  11. enum tokens
  12. {
  13. tkNone,
  14. #define KEYWORD(tk,...) tk,
  15. #define TOK_DCL(tk,...) tk,
  16. #include "keywords.h"
  17. tkLimKwd,
  18. tkLastKwd = tkLimKwd - 1,
  19. tkEOF, // end of source code
  20. tkIntCon, // integer literal
  21. tkFltCon, // floating literal
  22. tkStrCon, // string literal
  23. tkRegExp, // regular expression literal
  24. tkLim
  25. };