-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify the implementations of the non-callback parse() API, to make it…
… posible for the new token parsingcode path to use that one unified implementation too. The previous implementation dispatched like parse() -> prefix_parse(), the latter of which is incompatible with token parsing.
- Loading branch information
Showing
5 changed files
with
219 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (C) 2024 T. Zachary Laine | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See | ||
// accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt) | ||
#ifndef BOOST_PARSER_LEXER_FWD_HPP | ||
#define BOOST_PARSER_LEXER_FWD_HPP | ||
|
||
#include <ranges> | ||
#include <vector> | ||
|
||
namespace boost { namespace parser { | ||
|
||
/** TODO */ | ||
template< | ||
std::ranges::contiguous_range V, | ||
typename Lexer, | ||
typename TokenCache = std::vector<typename Lexer::token_type>> | ||
requires std::ranges::view<V> | ||
struct tokens_view; | ||
|
||
namespace detail { | ||
template<typename T> | ||
constexpr bool is_tokens_view_v = false; | ||
template<typename V, typename Lexer, typename TokenCache> | ||
constexpr bool is_tokens_view_v<tokens_view<V, Lexer, TokenCache>> = | ||
true; | ||
} | ||
|
||
}} | ||
|
||
#endif |
Oops, something went wrong.