Token.h 423 B

1234567891011121314151617181920212223242526
  1. #ifndef TOKEN_H
  2. #define TOKEN_H
  3. #include "TokenType.h"
  4. #include <memory>
  5. #include "../base/Object.h"
  6. class Token
  7. {
  8. public:
  9. Token(TokenType tt, int line);
  10. virtual ~Token();
  11. TokenType getType() const;
  12. int getLine() const;
  13. virtual const void* getData() const;
  14. virtual string getDataString() const;
  15. virtual string toString() const;
  16. private:
  17. TokenType type;
  18. int line;
  19. };
  20. #endif