Skip to content

Commit

Permalink
Add TODOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzlaine committed Nov 29, 2024
1 parent 178d62a commit d4f4589
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/boost/parser/token_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ namespace boost { namespace parser {
template<typename CharType>
bool matches(std::basic_string_view<CharType> 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_);
}

Expand Down Expand Up @@ -185,6 +191,12 @@ namespace boost { namespace parser {
token_parser<token_spec, decltype(expected)>(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_;
};

Expand Down

0 comments on commit d4f4589

Please sign in to comment.