// SPDX-FileCopyrightText: 2023 kumquat-ir 66188216+kumquat-ir@users.noreply.github.com // // SPDX-License-Identifier: LGPL-3.0-only #include "qdcss.h" #include #include #include QRegularExpression ruleset_re = QRegularExpression(R"([#.]?(@?\w+?)\s*\{(.*?)\})", QRegularExpression::DotMatchesEverythingOption); QRegularExpression rule_re = QRegularExpression(R"((\S+?)\s*:\s*(?:\"(.*?)(?append(value); } } } std::optional* QDCSS::get(QString key) { auto found = m_data.find(key); if (found == m_data.end() || found->empty()) { return new std::optional; } return new std::optional(found->back()); }