mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 11:16:29 +03:00
parser: ignore \E that is not preceded by \Q
This conforms to PCRE's behaviour, where an isolated \E that is not preceded by \Q is ignored.
This commit is contained in:
committed by
Matthew Barr
parent
c58d9d04a1
commit
67e450115a
@@ -1226,9 +1226,8 @@ unichar readUtf8CodePoint4c(const u8 *ts) {
|
||||
'\\Q' => {
|
||||
fgoto readQuotedLiteral;
|
||||
};
|
||||
'\\E' => {
|
||||
throw LocatedParseError("Unmatched \\E");
|
||||
};
|
||||
# An \E that is not preceded by a \Q is ignored
|
||||
'\\E' => { /* noop */ };
|
||||
# Match any character
|
||||
'\.' => {
|
||||
currentSeq->addComponent(generateComponent(CLASS_ANY, false, mode));
|
||||
|
Reference in New Issue
Block a user