diff options
| Commit | f5dc138f53ca4eb98063be5723785b79557e9cc3 (patch) | |
|---|---|---|
| Author | 2018-10-25 14:28:25 +0300 | |
| Committer | 2018-10-25 14:28:25 +0300 | |
| Files | 461884052c9d50364cd00188b3f5d0082c50184e /homework/81352/ts2html/token.h | |
| IPL-f5dc138f53ca4eb98063be5723785b79557e9cc3.tar IPL-f5dc138f53ca4eb98063be5723785b79557e9cc3.tar.gz IPL-f5dc138f53ca4eb98063be5723785b79557e9cc3.zip | ||
| Parent | a4c91889a67ec12057d08d21a81a1f4ed677fc67 (diff) | |
homework1: typescript syntax highlighter (#22)
1 files changed, 35 insertions, 0 deletions
| -rw-r--r-- | homework/81352/ts2html/token.h | 35 |
diff --git a/homework/81352/ts2html/token.h b/homework/81352/ts2html/token.h new file mode 100644 index 0000000..977a57c --- /dev/null +++ b/homework/81352/ts2html/token.h @@ -0,0 +1,35 @@ +#ifndef TOKEN +#define TOKEN + +#include <string> + +enum TokenType { + KEYWORD, + IDENTIFIER, + NUMBER, + OPERATOR, + STRING, + SEMICOLON, + LEFT_BLOCK_BRACKET, + RIGHT_BLOCK_BRACKET, + LEFT_BRACKET, + RIGHT_BRACKET, + NEWLINE, + WHITESPACE, + DECORATOR, + COMMENT, + OTHER, + UNRECOGNIZED +}; + +class Token { + private: + std::string text; + TokenType type; + public: + Token(std::string, TokenType); + std::string getTypeName(); + std::string getTextValue(); + TokenType getTokenType(); +}; +#endif
\ No newline at end of file |
