aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/yarr/YarrErrorCode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/masm/yarr/YarrErrorCode.h')
-rw-r--r--src/3rdparty/masm/yarr/YarrErrorCode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/3rdparty/masm/yarr/YarrErrorCode.h b/src/3rdparty/masm/yarr/YarrErrorCode.h
index 48f2bb7900..3f06a6bff1 100644
--- a/src/3rdparty/masm/yarr/YarrErrorCode.h
+++ b/src/3rdparty/masm/yarr/YarrErrorCode.h
@@ -60,6 +60,13 @@ inline bool hasError(ErrorCode errorCode)
{
return errorCode != ErrorCode::NoError;
}
+
+inline bool hasHardError(ErrorCode errorCode)
+{
+ // TooManyDisjunctions means that we ran out stack compiling.
+ // All other errors are due to problems in the expression.
+ return hasError(errorCode) && errorCode != ErrorCode::TooManyDisjunctions;
+}
JS_EXPORT_PRIVATE JSObject* errorToThrow(ExecState*, ErrorCode);
} } // namespace JSC::Yarr