| 5619 | enum class ParseResultType { Matched, NoMatch, ShortCircuitAll, ShortCircuitSame }; |
| 5620 | |
| 5621 | class ParseState { |
| 5622 | public: |
| 5623 | ParseState(ParseResultType type, TokenStream const &remainingTokens) |
| 5624 | : m_type(type), m_remainingTokens(remainingTokens) { |
| 5625 | } |
| 5626 | |
| 5627 | auto type() const -> ParseResultType { |
| 5628 | return m_type; |
| 5629 | } |
| 5630 | auto remainingTokens() const -> TokenStream { |
| 5631 | return m_remainingTokens; |
| 5632 | } |
| 5633 | |
| 5634 | private: |
| 5635 | ParseResultType m_type; |
| 5636 | TokenStream m_remainingTokens; |
| 5637 | }; |
| 5638 | |
| 5639 | using Result = BasicResult<void>; |
| 5640 | using ParserResult = BasicResult<ParseResultType>; |