From ccd71ee220093774a35708d8c1e31936b012930a Mon Sep 17 00:00:00 2001 From: Dimitar Milev Date: Sat, 3 Nov 2018 12:52:28 +0100 Subject: 81352 - homework 2 (#32) * fix(hw1): use yyextra instead global variable * hw2: extended the typescript syntax highlighter with collapsible block structures --- homework/81352/ts2html/token.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 homework/81352/ts2html/token.cpp (limited to 'homework/81352/ts2html/token.cpp') diff --git a/homework/81352/ts2html/token.cpp b/homework/81352/ts2html/token.cpp deleted file mode 100644 index 97bdcdd..0000000 --- a/homework/81352/ts2html/token.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "token.h" - -Token::Token(std::string text, TokenType type): text(text), type(type) {} - -std::string Token::getTypeName() { - switch(this->type) { - case KEYWORD: return "keyword"; - case IDENTIFIER: return "identifier"; - case NUMBER: return "number"; - case OPERATOR: return "operator"; - case STRING: return "string"; - case OTHER: return "other"; - case SEMICOLON: return "semicolon"; - case LEFT_BLOCK_BRACKET: - case RIGHT_BLOCK_BRACKET: - case LEFT_BRACKET: - case RIGHT_BRACKET: return "bracket"; - case NEWLINE: - case WHITESPACE: return "whitespace"; - case DECORATOR: return "decorator"; - case COMMENT: return "comment"; - case UNRECOGNIZED: return "unrecognized"; - } - return ""; -} -std::string Token::getTextValue() { - return this->text; -} - -TokenType Token::getTokenType() { - return this->type; -} -- cgit v1.3.1-23-gd82d