Fix parsing of wildcard patterns at the ends of documents
- Remove special EOF handling from lexer - Explicitly exclude the EOF character from all-inclusive character sets.
This commit is contained in:
parent
a2b80098b2
commit
68d6e242ee
8 changed files with 98 additions and 39 deletions
|
|
@ -87,6 +87,7 @@ size_t CharacterSet::hash_code() const {
|
|||
result ^= hash<size_t>()(included_chars.size());
|
||||
for (auto &c : included_chars)
|
||||
result ^= hash<uint32_t>()(c);
|
||||
result <<= 1;
|
||||
result ^= hash<size_t>()(excluded_chars.size());
|
||||
for (auto &c : excluded_chars)
|
||||
result ^= hash<uint32_t>()(c);
|
||||
|
|
@ -118,6 +119,8 @@ string CharacterSet::to_string() const {
|
|||
|
||||
CharacterSet &CharacterSet::include_all() {
|
||||
includes_all = true;
|
||||
included_chars = {};
|
||||
excluded_chars = { 0 };
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue