function verify(node, pattern, flags) {
            const patternNode = parser.parsePattern(
                pattern,
                0,
                pattern.length,
                flags.includes("u")
            );
            const has = {
                surrogatePairWithoutUFlag: false,
                combiningClass: false,
                variationSelector: false,
                emojiModifier: false,
                regionalIndicatorSymbol: false,
                zwj: false
            };

            visitRegExpAST(patternNode, {
                onCharacterClassEnter(ccNode) {
                    for (const chars of iterateCharacterSequence(ccNode.elements)) {
                        for (const kind of kinds) {
                            has[kind] = has[kind] || hasCharacterSequence[kind](chars);
                        }
                    }
                }
            });

            for (const kind of kinds) {
                if (has[kind]) {
                    context.report({ node, messageId: kind });
                }
            }
        }
function verify(node, pattern, flags) {
            const patternNode = parser.parsePattern(
                pattern,
                0,
                pattern.length,
                flags.includes("u")
            );
            const has = {
                surrogatePairWithoutUFlag: false,
                combiningClass: false,
                variationSelector: false,
                emojiModifier: false,
                regionalIndicatorSymbol: false,
                zwj: false
            };

            visitRegExpAST(patternNode, {
                onCharacterClassEnter(ccNode) {
                    for (const chars of iterateCharacterSequence(ccNode.elements)) {
                        for (const kind of kinds) {
                            has[kind] = has[kind] || hasCharacterSequence[kind](chars);
                        }
                    }
                }
            });

            for (const kind of kinds) {
                if (has[kind]) {
                    context.report({ node, messageId: kind });
                }
            }
        }
function verify ( node , pattern , flags ) { const patternNode = parser . parsePattern ( pattern , 0 , pattern . length , flags . includes ( "u" ) ) ; const has = { surrogatePairWithoutUFlag : false , combiningClass : false , variationSelector : false , emojiModifier : false , regionalIndicatorSymbol : false , zwj : false } ; visitRegExpAST ( patternNode , { onCharacterClassEnter ( ccNode ) { for ( const chars of iterateCharacterSequence ( ccNode . elements ) ) { for ( const kind of kinds ) { has [ kind ] = has [ kind ] || hasCharacterSequence [ kind ] ( chars ) ; } } } } ) ; for ( const kind of kinds ) { if ( has [ kind ] ) { context . report ( { node , messageId : kind } ) ; } } }
Verify a given regular expression.
@param {Node} node The node to report.
@param {string} pattern The regular expression pattern to verify.
@param {string} flags The flags of the regular expression.
@returns {void}
Verify a given regular expression .
Verify a pattern