aboutsummaryrefslogtreecommitdiff
path: root/Compiler/src/compiler.cpp
blob: fd45e785346fe2dd6025d3dc319c0b32938dfb10 (plain)
1
2
3
4
5
6
7
8
9
10
11
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>"};