From aeb0d4f887a0c18c36b59acc7b5df08e62020c50 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 11 Oct 2020 21:32:48 +0300 Subject: Removed old homeworks --- homework/81352/ts2html-hw1/highlighter.cpp | 32 ------------------------------ 1 file changed, 32 deletions(-) delete mode 100644 homework/81352/ts2html-hw1/highlighter.cpp (limited to 'homework/81352/ts2html-hw1/highlighter.cpp') diff --git a/homework/81352/ts2html-hw1/highlighter.cpp b/homework/81352/ts2html-hw1/highlighter.cpp deleted file mode 100644 index 6c44066..0000000 --- a/homework/81352/ts2html-hw1/highlighter.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include "highlighter.h" - -Highlighter::Highlighter(std::vector tokens): tokens(tokens){} - -std::string Highlighter::highlight() { - std::ostringstream result; - result << ""; - result << "
";
-    if (!this->tokens.empty()) {
-        result << "1. ";
-    }
-    int line_number = 2;
-    for (Token token: this->tokens) { 
-        if (token.getTokenType() == TokenType::NEWLINE) {
-            result << "\n" << line_number++ << ". ";
-        } else {
-            result << "" << token.getTextValue() << "";
-        }
-    }
-    result << "
"; - return result.str(); -} -- cgit v1.3.1-26-gb76a