Fix a bug and add document in regex
This commit is contained in:
parent
3eb19ceaf9
commit
c0e7c8304b
@ -42,7 +42,9 @@ static const SizeType kRegexInvalidRange = ~SizeType(0);
|
|||||||
- \c a{3} Exactly 3 times
|
- \c a{3} Exactly 3 times
|
||||||
- \c a{3,} At least 3 times
|
- \c a{3,} At least 3 times
|
||||||
- \c a{3,5} 3 to 5 times
|
- \c a{3,5} 3 to 5 times
|
||||||
- \c (ab)* Grouping
|
- \c (ab) Grouping
|
||||||
|
- \c ^a At the beginning
|
||||||
|
- \c a$ At the end
|
||||||
- \c . Any character
|
- \c . Any character
|
||||||
- \c [abc] Character classes
|
- \c [abc] Character classes
|
||||||
- \c [a-c] Character class range
|
- \c [a-c] Character class range
|
||||||
@ -606,8 +608,8 @@ private:
|
|||||||
else if (!(stateSet[index >> 5] & (1 << (index & 31)))) {
|
else if (!(stateSet[index >> 5] & (1 << (index & 31)))) {
|
||||||
stateSet[index >> 5] |= (1 << (index & 31));
|
stateSet[index >> 5] |= (1 << (index & 31));
|
||||||
*l.template Push<SizeType>() = index;
|
*l.template Push<SizeType>() = index;
|
||||||
return GetState(index).out == kRegexInvalidState;
|
|
||||||
}
|
}
|
||||||
|
return GetState(index).out == kRegexInvalidState;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MatchRange(SizeType rangeIndex, unsigned codepoint) const {
|
bool MatchRange(SizeType rangeIndex, unsigned codepoint) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user