Token.cs 645 B

123456789101112131415161718192021222324252627282930
  1. namespace Jint.Parser
  2. {
  3. public enum Tokens
  4. {
  5. BooleanLiteral = 1,
  6. EOF = 2,
  7. Identifier = 3,
  8. Keyword = 4,
  9. NullLiteral = 5,
  10. NumericLiteral = 6,
  11. Punctuator = 7,
  12. StringLiteral = 8,
  13. RegularExpression = 9
  14. };
  15. public class Token
  16. {
  17. public static Token Empty = new Token();
  18. public Tokens Type;
  19. public string Literal;
  20. public object Value;
  21. public int[] Range;
  22. public int? LineNumber;
  23. public int LineStart;
  24. public bool Octal;
  25. public Location Location;
  26. public int Precedence;
  27. }
  28. }