aboutsummaryrefslogtreecommitdiff
path: root/Compiler/src/compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Compiler/src/compiler.cpp')
-rw-r--r--Compiler/src/compiler.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Compiler/src/compiler.cpp b/Compiler/src/compiler.cpp
new file mode 100644
index 0000000..fd45e78
--- /dev/null
+++ b/Compiler/src/compiler.cpp
@@ -0,0 +1,12 @@
+#include "../includes/compiler.hpp"
+#include <regex>
+
+/* Encoded regexes using the Type enum (convert to integer) */
+static const std::regex REGEXES[] = {
+ std::regex("\\*(.*?)\\*"), std::regex("\\*\\*(.*?)\\*\\*"),
+ std::regex("_(.*?)_"), std::regex("~(.*?)~"), std::regex("-(.*)")};
+
+/* Encoded replacement strings using the Type enum (convert to integer) */
+static const char *REPLACEMENTS[] = {"<i>$1</i>", "<strong>$1</strong>",
+ "<u>$1</u>", "<s>$1</s>", "<li>$1</li>"};
+