Skip to content

Commit

Permalink
Add much longer lexing test; fix errors.
Browse files Browse the repository at this point in the history
See #202.
  • Loading branch information
tzlaine committed Nov 8, 2024
1 parent 8854328 commit 52d9cb5
Show file tree
Hide file tree
Showing 2 changed files with 605 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/boost/parser/lexer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ namespace boost { namespace parser {
return parse_spec{token_parsed_type::character, base};
} else if constexpr (std::is_same_v<value_t, none>) {
return parse_spec{token_parsed_type::string_view, base};
} else if constexpr (std::is_same_v<value_t, bool>) {
return parse_spec{token_parsed_type::bool_, base};
} else if constexpr (std::is_same_v<value_t, signed char>) {
return parse_spec{token_parsed_type::signed_char, base};
} else if constexpr (std::is_same_v<value_t, unsigned char>) {
Expand Down Expand Up @@ -878,8 +880,7 @@ namespace boost { namespace parser {
auto const ctre_last = ctre_range.end();

size_t i = parent_->tokens_.size();
for (; i < new_size && ctre_first != ctre_last;
++i, ++ctre_first) {
for (; i < new_size && ctre_first != ctre_last; ++ctre_first) {
auto const parse_results = *ctre_first;

if constexpr (Lexer::has_ws) {
Expand All @@ -893,6 +894,8 @@ namespace boost { namespace parser {
}
}

++i;

detail::hl::fold_n<Lexer::size()>(
string_view{}, [&](auto state, auto i) {
if constexpr (!i.value) {
Expand Down
Loading

0 comments on commit 52d9cb5

Please sign in to comment.