// This file is part of Cait . // Copyright (C) 2022-2022 Fuwn // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, version 3. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // Copyright (C) 2022-2022 Fuwn // SPDX-License-Identifier: GPL-3.0-only #ifndef CONTEXT_HH #define CONTEXT_HH #include #include #include #include "parser.hh" #include "token.hh" namespace cait { class context { private: std::map, node::node_set> identifiers; [[maybe_unused]] std::size_t jobs; public: explicit context(const parser &); [[maybe_unused]] auto variable(const std::string &) -> std::optional; [[maybe_unused]] auto rule(const std::string &) -> std::optional; [[maybe_unused]] auto build(const std::string &) -> std::optional; }; } // namespace cait #endif // CONTEXT_HH