| 263 | |
| 264 | template <typename Range> |
| 265 | void Parse(Range& args, std::size_t const pos = 0) |
| 266 | { |
| 267 | GetState().Pos = pos; |
| 268 | for (cm::string_view arg : args) { |
| 269 | for (size_t j = 0; j < FindKeywordOwnerLevel(arg); ++j) { |
| 270 | this->PopState(); |
| 271 | } |
| 272 | |
| 273 | this->Consume(arg); |
| 274 | GetState().Pos++; |
| 275 | } |
| 276 | |
| 277 | this->FinishKeyword(); |
| 278 | |
| 279 | while (this->Stack.size() > 1) { |
| 280 | this->FinishKeyword(); |
| 281 | this->PopState(); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | std::size_t FindKeywordOwnerLevel(cm::string_view arg) const |
| 286 | { |