From 3e3330b046e250a66b212e8a569f5e1ca88cde81 Mon Sep 17 00:00:00 2001 From: lejulien Date: Tue, 19 May 2026 19:35:52 +0200 Subject: [PATCH] Load symbols from the json --- main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.cpp b/main.cpp index 5071d7e..efb979f 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,9 @@ #include #include #include +#include + +#include // Comp map const std::map compMap = { @@ -92,7 +95,14 @@ static inline std::string strip(const std::string &s) { return result; } +using symbolsMap = std::map; + int main() { + // Load predefined symbols + std::ifstream file("./symbols.json"); + nlohmann::json symbols_json = nlohmann::json::parse(file); + symbolsMap symbols_map = symbols_json.get(); + std::string line; while (std::getline(std::cin, line)) { line = trim(line);