From d4f4589ead74f72be4fae29554e2d3805c41114a Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sat, 16 Nov 2024 14:29:03 -0600 Subject: [PATCH] Add TODOs. --- include/boost/parser/token_parser.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/parser/token_parser.hpp b/include/boost/parser/token_parser.hpp index e8d073ad..3da2bd47 100644 --- a/include/boost/parser/token_parser.hpp +++ b/include/boost/parser/token_parser.hpp @@ -54,6 +54,12 @@ namespace boost { namespace parser { template bool matches(std::basic_string_view value) const { + // TODO: this is wrong, maybe. Can we transcode both sides to + // UTF-32? We have a problem that the usual opt-in is not + // available; you cannot specify the input in terms of + // utfN_view. Maybe if CharType is not char, we do the + // transcoding? Try it that way, write some tests, and + // consider whether this is a good idea. return std::ranges::equal(value, value_); } @@ -185,6 +191,12 @@ namespace boost { namespace parser { token_parser(expected)); } + // TODO: Consider adding a special string_view-like type that can be + // passed to the range overload above. It would be based on + // adobe::name_t. When comparing it to a tokens' string_view, if it + // matches, it would replace the token's string_view, so that + // subsequent comparisons are O(1) in the length of the string. + Expected expected_; };