12345678910111213141516171819202122232425262728293031323334 |
- #ifndef TOKEN_H
- #define TOKEN_H
- #include "TokenType.h"
- #include <string>
- using namespace std;
- class Token
- {
- public:
- Token(TokenType type, int line);
- virtual ~Token();
-
- void setFloat(float f);
- void setBool(bool b);
- void setString(string s);
-
- float getFloat() const;
- bool getBool() const;
- string getString() const;
- int getLine() const;
- TokenType getType() const;
- private:
- TokenType type;
- float f;
- string s;
- int line;
- };
- std::ostream& operator<< (std::ostream& stream, const Token& t);
- #endif
|