Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81270 / js2html / Highlighter.h
diff options
context:
space:
mode:
1 files changed, 24 insertions, 0 deletions
-rw-r--r--homework/81270/js2html/Highlighter.h24
diff --git a/homework/81270/js2html/Highlighter.h b/homework/81270/js2html/Highlighter.h
new file mode 100644
index 0000000..a655480
--- /dev/null
+++ b/homework/81270/js2html/Highlighter.h
@@ -0,0 +1,24 @@
+//
+// Created by bmestanov on 25.10.18.
+//
+
+#ifndef ES2HTML_HIGHLIGHTER_H
+#define ES2HTML_HIGHLIGHTER_H
+
+#include "Token.h"
+
+class Highlighter {
+public:
+ explicit Highlighter(const char *outputPath = nullptr, const char *stylePath = "style.css");
+
+ void highlight(const IPLVector<Token> &tokens);
+
+private:
+ const char *stylePath;
+ const char *outputPath;
+
+ static IPLString getClass(const Token &token);
+};
+
+
+#endif //ES2HTML_HIGHLIGHTER_H