xo-tokenizer: (clang 15) compiler nits
This commit is contained in:
parent
4fb94bc2d6
commit
830c6ebe55
3 changed files with 5 additions and 1 deletions
|
|
@ -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_);
|
||||
|
|
|
|||
|
|
@ -646,6 +646,8 @@ namespace xo {
|
|||
} else if (is_2char_punctuation(*ix)) {
|
||||
CharT ch1 = *ix;
|
||||
|
||||
(void)ch1;
|
||||
|
||||
++ix;
|
||||
|
||||
if (ix == input.hi()) {
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue