Václav Kubernát | 195eeea | 2018-05-18 13:52:36 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/ |
| 3 | * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/ |
| 4 | * |
| 5 | * Written by Václav Kubernát <kubervac@fit.cvut.cz> |
| 6 | * |
| 7 | */ |
| 8 | |
Václav Kubernát | 48fc383 | 2018-05-28 14:21:22 +0200 | [diff] [blame] | 9 | #include "schema.hpp" |
Václav Kubernát | 195eeea | 2018-05-18 13:52:36 +0200 | [diff] [blame] | 10 | struct ParserContext { |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 11 | ParserContext(const Schema& schema, const schemaPath_& curDir); |
Václav Kubernát | 48fc383 | 2018-05-28 14:21:22 +0200 | [diff] [blame] | 12 | const Schema& m_schema; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 13 | schemaPath_ m_curPath; |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 14 | const schemaPath_ m_curPathOrig; |
Václav Kubernát | 744f57f | 2018-06-29 22:46:26 +0200 | [diff] [blame] | 15 | boost::optional<std::string> m_curModule; |
Václav Kubernát | 195eeea | 2018-05-18 13:52:36 +0200 | [diff] [blame] | 16 | std::string m_errorMsg; |
| 17 | std::string m_tmpListName; |
Václav Kubernát | 744f57f | 2018-06-29 22:46:26 +0200 | [diff] [blame] | 18 | bool m_topLevelModulePresent = false; |
Václav Kubernát | 195eeea | 2018-05-18 13:52:36 +0200 | [diff] [blame] | 19 | std::set<std::string> m_tmpListKeys; |
| 20 | bool m_errorHandled = false; |
Václav Kubernát | ac035d6 | 2019-02-18 10:59:08 +0100 | [diff] [blame] | 21 | bool m_completing = false; |
Václav Kubernát | 4108e0d | 2018-10-29 13:32:22 +0100 | [diff] [blame] | 22 | std::set<std::string> m_suggestions; |
| 23 | // Iterator pointing to where suggestions were created |
| 24 | std::string::const_iterator m_completionIterator; |
Václav Kubernát | 4c32548 | 2019-04-11 17:51:55 +0200 | [diff] [blame] | 25 | // If the parser determines that suggestions are unambiguous (after |
| 26 | // filtering by prefix), this suffix gets added to the completion (for |
| 27 | // example a left bracket after a list) |
| 28 | std::string m_completionSuffix; |
Václav Kubernát | 195eeea | 2018-05-18 13:52:36 +0200 | [diff] [blame] | 29 | }; |