We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30d92a6 commit be96f4dCopy full SHA for be96f4d
include/rapidjson/internal/regex.h
@@ -395,8 +395,7 @@ class GenericRegex {
395
}
396
return false;
397
398
- default:
399
- RAPIDJSON_ASSERT(op == kOneOrMore);
+ case kOneOrMore:
400
if (operandStack.GetSize() >= sizeof(Frag)) {
401
Frag e = *operandStack.template Pop<Frag>(1);
402
SizeType s = NewState(kRegexInvalidState, e.start, 0);
@@ -405,6 +404,10 @@ class GenericRegex {
405
404
return true;
406
407
+
408
+ default:
409
+ // syntax error (e.g. unclosed kLeftParenthesis)
410
+ return false;
411
412
413
0 commit comments