xo-tokenizer: (clang 15) compiler nits

This commit is contained in:
Roland Conybeare 2025-05-08 23:46:28 -05:00
commit 830c6ebe55
3 changed files with 5 additions and 1 deletions

View file

@ -71,7 +71,7 @@ namespace xo {
/** @brief create span with first @p z members of this span removed **/
span after_prefix(size_type z) const {
if (z > hi_ - lo_)
if (lo_ + z > hi_)
z = hi_ - lo_;
return span(lo_ + z, hi_);

View file

@ -646,6 +646,8 @@ namespace xo {
} else if (is_2char_punctuation(*ix)) {
CharT ch1 = *ix;
(void)ch1;
++ix;
if (ix == input.hi()) {

View file

@ -111,6 +111,8 @@ namespace xo {
{"let", false, token::let(), true},
{"in", false, token::in(), true},
{"end", false, token::end(), true},
{"*", false, token::star_token(), true},
};
}