From 47f83f09217b790667bb2a4418522eb84e045897 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 20 Jun 2024 13:52:00 +0900 Subject: [PATCH 001/143] Restore current progress --- crates/oxc_regexp_parser/_oxc_js_regex/ast.rs | 391 ++++ .../_oxc_js_regex/ast_builder.rs | 73 + .../_oxc_js_regex/ast_kind.rs | 25 + .../_oxc_js_regex/ecma_version.rs | 22 + crates/oxc_regexp_parser/_oxc_js_regex/lib.rs | 6 + .../oxc_regexp_parser/_oxc_js_regex/parser.rs | 1604 +++++++++++++++++ .../oxc_regexp_parser/_oxc_js_regex/util.rs | 84 + 7 files changed, 2205 insertions(+) create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ast.rs create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/lib.rs create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/parser.rs create mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/util.rs diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ast.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ast.rs new file mode 100644 index 0000000000000..f4e5900b8da32 --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/ast.rs @@ -0,0 +1,391 @@ +//! [`@eslint-community/regexpp`](https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/ast.ts) + +use oxc_allocator::{Box, Vec}; +use oxc_span::{Atom, Span}; + +use crate::ast_kind::AstKind; + +/// The type which includes all nodes. +#[derive(Debug)] +pub enum Node<'a> { + Branch(Box<'a, Branch<'a>>), + Leaf(Box<'a, Leaf<'a>>), +} + +/// The type which includes all branch nodes. +#[derive(Debug)] +pub enum Branch<'a> { + Alternative(Box<'a, Alternative<'a>>), + CapturingGroup(Box<'a, CapturingGroup<'a>>), + CharacterClass(Box<'a, CharacterClass<'a>>), + CharacterClassRange(Box<'a, CharacterClassRange>), + ClassIntersection(Box<'a, ClassIntersection<'a>>), + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), + ClassSubtraction(Box<'a, ClassSubtraction<'a>>), + ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + Group(Box<'a, Group<'a>>), + LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), + Pattern(Box<'a, Pattern<'a>>), + Quantifier(Box<'a, Quantifier<'a>>), + RegExpLiteral(Box<'a, RegExpLiteral<'a>>), + StringAlternative(Box<'a, StringAlternative<'a>>), +} + +/// The type which includes all leaf nodes. +#[derive(Debug)] +pub enum Leaf<'a> { + Backreference(Box<'a, Backreference<'a>>), + BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), + Character(Box<'a, Character>), + CharacterSet(Box<'a, CharacterSet<'a>>), + Flags(Box<'a, Flags>), +} + +/// The type which includes all atom nodes. +#[derive(Debug)] +pub enum Element<'a> { + Assertion(Assertion<'a>), + QuantifiableElement(QuantifiableElement<'a>), + Quantifier(Box<'a, Quantifier<'a>>), +} + +/// The type which includes all atom nodes that Quantifier node can have as children. +#[derive(Debug)] +pub enum QuantifiableElement<'a> { + Backreference(Backreference<'a>), + CapturingGroup(CapturingGroup<'a>), + Character(Character), + CharacterClass(CharacterClass<'a>), + CharacterSet(CharacterSet<'a>), + ExpressionCharacterClass(ExpressionCharacterClass<'a>), + Group(Group<'a>), + LookaheadAssertion(LookaheadAssertion<'a>), +} + +/// The type which includes all character class atom nodes. +#[derive(Debug)] +pub enum CharacterClassElement<'a> { + ClassRangesCharacterClassElement(ClassRangesCharacterClassElement), + UnicodeSetsCharacterClassElement(UnicodeSetsCharacterClassElement<'a>), +} +#[derive(Debug)] +pub enum ClassRangesCharacterClassElement { + Character(Character), + CharacterClassRange(CharacterClassRange), + CharacterUnicodePropertyCharacterSet(CharacterUnicodePropertyCharacterSet), + EscapeCharacterSet(EscapeCharacterSet), +} +#[derive(Debug)] +pub enum UnicodeSetsCharacterClassElement<'a> { + Character(Character), + CharacterClassRange(CharacterClassRange), + ClassStringDisjunction(ClassStringDisjunction<'a>), + EscapeCharacterSet(EscapeCharacterSet), + ExpressionCharacterClass(ExpressionCharacterClass<'a>), + UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), + UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), +} + +/// The root node. +#[derive(Debug)] +pub struct RegExpLiteral<'a> { + pub span: Span, + pub pattern: Pattern<'a>, + pub flags: Flags, +} + +/// The pattern. +#[derive(Debug)] +pub struct Pattern<'a> { + pub span: Span, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The alternative. +/// E.g. `a|b` +#[derive(Debug)] +pub struct Alternative<'a> { + pub span: Span, + pub elements: Vec<'a, Element<'a>>, +} + +/// The uncapturing group. +/// E.g. `(?:ab)` +#[derive(Debug)] +pub struct Group<'a> { + pub span: Span, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The capturing group. +/// E.g. `(ab)`, `(?ab)` +#[derive(Debug, Default)] +pub struct CapturingGroup<'a> { + pub span: Span, + pub name: Option, + pub alternatives: Vec<'a, Alternative<'a>>, + pub references: Vec<'a, Backreference<'a>>, +} + +/// The lookaround assertion. +#[derive(Debug)] +pub enum LookaroundAssertion<'a> { + LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), + LookbehindAssertion(Box<'a, LookbehindAssertion<'a>>), +} + +/// The lookahead assertion. +/// E.g. `(?=ab)`, `(?!ab)` +#[derive(Debug)] +pub struct LookaheadAssertion<'a> { + pub span: Span, + pub negate: bool, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The lookbehind assertion. +/// E.g. `(?<=ab)`, `(? { + pub span: Span, + pub negate: bool, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The quantifier. +/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` +#[derive(Debug)] +pub struct Quantifier<'a> { + pub span: Span, + /// https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/validator.ts#L384-L398 + /// both `min` and `max` are integer + pub min: usize, + pub max: usize, + pub greedy: bool, + pub element: QuantifiableElement<'a>, +} + +/// The character class. +/// E.g. `[ab]`, `[^ab]` +#[derive(Debug)] +pub enum CharacterClass<'a> { + ClassRangesCharacterClass(Box<'a, ClassRangesCharacterClass<'a>>), + UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), +} + +/// The character class used in legacy (neither `u` nor `v` flag) and Unicode mode (`u` flag). +/// This character class is guaranteed to **not** contain strings. +/// In Unicode sets mode (`v` flag), {@link UnicodeSetsCharacterClass} is used. +#[derive(Debug)] +pub struct ClassRangesCharacterClass<'a> { + pub span: Span, + pub unicode_sets: bool, + pub elements: Vec<'a, ClassRangesCharacterClassElement>, +} + +/// The character class used in Unicode sets mode (`v` flag). +/// This character class may contain strings. +#[derive(Debug)] +pub struct UnicodeSetsCharacterClass<'a> { + pub span: Span, + pub elements: Vec<'a, UnicodeSetsCharacterClassElement<'a>>, +} + +/// The character class. +/// E.g. `[a-b]` +#[derive(Debug)] +pub struct CharacterClassRange { + pub span: Span, + pub min: Character, + pub max: Character, +} + +/// The assertion. +#[derive(Debug)] +pub enum Assertion<'a> { + BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), + LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), +} + +/// The boundary assertion. +#[derive(Debug)] +pub enum BoundaryAssertion<'a> { + EdgeAssertion(Box<'a, EdgeAssertion>), + WordBoundaryAssertion(Box<'a, WordBoundaryAssertion>), +} + +/// The edge boundary assertion. +/// E.g. `^`, `$` +#[derive(Debug)] +pub struct EdgeAssertion { + pub span: Span, + pub kind: EdgeAssertionKind, +} + +#[derive(Debug)] +pub enum EdgeAssertionKind { + Start, + End, +} + +/// The word boundary assertion. +/// E.g. `\b`, `\B` +#[derive(Debug)] +pub struct WordBoundaryAssertion { + pub span: Span, + pub negate: bool, +} + +/// The character set. +#[derive(Debug)] +pub enum CharacterSet<'a> { + AnyCharacterSet, + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), +} + +/// The character class escape. +/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` +#[derive(Debug)] +pub struct EscapeCharacterSet { + pub span: Span, + pub kind: EscapeCharacterSetKind, + pub negate: bool, +} + +#[derive(Debug)] +pub enum EscapeCharacterSetKind { + Digit, + Space, + Word, +} + +/// The unicode property escape. +/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` +#[derive(Debug)] +pub enum UnicodePropertyCharacterSet<'a> { + CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet>), + StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet>), +} + +#[derive(Debug)] +pub struct CharacterUnicodePropertyCharacterSet { + pub span: Span, + pub key: Atom, + pub value: Option, + pub negate: bool, +} + +/// StringsUnicodePropertyCharacterSet is Unicode property escape with property of strings. +#[derive(Debug)] +pub struct StringsUnicodePropertyCharacterSet { + pub span: Span, + pub key: Atom, +} + +/// The expression character class. +/// E.g. `[a--b]`, `[a&&b]`,`[^a--b]`, `[^a&&b]` +#[derive(Debug)] +pub struct ExpressionCharacterClass<'a> { + pub span: Span, + pub negate: bool, + pub expression: ExpressionCharacterClassExpr<'a>, +} + +#[derive(Debug)] +pub enum ExpressionCharacterClassExpr<'a> { + ClassIntersection(Box<'a, ClassIntersection<'a>>), + ClassSubtraction(Box<'a, ClassSubtraction<'a>>), +} + +#[derive(Debug)] +pub enum ClassSetOperand<'a> { + Character(Box<'a, Character>), + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), + UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), +} + +/// The character class intersection. +/// E.g. `a&&b` +#[derive(Debug)] +pub struct ClassIntersection<'a> { + pub span: Span, + pub left: ClassIntersectionLeft<'a>, + pub right: ClassSetOperand<'a>, +} + +#[derive(Debug)] +pub enum ClassIntersectionLeft<'a> { + ClassIntersection(Box<'a, ClassIntersection<'a>>), + ClassSetOperand(Box<'a, ClassSetOperand<'a>>), +} + +/// The character class subtraction. +/// E.g. `a--b` +#[derive(Debug)] +pub struct ClassSubtraction<'a> { + pub span: Span, + pub left: ClassSubtractionLeft<'a>, + pub right: ClassSetOperand<'a>, +} + +#[derive(Debug)] +pub enum ClassSubtractionLeft<'a> { + ClassSetOperand(Box<'a, ClassSetOperand<'a>>), + ClassSubtraction(Box<'a, ClassSubtraction<'a>>), +} + +/// The character class string disjunction. +/// E.g. `\q{a|b}` +#[derive(Debug)] +pub struct ClassStringDisjunction<'a> { + pub span: Span, + pub alternatives: Vec<'a, StringAlternative<'a>>, +} + +/// StringAlternative is only used for `\q{alt}`({@link ClassStringDisjunction}). +#[derive(Debug)] +pub struct StringAlternative<'a> { + pub span: Span, + pub elements: Vec<'a, Character>, +} + +/// This includes escape sequences which mean a character. +/// E.g. `a`, `あ`, `✿`, `\x65`, `\u0065`, `\u{65}`, `\/` +#[derive(Debug)] +pub struct Character { + pub span: Span, + pub value: char, // UTF-16 code point +} + +#[derive(Debug)] +pub enum BackreferenceRef { + Number(i32), + Atom(Atom), +} + +/// The backreference. +/// E.g. `\1`, `\k` +#[derive(Debug)] +pub struct Backreference<'a> { + pub span: Span, + pub reference: BackreferenceRef, + pub resolved: CapturingGroup<'a>, +} + +/// The flags. +#[derive(Debug)] +pub struct Flags { + pub span: Span, + pub dot_all: bool, + pub global: bool, + pub has_indices: bool, + pub ignore_case: bool, + pub multiline: bool, + pub sticky: bool, + pub unicode: bool, + pub unicode_sets: bool, +} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs new file mode 100644 index 0000000000000..c94434cdf8a06 --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs @@ -0,0 +1,73 @@ +use oxc_allocator::{Allocator, Box, String, Vec}; +use oxc_span::{Atom, GetSpan, SourceType, Span}; + +#[allow(clippy::wildcard_imports)] +use crate::ast::*; + +/// AST builder for creating AST nodes +pub struct AstBuilder<'a> { + pub allocator: &'a Allocator, +} + +impl<'a> AstBuilder<'a> { + pub fn new(allocator: &'a Allocator) -> Self { + Self { allocator } + } + + #[inline] + pub fn alloc(&self, value: T) -> Box<'a, T> { + Box(self.allocator.alloc(value)) + } + + #[inline] + pub fn new_vec(&self) -> Vec<'a, T> { + Vec::new_in(self.allocator) + } + + #[inline] + pub fn new_vec_with_capacity(&self, capacity: usize) -> Vec<'a, T> { + Vec::with_capacity_in(capacity, self.allocator) + } + + #[inline] + pub fn new_vec_single(&self, value: T) -> Vec<'a, T> { + let mut vec = self.new_vec_with_capacity(1); + vec.push(value); + vec + } + + #[inline] + pub fn new_str(&self, value: &str) -> &'a str { + String::from_str_in(value, self.allocator).into_bump_str() + } + + pub fn copy(&self, src: &T) -> T { + // SAFETY: + // This should be safe as long as `src` is an reference from the allocator. + // But honestly, I'm not really sure if this is safe. + unsafe { std::mem::transmute_copy(src) } + } + + pub fn alternative(&mut self, span: Span, elements: Vec<'a, Element<'a>>) -> Branch<'a> { + Branch::Alternative(self.alloc(Alternative { span, elements })) + } + + pub fn capturing_group( + &mut self, + span: Span, + name: Option, + alternatives: Vec<'a, Alternative<'a>>, + references: Vec<'a, Backreference<'a>>, + ) -> Branch<'a> { + Branch::CapturingGroup(self.alloc(CapturingGroup { span, name, alternatives, references })) + } + + pub fn reg_exp_literal( + &mut self, + span: Span, + flags: Flags, + pattern: Pattern<'a>, + ) -> RegExpLiteral<'a> { + RegExpLiteral { span, pattern, flags } + } +} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs new file mode 100644 index 0000000000000..97eb10619a408 --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs @@ -0,0 +1,25 @@ +use super::ast::*; + +#[allow(unused)] +#[derive(Debug)] +pub enum AstKind<'a> { + Alternative(&'a Alternative<'a>), + CapturingGroup(&'a CapturingGroup<'a>), + CharacterClass(&'a CharacterClass<'a>), + CharacterClassRange(&'a CharacterClassRange), + ClassIntersection(&'a ClassIntersection<'a>), + ClassStringDisjunction(&'a ClassStringDisjunction<'a>), + ClassSubtraction(&'a ClassSubtraction<'a>), + ExpressionCharacterClass(&'a ExpressionCharacterClass<'a>), + Group(&'a Group<'a>), + LookaroundAssertion(&'a LookaroundAssertion<'a>), + Pattern(&'a Pattern<'a>), + Quantifier(&'a Quantifier<'a>), + RegExpLiteral(&'a RegExpLiteral<'a>), + StringAlternative(&'a StringAlternative<'a>), + Backreference(&'a Backreference<'a>), + BoundaryAssertion(&'a BoundaryAssertion<'a>), + Character(&'a Character), + CharacterSet(&'a CharacterSet<'a>), + Flags(&'a Flags), +} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs new file mode 100644 index 0000000000000..f71e61cd125d7 --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs @@ -0,0 +1,22 @@ +#[allow(unused)] +#[derive(Clone, Copy, PartialEq, PartialOrd, Default)] +pub enum EcmaVersion { + #[default] + V5, + V2015, + V2016, + V2017, + V2018, + V2019, + V2020, + V2021, + V2022, + V2023, + V2024, +} +#[allow(unused)] +impl EcmaVersion { + pub fn latest_ecma_version() -> Self { + Self::V2024 + } +} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/lib.rs b/crates/oxc_regexp_parser/_oxc_js_regex/lib.rs new file mode 100644 index 0000000000000..d66fd1312c7da --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/lib.rs @@ -0,0 +1,6 @@ +pub mod ast; +mod ast_builder; +mod ast_kind; +mod ecma_version; +pub mod parser; +mod util; diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs b/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs new file mode 100644 index 0000000000000..bca2c289ec990 --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs @@ -0,0 +1,1604 @@ +use std::collections::{HashSet, VecDeque}; +use std::iter::Peekable; +use std::ops::Range; +use std::os::unix::fs::OpenOptionsExt; +use std::panic; +use std::str::{CharIndices, Chars, Matches}; + +use oxc_diagnostics::Error; +use oxc_span::Span; +use oxc_syntax::identifier::is_identifier_part; +use oxc_syntax::unicode_id_start::is_id_continue; + +use crate::ast::{ + Alternative, Assertion, Backreference, BackreferenceRef, BoundaryAssertion, Branch, + CapturingGroup, Character, CharacterClass, ClassStringDisjunction, EdgeAssertion, + EdgeAssertionKind, Element, LookaheadAssertion, LookaroundAssertion, LookbehindAssertion, + Pattern, QuantifiableElement, Quantifier, RegExpLiteral, StringAlternative, + WordBoundaryAssertion, +}; +use crate::ast_builder::AstBuilder; +use crate::ecma_version::EcmaVersion; +use crate::util::{ + combine_surrogate_pair, is_class_set_reserved_double_punctuator_character, + is_class_set_reserved_punctuator, is_class_set_syntax_character, is_lead_surrogate, + is_syntax_character, is_trail_surrogate, +}; + +pub struct Lexer<'a> { + source: &'a str, + /// Regex usually, use a collected `Vec` could reduce lookahead and other util function implementation complexity + chars: Vec, + + pub(crate) errors: Vec, +} + +#[allow(clippy::unused_self)] +impl<'a> Lexer<'a> { + pub fn new(source: &'a str) -> Self { + Self { source, errors: vec![], chars: source.chars().collect::>() } + } +} + +pub struct Parser<'a> { + lexer: Lexer<'a>, + builder: AstBuilder<'a>, + + /// Source Code + source_text: &'a str, + + /// All syntax errors from parser and lexer + /// Note: favor adding to `Diagnostics` instead of raising Err + errors: Vec, + context: ParserContext, + index: usize, + group_names: HashSet, + num_capturing_parens: usize, + last_int_value: u32, + back_reference_names: HashSet, + last_assertion_is_quantifiable: bool, + last_range: Range, + last_str_value: Stirng, +} + +#[derive(Default, Copy, Clone)] +struct ParserContext { + source_kind: SourceKind, + unicode_mode: bool, + nflag: bool, + unicode_sets_mode: bool, + ecma_version: EcmaVersion, + strict: bool, +} + +impl<'a> Parser<'a> { + /// Create a new parser + pub fn new(allocator: &'a oxc_allocator::Allocator, source_text: &'a str) -> Self { + Self { + lexer: Lexer::new(source_text), + source_text, + errors: vec![], + context: ParserContext::default(), + index: 0, + group_names: HashSet::new(), + num_capturing_parens: 0, + back_reference_names: HashSet::new(), + last_int_value: 0, + last_range: 0..0, + last_assertion_is_quantifiable: false, + builder: AstBuilder::new(allocator), + last_str_value: String::default(), + } + } + + pub fn is(&self, ch: char) -> bool { + self.lexer.chars.get(self.index) == Some(&ch) + } + + pub fn eat(&mut self, ch: char) -> bool { + if self.is(ch) { + self.index += 1; + true + } else { + false + } + } + pub fn span_with_start(&self, start: u32) -> Span { + Span::new(start, self.index as u32) + } + + pub fn eat2(&mut self, first: char, second: char) -> bool { + if self.is(first) && self.nth(1) == Some(&second) { + self.index += 2; + true + } else { + false + } + } + + pub fn eof(&self) -> bool { + self.index < self.lexer.chars.len() + } + + pub fn nth(&self, n: usize) -> Option<&char> { + self.lexer.chars.get(self.index + n) + } + + /// by default next means `nth(1)` + pub fn next(&self) -> Option<&char> { + self.lexer.chars.get(self.index + 1).copied() + } + + /// get a range chars relative from current cursor + pub fn nrange(&self, range: Range) -> Option<&[char]> { + self.lexer.chars.get(self.index + range.start..(self.index + range.end)) + } + + pub fn current(&self) -> Option { + self.lexer.chars.get(self.index).copied() + } + + pub fn advance(&mut self) -> bool { + if self.index < self.lexer.chars.len() { + self.index += 1; + return true; + } else { + false + } + } + + pub fn rewind<'a>(&mut self, start: usize) { + self.index = start; + } + + fn eat3(&self, first: char, second: char, third: char) -> bool { + if self.is(first) && self.nth(1) == Some(&second) && self.nth(2) == Some(&third) { + self.index += 3; + true + } else { + false + } + } +} + +#[derive(Default, Clone, Copy)] +pub enum SourceKind { + Flags, + #[default] + Literal, + Pattern, +} + +pub fn parse_literal<'a>(parser: &mut Parser<'a>) -> RegExpLiteral<'a> { + if parser.is('/') { + parser.advance(); + let pattern = parse_pattern(parser); + todo!() + } else if parser.source_text.is_empty() { + panic!("Empty") + } else { + match parser.current() { + Some(ch) => { + panic!("unexpected character {ch}") + } + None => { + panic!("unexpected eof") + } + }; + } +} + +fn parse_pattern<'a>(parser: &mut Parser<'a>) -> Pattern<'a> { + let start = parser.index; + if let Some(pattern) = parse_pattern_internal(parser) { + return pattern; + } else if !parser.context.nflag + && parser.context.ecma_version >= EcmaVersion::V2018 + && parser.group_names.len() > 0 + { + parser.rewind(start); + parser.context.nflag = true; + return parse_pattern_internal(parser).expect("should have pattern"); + } + panic!("Invalid pattern") +} + +fn parse_pattern_internal<'a>(parser: &mut Parser<'a>) -> Option> { + let start = parser.index; + parser.num_capturing_parens = count_capturing_parens(parser); + parser.group_names.clear(); + parser.back_reference_names.clear(); + todo!() +} + +fn parse_disjunction<'a>(parser: &mut Parser<'a>) -> oxc_allocator::Vec<'a, Alternative<'a>> { + let start = parser.index; + let mut alternatives = parser.builder.new_vec(); + loop { + alternatives.push(parse_alternative(parser)); + if !parser.eat('|') { + break; + } + } + // Only consume the ast when `no_consume` is false + if parse_quantifier(parser, Some(true)).0 { + panic!("Nothing to repeat"); + } + if parser.eat('{') { + panic!("Lone quantifier brackets") + } + alternatives +} + +/// Validate the next characters as a RegExp `Alternative` production. +/// ``` +/// Alternative[UnicodeMode, UnicodeSetsMode, N]:: +/// [empty] +/// Alternative[?UnicodeMode, ?UnicodeSetsMode, ?N] Term[?UnicodeMode, ?UnicodeSetsMode, ?N] +/// ``` +fn parse_alternative<'a>(parser: &mut Parser<'a>) -> Alternative<'a> { + let start = parser.index; + let mut elements = parser.builder.new_vec(); + while !parser.eof() { + let (flag, node) = parse_term(parser); + if let Some(node) = node { + elements.push(node); + } + if !flag { + break; + } + } + Alternative { span: Span::new(start as u32, parser.index as u32), elements } +} + +fn parse_term<'a>(parser: &mut Parser<'a>) -> (bool, Option>) { + if parser.context.unicode_mode || parser.context.strict {} + todo!() +} + +fn parse_optional_quantifier<'a>(parser: &mut Parser<'a>) -> (bool, Option>) { + let (_, node) = parse_quantifier(parser, None); + (true, node) +} + +fn parse_assertion<'a>(parser: &mut Parser<'a>) -> (bool, Option>) { + let start = parser.index; + parser.last_assertion_is_quantifiable = false; + + if parser.eat('^') { + return ( + true, + Some(Assertion::BoundaryAssertion(parser.builder.alloc( + BoundaryAssertion::EdgeAssertion(parser.builder.alloc(EdgeAssertion { + span: Span::new(start as u32, parser.index as u32), + kind: EdgeAssertionKind::Start, + })), + ))), + ); + } + + if parser.eat('$') { + return ( + true, + Some(Assertion::BoundaryAssertion(parser.builder.alloc( + BoundaryAssertion::EdgeAssertion(parser.builder.alloc(EdgeAssertion { + span: Span::new(start as u32, parser.index as u32), + kind: EdgeAssertionKind::End, + })), + ))), + ); + } + + if parser.eat2('\\', 'B') { + return ( + true, + Some(Assertion::BoundaryAssertion(parser.builder.alloc( + BoundaryAssertion::WordBoundaryAssertion(parser.builder.alloc( + WordBoundaryAssertion { + span: Span::new(start as u32, parser.index as u32), + negate: true, + }, + )), + ))), + ); + } + + if parser.eat2('\\', 'b') { + return ( + true, + Some(Assertion::BoundaryAssertion(parser.builder.alloc( + BoundaryAssertion::WordBoundaryAssertion(parser.builder.alloc( + WordBoundaryAssertion { + span: Span::new(start as u32, parser.index as u32), + negate: false, + }, + )), + ))), + ); + } + + // Lookahead / Lookbehind + if parser.eat2('(', '?') { + let lookbeind = parser.context.ecma_version >= EcmaVersion::V2018 && parser.eat('<'); + let mut eq_sign = parser.eat('='); + let mut negate = if eq_sign { false } else { parser.eat('!') }; + if eq_sign || negate { + let span = Span::new(start as u32, parser.index as u32); + let alternatives = parse_disjunction(parser); + let look_around_assertion = + if lookbeind { + LookaroundAssertion::LookbehindAssertion( + parser.builder.alloc(LookbehindAssertion { span, negate, alternatives }), + ) + } else { + LookaroundAssertion::LookaheadAssertion( + parser.builder.alloc(LookaheadAssertion { span, negate, alternatives }), + ) + }; + let node = Assertion::LookaroundAssertion(parser.builder.alloc(look_around_assertion)); + if !parser.eat(')') { + panic!("Unterminated group") + } + parser.last_assertion_is_quantifiable = !lookbeind && !parser.context.strict; + } + parser.rewind(start); + } + (false, None) +} + +/// Validate the next characters as a RegExp `Quantifier` production if possible. +/// ``` +/// Quantifier:: +/// QuantifierPrefix +/// QuantifierPrefix `?` +/// QuantifierPrefix:: +/// `*` +/// `+` +/// `?` +/// `{` DecimalDigits `}` +/// `{` DecimalDigits `,}` +/// `{` DecimalDigits `,` DecimalDigits `}` +/// ``` +/// returns `true` if it consumed the next characters successfully. +fn parse_quantifier<'a>( + parser: &mut Parser<'a>, + no_consume: Option, +) -> (bool, Option>) { + let mut no_consume = no_consume.unwrap_or_default(); + let start = parser.index; + let mut min = 0; + let mut max = 0; + let mut greedy = false; + let mut element = None; + match parser.current().cloned() { + Some('*') => { + min = 0; + max = usize::MAX; + parser.advance(); + } + Some('+') => { + min = 1; + max = usize::MAX; + parser.advance(); + } + Some('?') => { + min = 0; + max = 1; + parser.advance(); + } + Some(_) => { + if parse_braced_quantifier(parser, no_consume) { + min = parser.last_range.start; + max = parser.last_range.end; + } + } + None => return (false, None), + } + greedy = !parser.eat('?'); + + if !no_consume { + let quantifier = parser.builder.alloc(Quantifier { + span: Span { start: start as u32, end: parser.index as u32 }, + min, + max, + greedy, + // https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/parser.ts#L269-L275 + // it can't be null, or the program will panic, so we put a dummy element, and parent + // should replace it + element: QuantifiableElement::Character(Character { + span: Span::default(), + value: ' ', + }), + }); + + element = Some(Element::Quantifier(quantifier)) + } + (true, element) +} + +fn parse_braced_quantifier<'a>(parser: &mut Parser<'a>, no_error: bool) -> bool { + let start = parser.index; + if eat_decimal_digits(parser) { + let min = parser.last_int_value; + let mut max = min; + if parser.eat(',') { + max = if eat_decimal_digits(parser) { parser.last_int_value } else { usize::MAX }; + } + if parser.eat('}') { + if !no_error && max < min { + panic!("numbers out of order in {{}} quantifier"); + } + parser.last_range = min..max; + return true; + } + } + if !no_error && (parser.context.unicode_mode || parser.context.strict) { + panic!("Incomplete quantifier"); + } + parser.rewind(start); + false +} + +fn parse_atom<'a>(parser: &mut Parser<'a>) { + todo!() +} + +fn parse_dot<'a>(parser: &mut Parser<'a>) -> (bool, Option) { + let start = parser.index; + if parser.eat('.') { + (true, Some(Character { span: Span::new(start as u32, parser.index as u32), value: '.' })) + } else { + (false, None) + } +} + +fn parse_reverse_solidus_atom_escape<'a>(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + if parser.eat('\\') { + if parse_atom_escape(parser) { + return true; + } + parser.rewind(start); + } + false +} + +fn parse_atom_escape<'a>(parser: &mut Parser<'a>) -> bool { + if parse_backreference(parser) + || parser.consume_character_class_escape() + || parser.consume_character_escape() + || (parser.context.nflag && parser.consume_k_group_name()) + { + true + } else { + if parser.strict || parser._unicode_mode { + parser.raise("Invalid escape"); + } + false + } +} + +/// TODO: resolve when pattern leave +fn parse_backreference<'a>(parser: &mut Parser<'a>) -> Option> { + let start = parser.index; + if parser.eat_decimal_escape() { + let n = parser.last_int_value; + if n <= parser.num_capturing_parens { + Some(Backreference { + span: Span::new(start as u32, parser.index as u32), + reference: BackreferenceRef::Number(n as usize), + resolved: CapturingGroup::default(), + }) + } else { + if parser.context.strict || parser.context.unicode_mode { + panic!("Invalid escape"); + } + parser.rewind(start); + None + } + } else { + None + } +} + +struct UnicodeSetsConsumeResult { + may_contain_strings: Option, +} + +fn consume_character_class_escape<'a>(parser: &mut Parser<'a>) -> Option { + let start = parser.index; + + if parser.eat(LATIN_SMALL_LETTER_D) { + parser.last_int_value = -1; + parser.on_escape_character_set(start - 1, parser.index, "digit", false); + return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); + } + + if parser.eat(LATIN_CAPITAL_LETTER_D) { + parser.last_int_value = -1; + parser.on_escape_character_set(start - 1, parser.index, "digit", true); + return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); + } + + if parser.eat(LATIN_SMALL_LETTER_S) { + parser.last_int_value = -1; + parser.on_escape_character_set(start - 1, parser.index, "space", false); + return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); + } + + if parser.eat(LATIN_CAPITAL_LETTER_S) { + parser.last_int_value = -1; + parser.on_escape_character_set(start - 1, parser.index, "space", true); + return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); + } + + if parser.eat(LATIN_SMALL_LETTER_W) { + parser.last_int_value = -1; + parser.on_escape_character_set(start - 1, parser.index, "word", false); + return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); + } + + if parser.eat(LATIN_CAPITAL_LETTER_W) { + parser.last_int_value = -1; + parser.on_escape_character_set(start - 1, parser.index, "word", true); + return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); + } + + let mut negate = false; + if parser._unicode_mode + && parser.ecma_version >= 2018 + && (parser.eat(LATIN_SMALL_LETTER_P) || (negate = parser.eat(LATIN_CAPITAL_LETTER_P))) + { + parser.last_int_value = -1; + if parser.eat(LEFT_CURLY_BRACKET) { + if let Some(result) = parser.eat_unicode_property_value_expression() { + if parser.eat(RIGHT_CURLY_BRACKET) { + if negate && result.strings.is_some() { + parser.raise("Invalid property name"); + } + + parser.on_unicode_property_character_set( + start - 1, + parser.index, + "property", + &result.key, + &result.value, + negate, + result.strings.unwrap_or(false), + ); + + return Some(UnicodeSetsConsumeResult { + may_contain_strings: result.strings.unwrap_or(false), + }); + } + } + } + panic!("Invalid property name"); + } + + None +} + +fn consume_k_group_name<'a>(parser: &mut Parser<'a>) -> Option> { + let start = parser.index; + + if parser.eat('k') { + if parser.eat_group_name() { + let group_name: String = parser.last_str_value.clone(); + parser.back_reference_names.insert(group_name.clone()); + return Some(Backreference { + span: parser.span_with_start(start), + reference: BackreferenceRef::Atom(group_name.as_str().into()), + // dummy resolved + resolved: CapturingGroup::default(), + }); + } + panic!("Invalid named reference"); + } + + None +} + +fn consume_character_class<'a>(parser: &mut Parser<'a>) -> Option { + let start = parser.index; + + if parser.eat(LEFT_SQUARE_BRACKET) { + let negate = parser.eat(CIRCUMFLEX_ACCENT); + parser.on_character_class_enter(start, negate, parser._unicode_sets_mode); + let result = consume_class_contents(parser); + if !parser.eat(RIGHT_SQUARE_BRACKET) { + if parser.current_code_point == -1 { + parser.raise("Unterminated character class"); + } + parser.raise("Invalid character in character class"); + } + if negate && result.may_contain_strings { + parser.raise("Negated character class may contain strings"); + } + + parser.on_character_class_leave(start, parser.index, negate); + + // * Static Semantics: MayContainStrings + // CharacterClass[UnicodeMode, UnicodeSetsMode] :: + // [ ^ ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] + // 1. Return false. + // CharacterClass :: [ ClassContents ] + // 1. Return MayContainStrings of the ClassContents. + Some(result) + } else { + None + } +} + +/// * Consume ClassContents in a character class. +/// * @returns `UnicodeSetsConsumeResult`. +fn consume_class_contents<'a>(parser: &mut Parser<'a>) -> UnicodeSetsConsumeResult { + if parser._unicode_sets_mode { + if parser.current_code_point == RIGHT_SQUARE_BRACKET { + // [empty] + + // * Static Semantics: MayContainStrings + // ClassContents[UnicodeMode, UnicodeSetsMode] :: + // [empty] + // 1. Return false. + return UnicodeSetsConsumeResult { may_contain_strings: None }; + } + let result = parser.consume_class_set_expression(); + + // * Static Semantics: MayContainStrings + // ClassContents :: ClassSetExpression + // 1. Return MayContainStrings of the ClassSetExpression. + return result; + } + + let strict = parser.strict || parser._unicode_mode; + loop { + // Consume the first ClassAtom + let range_start = parser.index; + if !parser.consume_class_atom() { + break; + } + let min = parser._last_int_value; + + // Consume `-` + if !parser.eat(HYPHEN_MINUS) { + continue; + } + parser.on_character(range_start - 1, parser.index, HYPHEN_MINUS); + + // Consume the second ClassAtom + if !parser.consume_class_atom() { + break; + } + let max = parser._last_int_value; + + // Validate + if min == -1 || max == -1 { + if strict { + parser.raise("Invalid character class"); + } + continue; + } + if min > max { + parser.raise("Range out of order in character class"); + } + + parser.on_character_class_range(range_start, self.index, min, max); + } + + // * Static Semantics: MayContainStrings + // ClassContents[UnicodeMode, UnicodeSetsMode] :: + // NonemptyClassRanges[?UnicodeMode] + // 1. Return false. + return UnicodeSetsConsumeResult { may_contain_strings: false }; +} + +/** + * Consume ClassAtom in a character class. + * @returns `true` if it consumed the next characters successfully. + */ +fn consume_class_atom<'a>(parser: &mut Parser<'a>) -> bool { + let start = self.index; + let cp = self.current_code_point; + + if cp != -1 && cp != REVERSE_SOLIDUS && cp != RIGHT_SQUARE_BRACKET { + self.advance(); + self._last_int_value = cp; + self.on_character(start, self.index, self._last_int_value); + return true; + } + + if self.eat(REVERSE_SOLIDUS) { + if consume_class_escape(parser) { + return true; + } + if !self.strict && self.current_code_point == LATIN_SMALL_LETTER_C { + self._last_int_value = REVERSE_SOLIDUS; + self.on_character(start, self.index, self._last_int_value); + return true; + } + if self.strict || self._unicode_mode { + self.raise("Invalid escape"); + } + self.rewind(start); + } + + return false; +} + +/** + * Consume ClassEscape in a character class. + * @returns `true` if it consumed the next characters successfully. + */ +fn consume_class_escape<'a>(parser: &mut Parser<'a>) -> bool { + let start = self.index; + + // `b` + if self.eat(LATIN_SMALL_LETTER_B) { + self._last_int_value = BACKSPACE; + self.on_character(start - 1, self.index, self._last_int_value); + return true; + } + + // [+UnicodeMode] `-` + if self._unicode_mode && self.eat(HYPHEN_MINUS) { + self._last_int_value = HYPHEN_MINUS; + self.on_character(start - 1, self.index, self._last_int_value); + return true; + } + + // [annexB][~UnicodeMode] `c` ClassControlLetter + let cp = 0; + if !self.strict + && !self._unicode_mode + && self.current_code_point == LATIN_SMALL_LETTER_C + && (is_decimal_digit((cp = self.next_code_point)) || cp == LOW_LINE) + { + self.advance(); + self.advance(); + self._last_int_value = cp % 0x20; + self.on_character(start - 1, self.index, self._last_int_value); + return true; + } + + return consume_character_class_escape(parser) || consume_character_escape(parser); +} + +/** + * Consume ClassSetExpression in a character class. + * @returns `UnicodeSetsConsumeResult`. + */ +fn consume_class_set_expression<'a>(parser: &mut Parser<'a>) -> UnicodeSetsConsumeResult { + let start = self.index; + let mut may_contain_strings: Option = None; + let mut result: Option = None; + + if self.consume_class_set_character() { + if self.consume_class_set_range_from_operator(start) { + // ClassUnion + self.consume_class_union_right(UnicodeSetsConsumeResult { may_contain_strings: None }); + return UnicodeSetsConsumeResult { may_contain_strings: false }; + } + // ClassSetOperand + + // * Static Semantics: MayContainStrings + // ClassSetOperand :: + // ClassSetCharacter + // 1. Return false. + may_contain_strings = Some(false); + } else if let Some(res) = self.consume_class_set_operand() { + may_contain_strings = Some(res.may_contain_strings); + } else { + let cp = self.current_code_point; + if cp == REVERSE_SOLIDUS { + self.advance(); + self.raise("Invalid escape"); + } + if cp == self.next_code_point && is_class_set_reserved_double_punctuator_character(cp) { + self.raise("Invalid set operation in character class"); + } + self.raise("Invalid character in character class"); + } + + if self.eat2(AMPERSAND, AMPERSAND) { + // ClassIntersection + while self.current_code_point != AMPERSAND + && (result = self.consume_class_set_operand()).is_some() + { + self.on_class_intersection(start, self.index); + if !result.as_ref().unwrap().may_contain_strings.unwrap_or(false) { + may_contain_strings = Some(false); + } + if self.eat2(AMPERSAND, AMPERSAND) { + continue; + } + + // * Static Semantics: MayContainStrings + // ClassSetExpression :: ClassIntersection + // 1. Return MayContainStrings of the ClassIntersection. + // ClassIntersection :: ClassSetOperand && ClassSetOperand + // 1. If MayContainStrings of the first ClassSetOperand is false, return false. + // 2. If MayContainStrings of the second ClassSetOperand is false, return false. + // 3. Return true. + // ClassIntersection :: ClassIntersection && ClassSetOperand + // 1. If MayContainStrings of the ClassIntersection is false, return false. + // 2. If MayContainStrings of the ClassSetOperand is false, return false. + // 3. Return true. + return UnicodeSetsConsumeResult { may_contain_strings }; + } + + self.raise("Invalid character in character class"); + } + if self.eat2(HYPHEN_MINUS, HYPHEN_MINUS) { + // ClassSubtraction + while self.consume_class_set_operand() { + self.on_class_subtraction(start, self.index); + if self.eat2(HYPHEN_MINUS, HYPHEN_MINUS) { + continue; + } + // * Static Semantics: MayContainStrings + // ClassSetExpression :: ClassSubtraction + // 1. Return MayContainStrings of the ClassSubtraction. + // ClassSubtraction :: ClassSetOperand -- ClassSetOperand + // 1. Return MayContainStrings of the first ClassSetOperand. + // ClassSubtraction :: ClassSubtraction -- ClassSetOperand + // 1. Return MayContainStrings of the ClassSubtraction. + return UnicodeSetsConsumeResult { may_contain_strings }; + } + + self.raise("Invalid character in character class"); + } + // ClassUnion + return self.consume_class_union_right(UnicodeSetsConsumeResult { may_contain_strings }); +} + +/** + * Consume the right operand of a ClassUnion in a character class. + * @param left_result The result information for the left ClassSetRange or ClassSetOperand. + * @returns `UnicodeSetsConsumeResult`. + */ +fn consume_class_union_right<'a>( + parser: &mut Parser<'a>, + left_result: UnicodeSetsConsumeResult, +) -> UnicodeSetsConsumeResult { + // ClassUnion + let mut may_contain_strings = left_result.may_contain_strings.unwrap_or(false); + loop { + let start = self.index; + if self.consume_class_set_character() { + self.consume_class_set_range_from_operator(start); + continue; + } + if let Some(result) = self.consume_class_set_operand() { + if result.may_contain_strings.unwrap_or(false) { + may_contain_strings = true; + } + continue; + } + break; + } + + // * Static Semantics: MayContainStrings + // ClassSetExpression :: ClassUnion + // 1. Return MayContainStrings of the ClassUnion. + // ClassUnion :: ClassSetRange ClassUnion(opt) + // 1. If the ClassUnion is present, return MayContainStrings of the ClassUnion. + // 2. Return false. + // ClassUnion :: ClassSetOperand ClassUnion(opt) + // 1. If MayContainStrings of the ClassSetOperand is true, return true. + // 2. If ClassUnion is present, return MayContainStrings of the ClassUnion. + // 3. Return false. + return UnicodeSetsConsumeResult { may_contain_strings: Some(may_contain_strings) }; +} + +fn eat_decimal_digits<'a>(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + parser.last_int_value = 0; + while let Some(ch) = parser.current() { + let Some(d) = ch.to_digit(10) else { + break; + }; + parser.last_int_value = 10 * parser.last_int_value + d; + parser.advance(); + } + parser.index != start +} + +fn eat_hex_digits(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + parser.last_int_value = 0; + + while let Some(ch) = parser.current() { + if !ch.is_ascii_hexdigit() { + break; + } + parser.last_int_value = + 16 * parser.last_int_value + ch.to_digit(16).expect("should convert successfully"); + parser.advance(); + } + + parser.index != start +} + +fn count_capturing_parens<'a>(parser: &mut Parser<'a>) -> usize { + let start = parser.index; + let mut in_class = false; + let mut escaped = false; + let mut count = 0; + while let Some(ch) = parser.current() { + if escaped { + escaped = false; + } + match ch { + '\\' => { + escaped = true; + } + '[' | ']' => { + in_class = false; + } + '(' if !in_class => { + if parser.nth(1) != Some(&'?') + || (parser.nth(2) == Some(&'<') + && !matches!(parser.nth(3), Some(&'=') | Some(&'!'))) + { + count += 1; + } + } + _ => {} + } + parser.advance(); + } + parser.rewind(start); + count +} + +/// * Consume NestedClass in a character class. +/// * @returns `UnicodeSetsConsumeResult`. +/// TODO: +fn consume_nested_class<'a>(parser: &mut Parser<'a>) -> Option { + let start = self.index; + if self.eat(LEFT_SQUARE_BRACKET) { + let negate = self.eat(CIRCUMFLEX_ACCENT); + self.on_character_class_enter(start, negate, true); + let result = consume_class_contents(parser); + if !self.eat(RIGHT_SQUARE_BRACKET) { + self.raise("Unterminated character class"); + } + if negate && result.may_contain_strings.unwrap_or(false) { + self.raise("Negated character class may contain strings"); + } + self.on_character_class_leave(start, self.index, negate); + + // * Static Semantics: MayContainStrings + // NestedClass :: + // [ ^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] + // 1. Return false. + // NestedClass :: [ ClassContents ] + // 1. Return MayContainStrings of the ClassContents. + return Some(result); + } + if self.eat(REVERSE_SOLIDUS) { + if let Some(result) = self.consume_character_class_escape() { + // * Static Semantics: MayContainStrings + // NestedClass :: \ CharacterClassEscape + // 1. Return MayContainStrings of the CharacterClassEscape. + return Some(result); + } + self.rewind(start); + } + None +} + +/** + * Consume ClassStringDisjunction in a character class. + * @returns `UnicodeSetsConsumeResult`. + */ +fn consume_class_string_disjunction<'a>( + parser: &mut Parser<'a>, +) -> (Option, Option>) { + let start = parser.index; + if parser.eat3('\\', 'q', '{') { + let mut i = 0; + let mut may_contain_strings = false; + let mut alternatives = parser.builder.new_vec(); + loop { + let (consume_res, node) = consume_class_string(parser, i); + if consume_res.may_contain_strings.unwrap_or_default() { + may_contain_strings = true; + } + if let Some(node) = node { + alternatives.push(node); + } + i += 1; + if !parser.eat('|') { + break; + } + } + + if parser.eat('}') { + // * Static Semantics: MayContainStrings + // ClassStringDisjunction :: \q{ ClassStringDisjunctionContents } + // 1. Return MayContainStrings of the ClassStringDisjunctionContents. + // ClassStringDisjunctionContents :: ClassString + // 1. Return MayContainStrings of the ClassString. + // ClassStringDisjunctionContents :: ClassString | ClassStringDisjunctionContents + // 1. If MayContainStrings of the ClassString is true, return true. + // 2. Return MayContainStrings of the ClassStringDisjunctionContents. + return ( + Some(UnicodeSetsConsumeResult { may_contain_strings: Some(may_contain_strings) }), + Some(ClassStringDisjunction { span: parser.span_with_start(start), alternatives }), + ); + } + panic!("Unterminated class string disjunction"); + } + None +} + +/** + * Consume ClassString in a character class. + * @param i - The index of the string alternative. + * @returns `UnicodeSetsConsumeResult`. + */ +fn consume_class_string<'a>( + parser: &mut Parser<'a>, + i: usize, +) -> (UnicodeSetsConsumeResult, Option>) { + let start = parser.index; + + let mut count = 0; + let mut arr = parser.builder.new_vec(); + while !parser.eof() { + if let Some(character) = consume_class_set_character(parser) { + arr.push(character); + count += 1; + } else { + break; + } + } + + // * Static Semantics: MayContainStrings + // ClassString :: [empty] + // 1. Return true. + // ClassString :: NonEmptyClassString + // 1. Return MayContainStrings of the NonEmptyClassString. + // NonEmptyClassString :: ClassSetCharacter NonEmptyClassString(opt) + // 1. If NonEmptyClassString is present, return true. + // 2. Return false. + ( + UnicodeSetsConsumeResult { may_contain_strings: Some(count != 1) }, + Some(StringAlternative { span: parser.span_with_start(start), elements: arr }), + ) +} + +/** + * Consume ClassSetCharacter in a character class. + * Set `self._last_int_value` if it consumed the next characters successfully. + * @returns `true` if it ate the next characters successfully. + */ +fn consume_class_set_character<'a>(parser: &mut Parser<'a>) -> Option { + let start = parser.index; + let cp = parser.current()?; + + if Some(cp) != parser.next() || !is_class_set_reserved_double_punctuator_character(cp) { + if !is_class_set_syntax_character(cp) { + parser.last_int_value = cp as u32; + parser.advance(); + Some(Character { span: parser.span_with_start(start), value: cp }) + } + } + + if parser.eat('\\') { + if consume_character_escape(parser) { + return true; + } + if let Some(ch) = parser.current() + && is_class_set_reserved_punctuator(ch) + { + parser.last_int_value = parser.current()? as u32; + parser.advance(); + + Some(Character { + span: parser.span_with_start(start), + value: parser.last_int_value as char, + }) + } + if parser.eat('b') { + parser.last_int_value = 8; + Some(Character { + span: parser.span_with_start(start), + value: parser.last_int_value as char, + }) + } + parser.rewind(start); + } + + None +} + +fn consume_character_escape<'a>(parser: &mut Parser<'a>) -> Option { + let start = parser.index; + if eat_control_escape(parser) + || eat_c_control_letter(parser) + || eat_zero(parser).is_some() + || eat_hex_escape_sequence(parser) + || eat_reg_exp_unicode_escape_sequence(parser, false) + || (!parser.context.strict + && !parser.context.unicode_mode + && eat_legacy_octal_escape_sequence(parser)) + || eat_identity_escape(parser).is_some() + { + Some(Character { + span: parser.span_with_start(start - 1), + value: parser.last_int_value as char, + }) + } + None +} + +fn eat_hex_escape_sequence<'a>(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + if parser.eat('x') { + if eat_fixed_hex_digits(parser, 2) { + return true; + } + if parser.context.unicode_mode || parser.context.strict { + panic!("Invalid escape"); + } + parser.rewind(start); + } + false +} + +fn eat_legacy_octal_escape_sequence<'a>(parser: &mut Parser<'a>) -> bool { + if eat_octal_digit(parser).is_some() { + let n1 = parser.last_int_value; + if eat_octal_digit(parser).is_some() { + let n2 = parser.last_int_value; + if n1 <= 3 && eat_octal_digit(parser).is_some() { + parser.last_int_value = n1 * 64 + n2 * 8 + parser.last_int_value; + } else { + parser.last_int_value = n1 * 8 + n2; + } + } else { + parser.last_int_value = n1; + } + return true; + } + false +} + +/** + * Eat the next characters as a RegExp `GroupName` production if possible. + * Set `self._last_str_value` if the group name existed. + * @returns `true` if it ate the next characters successfully. + */ +fn eat_group_name<'a>(parser: &mut Parser<'a>) -> bool { + if parser.eat('<') { + if eat_reg_exp_identifier_name(parser) && parser.eat('>') { + return true; + } + panic!("Invalid capture group name"); + } + false +} + +/** + * Eat the next characters as a RegExp `RegExpIdentifierName` production if + * possible. + * Set `self._last_str_value` if the identifier name existed. + * @returns `true` if it ate the next characters successfully. + */ +fn eat_reg_exp_identifier_name<'a>(parser: &mut Parser<'a>) -> bool { + if eat_reg_exp_identifier_start(parser).is_some() { + parser.last_str_value = (parser.last_int_value as char).to_string(); + + while eat_reg_exp_identifier_part(parser) { + parser.last_str_value.push(parser.last_int_value as char); + } + + return true; + } + false +} + +/** + * Eat the next characters as a RegExp `RegExpIdentifierStart` production if + * possible. + * Set `self._last_int_value` if the identifier start existed. + * @returns `true` if it ate the next characters successfully. + */ +fn eat_reg_exp_identifier_start<'a>(parser: &mut Parser<'a>) -> Option<()> { + let start = parser.index; + let force_u_flag = + !parser.context.unicode_mode && parser.context.ecma_version >= EcmaVersion::V2020; + let mut cp = parser.current()?; + parser.advance(); + + if cp == '\\' && eat_reg_exp_unicode_escape_sequence(parser, force_u_flag) { + cp = char::from_u32(parser.last_int_value).expect("should convert to char"); + } else if force_u_flag && is_lead_surrogate(cp) && is_trail_surrogate(parser.current()? as u32) + { + cp = combine_surrogate_pair(cp, parser.current().expect("should convert to u32") as u32); + parser.advance(); + } + + if is_identifier_start_char(cp) { + parser.last_int_value = cp as u32; + return Some(()); + } + + if parser.index != start { + parser.rewind(start); + } + false +} + +/** + * Eat the next characters as a RegExp `RegExpIdentifierPart` production if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * RegExpIdentifierPart[UnicodeMode]:: + * RegExpIdentifierStart[?UnicodeMode] + * DecimalDigit + * \ UnicodeEscapeSequence[+UnicodeMode] + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_reg_exp_identifier_part<'a>(parser: &mut Parser<'a>) -> Option<()> { + let start = parser.index; + let force_u_flag = + !parser.context.unicode_mode && parser.context.ecma_version >= EcmaVersion::V2020; + let mut cp = parser.current()?; + parser.advance(); + + if cp == '\\' && eat_reg_exp_unicode_escape_sequence(parser, force_u_flag) { + cp = char::from_u32(parser.last_int_value).expect("should convert to char"); + } else if force_u_flag + && is_lead_surrogate(cp as u32) + && is_trail_surrogate(parser.current()? as u32) + { + cp = combine_surrogate_pair(cp as u32, parser.current()? as u32); + parser.advance(); + } + + if is_identifier_part(cp) { + parser.last_int_value = cp as u32; + return Some(()); + } + + if parser.index != start { + parser.rewind(start); + } + None +} + +/** + * Eat the next characters as the following alternatives if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * `c` ControlLetter + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_c_control_letter<'a>(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + if parser.eat('c') { + if eat_control_letter(parser).is_some() { + return true; + } + parser.rewind(start); + } + false +} + +/** + * Eat the next characters as the following alternatives if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * `0` [lookahead ∉ DecimalDigit] + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_zero<'a>(parser: &mut Parser<'a>) -> Option<()> { + if parser.current()? == '0' && parser.nth(1).map(|ch| ch.is_ascii_digit()) == Some(false) { + parser.last_int_value = 0; + parser.advance(); + return Some(()); + } + None +} + +/** + * Eat the next characters as a RegExp `ControlEscape` production if + * possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * ControlEscape:: one of + * f n r t v + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_control_escape<'a>(parser: &mut Parser<'a>) -> bool { + if parser.eat('f') { + parser.last_int_value = 12; + return true; + } + if parser.eat('n') { + parser.last_int_value = 10; + return true; + } + if parser.eat('r') { + parser.last_int_value = 13; + return true; + } + if parser.eat('t') { + parser.last_int_value = 9; + return true; + } + if parser.eat('v') { + parser.last_int_value = 11; + return true; + } + false +} + +/** + * Eat the next characters as the following alternatives if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * `{` CodePoint `}` + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_reg_exp_unicode_code_point_escape<'a>(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + + if parser.eat('{') + && eat_hex_digits(parser) + && parser.eat('}') + && is_valid_unicode(parser.last_int_value as u32) + { + return true; + } + + parser.rewind(start); + false +} + +/** + * Eat the next characters as a RegExp `DecimalEscape` production if + * possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * DecimalEscape:: + * NonZeroDigit DecimalDigits(opt) [lookahead ∉ DecimalDigit] + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_decimal_escape<'a>(parser: &mut Parser<'a>) -> Option<()> { + parser.last_int_value = 0; + let mut cp = parser.current()?; + if cp >= '1' && cp <= '9' { + while cp >= '1' && cp <= '9' { + parser.last_int_value = + 10 * parser.last_int_value + cp.to_digit(10).expect("should convert successfully"); + parser.advance(); + cp = match parser.current() { + Some(ch) => ch, + None => break, + }; + } + return Some(()); + } + None +} + +/** + * Eat the next characters as a RegExp `ControlLetter` production if + * possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * ControlLetter:: one of + * a b c d e f g h i j k l m n o p q r s t u v w x y z + * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_control_letter<'a>(parser: &mut Parser<'a>) -> Option<()> { + let cp = parser.current()?; + if cp.is_ascii_alphabetic() { + parser.advance(); + parser.last_int_value = (cp as u32) % 0x20; + return Some(()); + } + None +} + +/** + * Eat the next characters as a RegExp `RegExpUnicodeEscapeSequence` + * production if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * RegExpUnicodeEscapeSequence[UnicodeMode]:: + * [+UnicodeMode] `u` HexLeadSurrogate `\u` HexTrailSurrogate + * [+UnicodeMode] `u` HexLeadSurrogate + * [+UnicodeMode] `u` HexTrailSurrogate + * [+UnicodeMode] `u` HexNonSurrogate + * [~UnicodeMode] `u` Hex4Digits + * [+UnicodeMode] `u{` CodePoint `}` + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_reg_exp_unicode_escape_sequence<'a>(parser: &mut Parser<'a>, force_u_flag: bool) -> bool { + let start = parser.index; + let u_flag = force_u_flag || parser.context.unicode_mode; + + if parser.eat('u') { + if (u_flag && eat_reg_exp_unicode_surrogate_pair_escape(parser)) + || eat_fixed_hex_digits(parser, 4).is_some() + || (u_flag && eat_reg_exp_unicode_code_point_escape(parser)) + { + return true; + } + if parser.context.strict || u_flag { + panic!("Invalid unicode escape"); + } + parser.rewind(start); + } + + false +} + +/** + * Eat the next characters as the following alternatives if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * HexLeadSurrogate `\u` HexTrailSurrogate + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_reg_exp_unicode_surrogate_pair_escape<'a>(parser: &mut Parser<'a>) -> bool { + let start = parser.index; + + if eat_fixed_hex_digits(parser, 4).is_some() { + let lead = parser.last_int_value; + if is_lead_surrogate(lead) + && parser.eat('\\') + && parser.eat('u') + && eat_fixed_hex_digits(parser, 4).is_some() + { + let trail = parser.last_int_value; + if is_trail_surrogate(trail) { + parser.last_int_value = combine_surrogate_pair(lead, trail); + return true; + } + } + + parser.rewind(start); + } + + false +} + +/** + * Eat the next characters as a RegExp `IdentityEscape` production if + * possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * IdentityEscape[UnicodeMode, N]:: + * [+UnicodeMode] SyntaxCharacter + * [+UnicodeMode] `/` + * [strict][~UnicodeMode] SourceCharacter but not UnicodeIDContinue + * [annexB][~UnicodeMode] SourceCharacterIdentityEscape[?N] + * SourceCharacterIdentityEscape[N]:: + * [~N] SourceCharacter but not c + * [+N] SourceCharacter but not one of c k + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_identity_escape<'a>(parser: &mut Parser<'a>) -> Option<()> { + let cp = parser.current(); + if is_valid_identity_escape(parser, cp) { + parser.last_int_value = cp.unwrap() as u32; + parser.advance(); + return Some(()); + } + None +} + +fn is_valid_identity_escape(parser: &mut Parser<'a>, cp: Option) -> bool { + if cp.is_none() { + return false; + } + let cp = cp.unwrap(); + if parser.context.unicode_mode { + return is_syntax_character(cp) || cp == '/'; + } + if parser.context.strict { + return !is_id_continue(cp); + } + if parser.context.nflag { + return !(cp == 'c' || cp == 'k'); + } + cp != 'c' +} + +/** + * Eat the next characters as a RegExp `DecimalEscape` production if + * possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * DecimalEscape:: + * NonZeroDigit DecimalDigits(opt) [lookahead ∉ DecimalDigit] + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_decimal_escape<'a>(parser: &mut Parser<'a>) -> Option<()> { + parser.last_int_value = 0; + let mut cp = parser.current()?; + if cp.is_ascii_digit() { + while cp.is_ascii_digit() { + parser.last_int_value = 10 * parser.last_int_value + cp.to_digit(10)?; + parser.advance(); + cp = match parser.current() { + Some(char) => char, + None => break, + }; + } + return Some(()); + } + None +} + +/** + * Eat the next characters as a `OctalDigit` production if possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * OctalDigit:: one of + * 0 1 2 3 4 5 6 7 + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_octal_digit<'a>(parser: &mut Parser<'a>) -> Option<()> { + let cp = parser.current()?; + if cp.is_digit(8) { + parser.advance(); + parser.last_int_value = cp.to_digit(8)?; + Some(()) + } else { + parser.last_int_value = 0; + None + } +} + +/** + * Eat the next characters as the given number of `HexDigit` productions if + * possible. + * Set `self._last_int_value` if it ate the next characters successfully. + * ``` + * HexDigit:: one of + * 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F + * ``` + * @returns `true` if it ate the next characters successfully. + */ +fn eat_fixed_hex_digits<'a>(parser: &mut Parser<'a>, length: usize) -> Option<()> { + let start = parser.index; + parser.last_int_value = 0; + for _ in 0..length { + let cp = parser.current()?; + if !cp.is_ascii_hexdigit() { + parser.rewind(start); + return None; + } + parser.last_int_value = 16 * parser.last_int_value + cp.to_digit(16)?; + parser.advance(); + } + Some(()) +} + +const MIN_CODE_POINT: u32 = 0; +const MAX_CODE_POINT: u32 = 0x10FFFF; + +fn is_valid_unicode(code: u32) -> bool { + code >= MIN_CODE_POINT && code <= MAX_CODE_POINT +} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/util.rs b/crates/oxc_regexp_parser/_oxc_js_regex/util.rs new file mode 100644 index 0000000000000..454ea5fb88bc9 --- /dev/null +++ b/crates/oxc_regexp_parser/_oxc_js_regex/util.rs @@ -0,0 +1,84 @@ +use phf::phf_set; + +const SYNTAX_CHARACTERS: phf::Set = phf_set!['(', ')', '[', ']', '{', '}', '|', '-']; + +const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER: phf::Set = phf_set! { + '&' => AMPERSAND, + '!' => EXCLAMATION_MARK, + '#' => NUMBER_SIGN, + '$' => DOLLAR_SIGN, + '%' => PERCENT_SIGN, + '*' => ASTERISK, + '+' => PLUS_SIGN, + ',' => COMMA, + '.' => FULL_STOP, + ':' => COLON, + ';' => SEMICOLON, + '<' => LESS_THAN_SIGN, + '=' => EQUALS_SIGN, + '>' => GREATER_THAN_SIGN, + '?' => QUESTION_MARK, + '@' => COMMERCIAL_AT, + '^' => CIRCUMFLEX_ACCENT, + '`' => GRAVE_ACCENT, + '~' => TILDE, +}; + +const CLASS_SET_SYNTAX_CHARACTER: phf::Set = phf_set! { + '(' => LEFT_PARENTHESIS, + ')' => RIGHT_PARENTHESIS, + '[' => LEFT_SQUARE_BRACKET, + ']' => RIGHT_SQUARE_BRACKET, + '{' => LEFT_CURLY_BRACKET, + '}' => RIGHT_CURLY_BRACKET, + '/' => SOLIDUS, + '-' => HYPHEN_MINUS, + '\\' => REVERSE_SOLIDUS, + '|' => VERTICAL_LINE, +}; + +const CLASS_SET_RESERVED_PUNCTUATOR: phf::Set = phf_set! { + '&' => AMPERSAND, + '-' => HYPHEN_MINUS, + '!' => EXCLAMATION_MARK, + '#' => NUMBER_SIGN, + '%' => PERCENT_SIGN, + ',' => COMMA, + ':' => COLON, + ';' => SEMICOLON, + '<' => LESS_THAN_SIGN, + '=' => EQUALS_SIGN, + '>' => GREATER_THAN_SIGN, + '@' => COMMERCIAL_AT, + '`' => GRAVE_ACCENT, + '~' => TILDE, +}; + +#[inline] +pub fn is_syntax_character(cp: char) -> bool { + SYNTAX_CHARACTERS.contains(&cp) +} + +pub fn is_lead_surrogate(code: u32) -> bool { + code >= 0xd800 && code <= 0xdbff +} + +pub fn is_trail_surrogate(code: u32) -> bool { + code >= 0xdc00 && code <= 0xdfff +} + +pub fn combine_surrogate_pair(lead: u32, trail: u32) -> u32 { + (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000 +} + +pub fn is_class_set_reserved_double_punctuator_character(cp: char) -> bool { + CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.contains(&cp) +} + +pub fn is_class_set_syntax_character(cp: char) -> bool { + CLASS_SET_SYNTAX_CHARACTER.contains(&cp) +} + +pub fn is_class_set_reserved_punctuator(cp: char) -> bool { + CLASS_SET_RESERVED_PUNCTUATOR.contains(&cp) +} From 7fd8c3bc062e20d6828cde5f1f9c57f90d3fbe92 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 20 Jun 2024 13:52:12 +0900 Subject: [PATCH 002/143] Add bare example --- crates/oxc_regexp_parser/examples/parser.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 crates/oxc_regexp_parser/examples/parser.rs diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs new file mode 100644 index 0000000000000..9c5ae70c532d8 --- /dev/null +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -0,0 +1,19 @@ +use oxc_allocator::Allocator; +use oxc_regexp_parser::{ast, Parser}; + +fn main() { + println!("🍀 Hello parser!"); + + let allocator = Allocator::default(); + + let parser = Parser::new(&allocator, "/abc/i"); + let ret = parser.parse(); + + match ret { + Ok(ast::RegExpLiteral { pattern, flags, .. }) => { + println!("✨ PAT: {pattern:#?}"); + println!("✨ FLG: {flags:#?}"); + } + Err(err) => println!("💥 {err:#?}"), + } +} From 5e70a1e7e5139749628b582de99f671d1237edf3 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 20 Jun 2024 13:52:28 +0900 Subject: [PATCH 003/143] Init parser --- Cargo.lock | 9 + crates/oxc_regexp_parser/Cargo.toml | 25 ++ crates/oxc_regexp_parser/src/ast.rs | 359 ++++++++++++++++++++ crates/oxc_regexp_parser/src/ast_builder.rs | 39 +++ crates/oxc_regexp_parser/src/lib.rs | 6 + crates/oxc_regexp_parser/src/parser.rs | 109 ++++++ crates/oxc_regexp_parser/src/state.rs | 10 + 7 files changed, 557 insertions(+) create mode 100644 crates/oxc_regexp_parser/Cargo.toml create mode 100644 crates/oxc_regexp_parser/src/ast.rs create mode 100644 crates/oxc_regexp_parser/src/ast_builder.rs create mode 100644 crates/oxc_regexp_parser/src/lib.rs create mode 100644 crates/oxc_regexp_parser/src/parser.rs create mode 100644 crates/oxc_regexp_parser/src/state.rs diff --git a/Cargo.lock b/Cargo.lock index ca1a6e377536e..a830897881dbb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1644,6 +1644,15 @@ dependencies = [ "walkdir", ] +[[package]] +name = "oxc_regexp_parser" +version = "0.0.0" +dependencies = [ + "oxc_allocator", + "oxc_diagnostics", + "oxc_span", +] + [[package]] name = "oxc_resolver" version = "1.8.1" diff --git a/crates/oxc_regexp_parser/Cargo.toml b/crates/oxc_regexp_parser/Cargo.toml new file mode 100644 index 0000000000000..9fa45a2d38d90 --- /dev/null +++ b/crates/oxc_regexp_parser/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "oxc_regexp_parser" +version = "0.0.0" +publish = false +authors.workspace = true +categories.workspace = true +description.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +rust-version.workspace = true +include = ["/examples","/src"] + +[lints] +workspace = true + +[lib] +doctest = false + +[dependencies] +oxc_allocator = { workspace = true } +oxc_diagnostics = { workspace = true } +oxc_span = { workspace = true } diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs new file mode 100644 index 0000000000000..926194bfcccb7 --- /dev/null +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -0,0 +1,359 @@ +use oxc_allocator::{Box, Vec}; +use oxc_span::{Atom, Span}; + +/// The root node. +#[derive(Debug)] +pub struct RegExpLiteral<'a> { + pub span: Span, + pub pattern: Pattern<'a>, + pub flags: Flags, +} + +/// The pattern. +#[derive(Debug)] +pub struct Pattern<'a> { + pub span: Span, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The alternative. +/// E.g. `a|b` +#[derive(Debug)] +pub struct Alternative<'a> { + pub span: Span, + pub elements: Vec<'a, Element<'a>>, +} + +/// The type which includes all atom nodes. +#[derive(Debug)] +pub enum Element<'a> { + Assertion(Assertion<'a>), + #[allow(clippy::enum_variant_names)] + QuantifiableElement(QuantifiableElement<'a>), + Quantifier(Quantifier<'a>), +} + +/// The assertion. +#[derive(Debug)] +pub enum Assertion<'a> { + BoundaryAssertion(BoundaryAssertion), + LookaroundAssertion(LookaroundAssertion<'a>), +} + +/// The boundary assertion. +#[derive(Debug)] +pub enum BoundaryAssertion { + EdgeAssertion(EdgeAssertion), + WordBoundaryAssertion(WordBoundaryAssertion), +} + +/// The edge boundary assertion. +/// E.g. `^`, `$` +#[derive(Debug)] +pub struct EdgeAssertion { + pub span: Span, + pub kind: EdgeAssertionKind, +} + +#[derive(Debug)] +pub enum EdgeAssertionKind { + /// `^` + Start, + /// `$` + End, +} + +/// The word bondary assertion. +/// E.g. `\b`, `\B` +#[derive(Debug)] +pub struct WordBoundaryAssertion { + pub span: Span, + pub negate: bool, +} + +/// The lookaround assertion. +#[derive(Debug)] +pub enum LookaroundAssertion<'a> { + LookaheadAssertion(LookaheadAssertion<'a>), + LookbehindAssertion(LookbehindAssertion<'a>), +} + +/// The lookahead assertion. +/// E.g. `(?=ab)`, `(?!ab)` +#[derive(Debug)] +pub struct LookaheadAssertion<'a> { + pub span: Span, + pub negate: bool, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The lookbehind assertion. +/// E.g. `(?<=ab)`, `(? { + pub span: Span, + pub negate: bool, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The type which includes all atom nodes that Quantifier node can have as children. +#[derive(Debug)] +pub enum QuantifiableElement<'a> { + Backreference(Backreference<'a>), + CapturingGroup(CapturingGroup<'a>), + Character(Character), + CharacterClass(CharacterClass<'a>), + CharacterSet(CharacterSet<'a>), + ExpressionCharacterClass(ExpressionCharacterClass<'a>), + Group(Group<'a>), + LookaheadAssertion(LookaheadAssertion<'a>), +} + +/// The backreference. +/// E.g. `\1`, `\k` +#[derive(Debug)] +pub enum Backreference<'a> { + AmbiguousBackreference(AmbiguousBackreference<'a>), + UnambiguousBackreference(UnambiguousBackreference<'a>), +} + +#[derive(Debug)] +pub struct AmbiguousBackreference<'a> { + pub span: Span, + pub r#ref: Atom<'a>, // `\1` + pub resolved: Vec<'a, CapturingGroup<'a>>, +} + +#[derive(Debug)] +pub struct UnambiguousBackreference<'a> { + pub span: Span, + pub r#ref: Atom<'a>, // `\k` + pub resolved: CapturingGroup<'a>, +} + +/// The capturing group. +/// E.g. `(ab)`, `(?ab)` +#[derive(Debug)] +pub struct CapturingGroup<'a> { + pub span: Span, + pub name: Option>, + pub alternatives: Vec<'a, Alternative<'a>>, + pub references: Vec<'a, Backreference<'a>>, +} + +/// The character. +/// This includes escape sequences which mean a character. +/// E.g. `a`, `あ`, `✿`, `\x65`, `\u0065`, `\u{65}`, `\/` +#[derive(Debug)] +pub struct Character { + pub span: Span, + pub value: char, +} + +/// The character class. +/// E.g. `[ab]`, `[^ab]` +#[derive(Debug)] +pub enum CharacterClass<'a> { + ClassRangesCharacterClass(ClassRangesCharacterClass<'a>), + UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), +} + +/// The character class used in legacy (neither `u` nor `v` flag) and Unicode mode (`u` flag). +/// +/// This character class is guaranteed to NOT contain strings. +/// In Unicode sets mode (`v` flag), [`UnicodeSetsCharacterClass`] is used. +#[derive(Debug)] +pub struct ClassRangesCharacterClass<'a> { + pub span: Span, + pub negate: bool, + pub elements: Vec<'a, ClassRangesCharacterClassElement<'a>>, +} + +#[derive(Debug)] +pub enum ClassRangesCharacterClassElement<'a> { + Character(Character), + CharacterClassRange(CharacterClassRange), + CharacterUnicodePropertyCharacterSet(CharacterUnicodePropertyCharacterSet<'a>), + EscapeCharacterSet(EscapeCharacterSet), +} + +/// The character class. +/// E.g. `[a-b]` +#[derive(Debug)] +pub struct CharacterClassRange { + pub span: Span, + pub min: Character, + pub max: Character, +} + +/// The character class string disjunction. +/// E.g. `\q{a|b}` +#[derive(Debug)] +pub struct ClassStringDisjunction<'a> { + pub span: Span, + pub alternatives: Vec<'a, StringAlternative<'a>>, +} + +/// Only used for `\q{alt}`([`ClassStringDisjunction`]). +#[derive(Debug)] +pub struct StringAlternative<'a> { + pub span: Span, + pub elements: Vec<'a, Character>, +} + +#[derive(Debug)] +pub struct CharacterUnicodePropertyCharacterSet<'a> { + pub span: Span, + pub key: Atom<'a>, + pub value: Option>, + pub negate: bool, +} + +/// The character class used in Unicode sets mode (`v` flag). +/// +/// This character class may contain strings. +#[derive(Debug)] +pub struct UnicodeSetsCharacterClass<'a> { + pub span: Span, + pub negate: bool, + pub elements: Vec<'a, UnicodeSetsCharacterClassElement<'a>>, +} + +#[derive(Debug)] +pub enum UnicodeSetsCharacterClassElement<'a> { + Character(Character), + CharacterClassRange(CharacterClassRange), + ClassStringDisjunction(ClassStringDisjunction<'a>), + EscapeCharacterSet(EscapeCharacterSet), + ExpressionCharacterClass(ExpressionCharacterClass<'a>), + UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), + UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), +} + +/// The character set. +#[derive(Debug)] +#[allow(clippy::enum_variant_names)] +pub enum CharacterSet<'a> { + AnyCharacterSet, + EscapeCharacterSet(EscapeCharacterSet), + UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), +} + +/// The character class escape. +/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` +#[derive(Debug)] +pub struct EscapeCharacterSet { + pub span: Span, + pub kind: EscapeCharacterSetKind, + pub negate: bool, +} + +#[derive(Debug)] +pub enum EscapeCharacterSetKind { + Digit, + Space, + Word, +} + +/// The unicode property escape. +/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` +#[derive(Debug)] +pub enum UnicodePropertyCharacterSet<'a> { + CharacterUnicodePropertyCharacterSet(CharacterUnicodePropertyCharacterSet<'a>), + StringsUnicodePropertyCharacterSet(StringsUnicodePropertyCharacterSet<'a>), +} + +/// The unicode property escape with property of strings. +#[derive(Debug)] +pub struct StringsUnicodePropertyCharacterSet<'a> { + pub span: Span, + pub key: Atom<'a>, +} + +/// The expression character class. +/// E.g. `[a--b]`, `[a&&b]`,`[^a--b]`, `[^a&&b]` +#[derive(Debug)] +pub struct ExpressionCharacterClass<'a> { + pub span: Span, + pub negate: bool, + pub expression: ExpressionCharacterClassExpr<'a>, +} + +#[derive(Debug)] +pub enum ExpressionCharacterClassExpr<'a> { + ClassIntersection(ClassIntersection<'a>), + ClassSubtraction(ClassSubtraction<'a>), +} + +#[derive(Debug)] +pub enum ClassSetOperand<'a> { + Character(Character), + ClassStringDisjunction(ClassStringDisjunction<'a>), + EscapeCharacterSet(EscapeCharacterSet), + ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), + UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), +} + +/// The character class intersection. +/// E.g. `a&&b` +#[derive(Debug)] +pub struct ClassIntersection<'a> { + pub span: Span, + pub left: ClassIntersectionLeft<'a>, + pub right: ClassSetOperand<'a>, +} + +#[derive(Debug)] +pub enum ClassIntersectionLeft<'a> { + ClassIntersection(Box<'a, ClassIntersection<'a>>), + ClassSetOperand(ClassSetOperand<'a>), +} + +/// The character class subtraction. +/// E.g. `a--b` +#[derive(Debug)] +pub struct ClassSubtraction<'a> { + pub span: Span, + pub left: ClassSubtractionLeft<'a>, + pub right: ClassSetOperand<'a>, +} + +#[derive(Debug)] +pub enum ClassSubtractionLeft<'a> { + ClassSetOperand(ClassSetOperand<'a>), + ClassSubtraction(Box<'a, ClassSubtraction<'a>>), +} + +/// The uncapturing group. +/// E.g. `(?:ab)` +#[derive(Debug)] +pub struct Group<'a> { + pub span: Span, + pub alternatives: Vec<'a, Alternative<'a>>, +} + +/// The quantifier. +/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` +#[derive(Debug)] +pub struct Quantifier<'a> { + pub span: Span, + pub min: usize, + pub max: usize, + pub greedy: bool, + pub element: QuantifiableElement<'a>, +} + +/// The flags. +#[derive(Debug)] +pub struct Flags { + pub span: Span, + pub dot_all: bool, + pub global: bool, + pub has_indices: bool, + pub ignore_case: bool, + pub multiline: bool, + pub sticky: bool, + pub unicode: bool, + pub unicode_sets: bool, +} diff --git a/crates/oxc_regexp_parser/src/ast_builder.rs b/crates/oxc_regexp_parser/src/ast_builder.rs new file mode 100644 index 0000000000000..d7d5d0fc2589a --- /dev/null +++ b/crates/oxc_regexp_parser/src/ast_builder.rs @@ -0,0 +1,39 @@ +use oxc_allocator::Allocator; +use oxc_span::Span; + +use crate::ast; + +#[derive(Copy, Clone)] +pub struct AstBuilder<'a> { + pub allocator: &'a Allocator, +} + +impl<'a> AstBuilder<'a> { + pub fn new(allocator: &'a Allocator) -> Self { + Self { allocator } + } + + pub fn reg_exp_literal( + &mut self, + span: Span, + pattern: ast::Pattern<'a>, + flags: ast::Flags, + ) -> ast::RegExpLiteral<'a> { + ast::RegExpLiteral { span, pattern, flags } + } + + pub fn flags(&mut self, span: Span) -> ast::Flags { + ast::Flags { + span, + // TODO: From arguments + dot_all: false, + global: false, + has_indices: false, + ignore_case: false, + multiline: false, + sticky: false, + unicode: false, + unicode_sets: false, + } + } +} diff --git a/crates/oxc_regexp_parser/src/lib.rs b/crates/oxc_regexp_parser/src/lib.rs new file mode 100644 index 0000000000000..0516263ccf20d --- /dev/null +++ b/crates/oxc_regexp_parser/src/lib.rs @@ -0,0 +1,6 @@ +pub mod ast; +mod ast_builder; +mod parser; +mod state; + +pub use crate::parser::Parser; diff --git a/crates/oxc_regexp_parser/src/parser.rs b/crates/oxc_regexp_parser/src/parser.rs new file mode 100644 index 0000000000000..3071ec15efffe --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser.rs @@ -0,0 +1,109 @@ +use oxc_allocator::Allocator; +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Span; + +use crate::{ast, ast_builder::AstBuilder, state::ParserState}; + +#[derive(Clone, Copy)] +struct ParserOptions { + /// The flag to disable Annex B syntax. + /// Default: false + strict: bool, + /// ECMAScript version. + /// - `2015` added `u` and `y` flags + /// - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, + /// and Unicode Property Escape + /// - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes + /// - `2022` added `d` flag + /// - `2023` added more valid Unicode Property Escapes + /// - `2024` added `v` flag + /// - `2025` added duplicate named capturing groups + /// Default: 2025 + ecma_version: u32, // TODO: Enum? +} +impl Default for ParserOptions { + fn default() -> Self { + Self { strict: false, ecma_version: 2025 } + } +} + +pub struct Parser<'a> { + allocator: &'a Allocator, + source_text: &'a str, + options: ParserOptions, +} + +impl<'a> Parser<'a> { + pub fn new(allocator: &'a Allocator, source_text: &'a str) -> Self { + let options = ParserOptions::default(); + Self { allocator, source_text, options } + } + + #[must_use] + pub fn with_strict(mut self, is_strict: bool) -> Self { + self.options.strict = is_strict; + self + } + #[must_use] + pub fn with_ecma_version(mut self, ecma_version: u32) -> Self { + self.options.ecma_version = ecma_version; + self + } + + pub fn parse(self) -> Result> { + let mut parser = ParserImpl::new(self.allocator, self.source_text, self.options); + parser.parse() + } +} + +struct ParserImpl<'a> { + // lexer, + errors: Vec, + source_text: &'a str, + state: ParserState, + ast: AstBuilder<'a>, +} + +impl<'a> ParserImpl<'a> { + fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + Self { + errors: vec![], + source_text, + state: ParserState::new(options.strict, options.ecma_version), + ast: AstBuilder::new(allocator), + } + } + + fn parse(&mut self) -> Result> { + let pattern = todo!("parse_pattern()"); + let flags = todo!("parse_flags()"); + + // this._srcCtx = { source, start, end, kind: "literal" } + // this._unicodeSetsMode = this._unicodeMode = this._nFlag = false + // this.reset(source, start, end) + + // if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) { + // const flagStart = this.index + // const unicode = source.includes("u", flagStart) + // const unicodeSets = source.includes("v", flagStart) + // this.validateFlagsInternal(source, flagStart, end) + // this.validatePatternInternal(source, start + 1, flagStart - 1, { + // unicode, + // unicodeSets, + // }) + // } else { + // const c = String.fromCodePoint(this.currentCodePoint) + // this.raise(`Unexpected character '${c}'`) + // } + + let span = Span::new(0, self.source_text.len() as u32); + Ok(self.ast.reg_exp_literal(span, pattern, flags)) + } + + fn parse_pattern(&mut self) -> Result> { + todo!() + } + fn parse_flags(&mut self) -> Result { + todo!() + } +} diff --git a/crates/oxc_regexp_parser/src/state.rs b/crates/oxc_regexp_parser/src/state.rs new file mode 100644 index 0000000000000..f39b7746ba843 --- /dev/null +++ b/crates/oxc_regexp_parser/src/state.rs @@ -0,0 +1,10 @@ +pub struct ParserState { + strict: bool, + ecma_version: u32, +} + +impl ParserState { + pub fn new(strict: bool, ecma_version: u32) -> Self { + Self { strict, ecma_version } + } +} From 94c741bcbd36904566381a19d54bef5d42fdce5f Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 21 Jun 2024 17:03:01 +0900 Subject: [PATCH 004/143] Make it run --- Cargo.lock | 2 + crates/oxc_regexp_parser/Cargo.toml | 3 + crates/oxc_regexp_parser/examples/parser.rs | 27 ++-- crates/oxc_regexp_parser/src/ast.rs | 6 +- crates/oxc_regexp_parser/src/ast_builder.rs | 49 ++++-- crates/oxc_regexp_parser/src/lib.rs | 3 +- crates/oxc_regexp_parser/src/parser.rs | 109 ------------- .../src/parser/body_parser/mod.rs | 54 +++++++ .../src/parser/body_parser/state.rs | 8 + .../src/parser/flag_parser.rs | 62 ++++++++ .../src/parser/literal_parser.rs | 109 +++++++++++++ crates/oxc_regexp_parser/src/parser/mod.rs | 11 ++ .../oxc_regexp_parser/src/parser/options.rs | 29 ++++ crates/oxc_regexp_parser/src/parser/reader.rs | 143 ++++++++++++++++++ crates/oxc_regexp_parser/src/state.rs | 10 -- 15 files changed, 479 insertions(+), 146 deletions(-) delete mode 100644 crates/oxc_regexp_parser/src/parser.rs create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/mod.rs create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/state.rs create mode 100644 crates/oxc_regexp_parser/src/parser/flag_parser.rs create mode 100644 crates/oxc_regexp_parser/src/parser/literal_parser.rs create mode 100644 crates/oxc_regexp_parser/src/parser/mod.rs create mode 100644 crates/oxc_regexp_parser/src/parser/options.rs create mode 100644 crates/oxc_regexp_parser/src/parser/reader.rs delete mode 100644 crates/oxc_regexp_parser/src/state.rs diff --git a/Cargo.lock b/Cargo.lock index a830897881dbb..d9667235956a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1651,6 +1651,8 @@ dependencies = [ "oxc_allocator", "oxc_diagnostics", "oxc_span", + "oxc_syntax", + "rustc-hash", ] [[package]] diff --git a/crates/oxc_regexp_parser/Cargo.toml b/crates/oxc_regexp_parser/Cargo.toml index 9fa45a2d38d90..ea71ef973c9d8 100644 --- a/crates/oxc_regexp_parser/Cargo.toml +++ b/crates/oxc_regexp_parser/Cargo.toml @@ -22,4 +22,7 @@ doctest = false [dependencies] oxc_allocator = { workspace = true } oxc_diagnostics = { workspace = true } +oxc_syntax = { workspace = true } oxc_span = { workspace = true } + +rustc-hash = { workspace = true } diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 9c5ae70c532d8..7dab1386d60d7 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -1,19 +1,26 @@ use oxc_allocator::Allocator; -use oxc_regexp_parser::{ast, Parser}; +use oxc_regexp_parser::{ast, Parser, ParserOptions}; fn main() { - println!("🍀 Hello parser!"); - let allocator = Allocator::default(); - let parser = Parser::new(&allocator, "/abc/i"); - let ret = parser.parse(); + for (pat, options) in [ + ("/abc/", ParserOptions::default()), + ("/abc/iv", ParserOptions::default()), + ("/duplicated-flags/ii", ParserOptions::default()), + ("/invalid-flags/x", ParserOptions::default()), + ] { + println!("Test: {pat} + {options:?}"); + let parser = Parser::new(&allocator, pat, options); + let ret = parser.parse(); - match ret { - Ok(ast::RegExpLiteral { pattern, flags, .. }) => { - println!("✨ PAT: {pattern:#?}"); - println!("✨ FLG: {flags:#?}"); + match ret { + Ok(ast::RegExpLiteral { pattern, flags, .. }) => { + println!("✨ {pattern:#?}"); + println!("✨ {flags:?}"); + } + Err(err) => println!("💥 {}", err.message), } - Err(err) => println!("💥 {err:#?}"), + println!(); } } diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 926194bfcccb7..e50b00c02781b 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -348,12 +348,12 @@ pub struct Quantifier<'a> { #[derive(Debug)] pub struct Flags { pub span: Span, - pub dot_all: bool, pub global: bool, - pub has_indices: bool, pub ignore_case: bool, pub multiline: bool, - pub sticky: bool, pub unicode: bool, + pub sticky: bool, + pub dot_all: bool, + pub has_indices: bool, pub unicode_sets: bool, } diff --git a/crates/oxc_regexp_parser/src/ast_builder.rs b/crates/oxc_regexp_parser/src/ast_builder.rs index d7d5d0fc2589a..3213dbccbb9a1 100644 --- a/crates/oxc_regexp_parser/src/ast_builder.rs +++ b/crates/oxc_regexp_parser/src/ast_builder.rs @@ -1,4 +1,6 @@ -use oxc_allocator::Allocator; +#![allow(clippy::unused_self, clippy::fn_params_excessive_bools, clippy::too_many_arguments)] + +use oxc_allocator::{Allocator, Vec}; use oxc_span::Span; use crate::ast; @@ -13,8 +15,13 @@ impl<'a> AstBuilder<'a> { Self { allocator } } + #[inline] + pub fn new_vec(self) -> Vec<'a, T> { + Vec::new_in(self.allocator) + } + pub fn reg_exp_literal( - &mut self, + self, span: Span, pattern: ast::Pattern<'a>, flags: ast::Flags, @@ -22,18 +29,36 @@ impl<'a> AstBuilder<'a> { ast::RegExpLiteral { span, pattern, flags } } - pub fn flags(&mut self, span: Span) -> ast::Flags { + pub fn pattern( + self, + span: Span, + alternatives: Vec<'a, ast::Alternative<'a>>, + ) -> ast::Pattern<'a> { + ast::Pattern { span, alternatives } + } + + pub fn flags( + self, + span: Span, + global: bool, + ignore_case: bool, + multiline: bool, + unicode: bool, + sticky: bool, + dot_all: bool, + has_indices: bool, + unicode_sets: bool, + ) -> ast::Flags { ast::Flags { span, - // TODO: From arguments - dot_all: false, - global: false, - has_indices: false, - ignore_case: false, - multiline: false, - sticky: false, - unicode: false, - unicode_sets: false, + global, + ignore_case, + multiline, + unicode, + sticky, + dot_all, + has_indices, + unicode_sets, } } } diff --git a/crates/oxc_regexp_parser/src/lib.rs b/crates/oxc_regexp_parser/src/lib.rs index 0516263ccf20d..ca29d3a448ee2 100644 --- a/crates/oxc_regexp_parser/src/lib.rs +++ b/crates/oxc_regexp_parser/src/lib.rs @@ -1,6 +1,5 @@ pub mod ast; mod ast_builder; mod parser; -mod state; -pub use crate::parser::Parser; +pub use crate::parser::{FlagsParser, Parser, PatternParser, ParserOptions}; diff --git a/crates/oxc_regexp_parser/src/parser.rs b/crates/oxc_regexp_parser/src/parser.rs deleted file mode 100644 index 3071ec15efffe..0000000000000 --- a/crates/oxc_regexp_parser/src/parser.rs +++ /dev/null @@ -1,109 +0,0 @@ -use oxc_allocator::Allocator; -use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Span; - -use crate::{ast, ast_builder::AstBuilder, state::ParserState}; - -#[derive(Clone, Copy)] -struct ParserOptions { - /// The flag to disable Annex B syntax. - /// Default: false - strict: bool, - /// ECMAScript version. - /// - `2015` added `u` and `y` flags - /// - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, - /// and Unicode Property Escape - /// - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes - /// - `2022` added `d` flag - /// - `2023` added more valid Unicode Property Escapes - /// - `2024` added `v` flag - /// - `2025` added duplicate named capturing groups - /// Default: 2025 - ecma_version: u32, // TODO: Enum? -} -impl Default for ParserOptions { - fn default() -> Self { - Self { strict: false, ecma_version: 2025 } - } -} - -pub struct Parser<'a> { - allocator: &'a Allocator, - source_text: &'a str, - options: ParserOptions, -} - -impl<'a> Parser<'a> { - pub fn new(allocator: &'a Allocator, source_text: &'a str) -> Self { - let options = ParserOptions::default(); - Self { allocator, source_text, options } - } - - #[must_use] - pub fn with_strict(mut self, is_strict: bool) -> Self { - self.options.strict = is_strict; - self - } - #[must_use] - pub fn with_ecma_version(mut self, ecma_version: u32) -> Self { - self.options.ecma_version = ecma_version; - self - } - - pub fn parse(self) -> Result> { - let mut parser = ParserImpl::new(self.allocator, self.source_text, self.options); - parser.parse() - } -} - -struct ParserImpl<'a> { - // lexer, - errors: Vec, - source_text: &'a str, - state: ParserState, - ast: AstBuilder<'a>, -} - -impl<'a> ParserImpl<'a> { - fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { - Self { - errors: vec![], - source_text, - state: ParserState::new(options.strict, options.ecma_version), - ast: AstBuilder::new(allocator), - } - } - - fn parse(&mut self) -> Result> { - let pattern = todo!("parse_pattern()"); - let flags = todo!("parse_flags()"); - - // this._srcCtx = { source, start, end, kind: "literal" } - // this._unicodeSetsMode = this._unicodeMode = this._nFlag = false - // this.reset(source, start, end) - - // if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) { - // const flagStart = this.index - // const unicode = source.includes("u", flagStart) - // const unicodeSets = source.includes("v", flagStart) - // this.validateFlagsInternal(source, flagStart, end) - // this.validatePatternInternal(source, start + 1, flagStart - 1, { - // unicode, - // unicodeSets, - // }) - // } else { - // const c = String.fromCodePoint(this.currentCodePoint) - // this.raise(`Unexpected character '${c}'`) - // } - - let span = Span::new(0, self.source_text.len() as u32); - Ok(self.ast.reg_exp_literal(span, pattern, flags)) - } - - fn parse_pattern(&mut self) -> Result> { - todo!() - } - fn parse_flags(&mut self) -> Result { - todo!() - } -} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs new file mode 100644 index 0000000000000..3c41d850bd7a5 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -0,0 +1,54 @@ +mod state; + +use oxc_allocator::Allocator; +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Span; + +use crate::{ + ast, + ast_builder::AstBuilder, + parser::{body_parser::state::ParserState, options::ParserOptions, reader::Reader}, +}; + +pub struct PatternParser<'a> { + source_text: &'a str, + ast: AstBuilder<'a>, + options: ParserOptions, + reader: Reader<'a>, + state: ParserState, +} + +impl<'a> PatternParser<'a> { + pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + Self { + source_text, + ast: AstBuilder::new(allocator), + options, + reader: Reader::new(), + state: ParserState::default(), + } + } + + pub fn parse(&mut self) -> Result> { + if self.source_text.is_empty() { + return Err(OxcDiagnostic::error("Empty")); + } + + let (start, end) = (0, self.source_text.len()); + self.reader.reset(self.source_text, start, end, self.state.unicode_mode); + + // const unicode = source.includes("u", flagStart) + // const unicodeSets = source.includes("v", flagStart) + // this.validatePatternInternal(source, start + 1, flagStart - 1, { + // unicode, + // unicodeSets, + // }) + let pattern = self.ast.pattern( + #[allow(clippy::cast_possible_truncation)] + Span::new(0, self.source_text.len() as u32), + self.ast.new_vec(), + ); + + Ok(pattern) + } +} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/state.rs b/crates/oxc_regexp_parser/src/parser/body_parser/state.rs new file mode 100644 index 0000000000000..6a7d3fb48c71f --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/state.rs @@ -0,0 +1,8 @@ +#[derive(Debug, Default)] +pub struct ParserState { + pub unicode_mode: bool, + pub unicode_sets_mode: bool, + pub n_flag: bool, +} + +impl ParserState {} diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/parser/flag_parser.rs new file mode 100644 index 0000000000000..efe79c376dbc6 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/flag_parser.rs @@ -0,0 +1,62 @@ +use oxc_allocator::Allocator; +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Span; +use rustc_hash::FxHashSet; + +use crate::{ast, ast_builder::AstBuilder, parser::ParserOptions}; + +pub struct FlagsParser<'a> { + source_text: &'a str, + ast: AstBuilder<'a>, + options: ParserOptions, +} + +impl<'a> FlagsParser<'a> { + pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + Self { source_text, ast: AstBuilder::new(allocator), options } + } + + pub fn parse(&mut self) -> Result { + let mut existing_flags = FxHashSet::default(); + + let mut global = false; + let mut ignore_case = false; + let mut multiline = false; + let mut unicode = false; + let mut sticky = false; + let mut dot_all = false; + let mut has_indices = false; + let mut unicode_sets = false; + + for c in self.source_text.chars() { + if !existing_flags.insert(c) { + return Err(OxcDiagnostic::error(format!("Duplicated flag `{c}`"))); + } + + match c { + 'g' => global = true, + 'i' => ignore_case = true, + 'm' => multiline = true, + 'u' if 2015 <= self.options.ecma_version => unicode = true, + 'y' if 2015 <= self.options.ecma_version => sticky = true, + 's' if 2018 <= self.options.ecma_version => dot_all = true, + 'd' if 2022 <= self.options.ecma_version => has_indices = true, + 'v' if 2024 <= self.options.ecma_version => unicode_sets = true, + _ => return Err(OxcDiagnostic::error(format!("Invalid flag `{c}`"))), + } + } + + Ok(self.ast.flags( + #[allow(clippy::cast_possible_truncation)] + Span::new(0, self.source_text.len() as u32), + global, + ignore_case, + multiline, + unicode, + sticky, + dot_all, + has_indices, + unicode_sets, + )) + } +} diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs new file mode 100644 index 0000000000000..babf5e4522bd5 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -0,0 +1,109 @@ +use oxc_allocator::Allocator; +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Span; +use oxc_syntax::identifier::is_line_terminator; + +use crate::{ + ast, + ast_builder::AstBuilder, + parser::{ + body_parser::PatternParser, flag_parser::FlagsParser, options::ParserOptions, + reader::Reader, + }, +}; + +pub struct Parser<'a> { + allocator: &'a Allocator, + source_text: &'a str, + ast: AstBuilder<'a>, + options: ParserOptions, +} + +impl<'a> Parser<'a> { + pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + Self { allocator, source_text, ast: AstBuilder::new(allocator), options } + } + + // NOTE: Should return `ParserReturn { (empty)literal, errors }`? + pub fn parse(self) -> Result> { + let flag_start_idx = is_valid_reg_exp_literal(self.source_text)?; + + let body_text = &self.source_text[1..flag_start_idx - 1]; + let flag_text = &self.source_text[flag_start_idx..]; + + let mut flags = FlagsParser::new(self.allocator, flag_text, self.options).parse()?; + // Adjust Span to be based on the original source text + #[allow(clippy::cast_possible_truncation)] + let flags_span = Span::new( + flags.span.start + flag_start_idx as u32, + flags.span.end + flag_start_idx as u32, + ); + flags.span = flags_span; + + let pattern = PatternParser::new(self.allocator, body_text, self.options).parse()?; + + #[allow(clippy::cast_possible_truncation)] + let span = Span::new(0, self.source_text.len() as u32); + Ok(self.ast.reg_exp_literal(span, pattern, flags)) + } +} + +/// ``` +/// / RegularExpressionBody / RegularExpressionFlags +/// ``` +/// https://tc39.es/ecma262/#sec-literals-regular-expression-literals +fn is_valid_reg_exp_literal(source_text: &str) -> Result { + let mut reader = Reader::new(); + reader.reset(source_text, 0, source_text.len(), false); + + if !reader.eat('/') { + return Err(OxcDiagnostic::error("Unexpected character")); + }; + + // For `RegularExpressionFirstChar` check + let body_start_idx = reader.idx; + let mut in_escape = false; + let mut in_character_class = false; + loop { + match reader.c1 { + None => { + let kind = + if in_character_class { "character class" } else { "regular expression" }; + return Err(OxcDiagnostic::error(format!("Unterminated {kind}"))); + } + Some(c) if is_line_terminator(c) => { + let kind = + if in_character_class { "character class" } else { "regular expression" }; + return Err(OxcDiagnostic::error(format!("Unterminated {kind}"))); + } + Some(c) => { + if in_escape { + in_escape = false; + } else if c == '\\' { + in_escape = true; + } else if c == '[' { + in_character_class = true; + } else if c == ']' { + in_character_class = false; + } else if c == '/' && !in_character_class + || c == '*' && reader.idx == body_start_idx + { + break; + } + + reader.advance(); + } + } + } + + if reader.idx == body_start_idx { + return Err(OxcDiagnostic::error("Empty")); + } + + if !reader.eat('/') { + return Err(OxcDiagnostic::error("Unexpected character")); + }; + + // flag start + Ok(reader.idx) +} diff --git a/crates/oxc_regexp_parser/src/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/mod.rs new file mode 100644 index 0000000000000..4e26df9d8304f --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/mod.rs @@ -0,0 +1,11 @@ +#![allow(clippy::missing_errors_doc)] +mod body_parser; +mod flag_parser; +mod literal_parser; +mod options; +mod reader; + +pub use body_parser::PatternParser; +pub use flag_parser::FlagsParser; +pub use literal_parser::Parser; +pub use options::ParserOptions; diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/parser/options.rs new file mode 100644 index 0000000000000..d2fc8521e0d47 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/options.rs @@ -0,0 +1,29 @@ +#[derive(Clone, Copy, Debug)] +pub struct ParserOptions { + /// The flag to disable Annex B syntax. + /// Default: false + pub strict: bool, + /// ECMAScript version. + /// - `2015` added `u` and `y` flags + /// - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, + /// and Unicode Property Escape + /// - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes + /// - `2022` added `d` flag + /// - `2023` added more valid Unicode Property Escapes + /// - `2024` added `v` flag + /// - `2025` added duplicate named capturing groups + /// Default: 2025 + pub ecma_version: u32, // TODO: Enum? +} +impl Default for ParserOptions { + fn default() -> Self { + Self { strict: false, ecma_version: 2025 } + } +} + +impl ParserOptions { + #[must_use] + pub fn new(self, is_strict: bool, ecma_version: u32) -> Self { + Self { strict: is_strict, ecma_version } + } +} diff --git a/crates/oxc_regexp_parser/src/parser/reader.rs b/crates/oxc_regexp_parser/src/parser/reader.rs new file mode 100644 index 0000000000000..eca9e750a9460 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/reader.rs @@ -0,0 +1,143 @@ +pub struct Reader<'a> { + r_impl: Box, + source: &'a str, + pub idx: usize, + end: usize, + pub c1: Option, + w1: usize, + c2: Option, + w2: usize, + c3: Option, + w3: usize, + c4: Option, +} + +impl<'a> Reader<'a> { + pub fn new() -> Self { + Self { + source: "", + idx: 0, + end: 0, + c1: None, + w1: 0, + c2: None, + w2: 0, + c3: None, + w3: 0, + c4: None, + r_impl: Box::new(LegacyImpl), + } + } + + pub fn reset(&mut self, source: &'a str, start: usize, end: usize, u_flag: bool) { + self.source = source; + self.end = end; + if u_flag { + self.r_impl = Box::new(UnicodeImpl); + } else { + self.r_impl = Box::new(LegacyImpl); + } + self.rewind(start); + } + + pub fn rewind(&mut self, index: usize) { + self.idx = index; + self.c1 = self.r_impl.at(self.source, self.end, index); + self.w1 = self.r_impl.width(self.c1); + self.c2 = self.r_impl.at(self.source, self.end, index + self.w1); + self.w2 = self.r_impl.width(self.c2); + self.c3 = self.r_impl.at(self.source, self.end, index + self.w1 + self.w2); + self.w3 = self.r_impl.width(self.c3); + self.c4 = self.r_impl.at(self.source, self.end, index + self.w1 + self.w2 + self.w3); + } + + pub fn advance(&mut self) { + if self.c1.is_some() { + self.idx += self.w1; + self.c1 = self.c2; + self.w1 = self.c1.map_or(0, |c| c.len_utf8()); + self.c2 = self.c3; + self.w2 = self.c2.map_or(0, |c| c.len_utf8()); + self.c3 = self.c4; + self.w3 = self.c3.map_or(0, |c| c.len_utf8()); + self.c4 = + self.r_impl.at(self.source, self.end, self.idx + self.w1 + self.w2 + self.w3); + } + } + + pub fn eat(&mut self, cp: char) -> bool { + if self.c1 == Some(cp) { + self.advance(); + true + } else { + false + } + } + + pub fn eat2(&mut self, cp1: char, cp2: char) -> bool { + if self.c1 == Some(cp1) && self.c2 == Some(cp2) { + self.advance(); + self.advance(); + true + } else { + false + } + } + + pub fn eat3(&mut self, cp1: char, cp2: char, cp3: char) -> bool { + if self.c1 == Some(cp1) && self.c2 == Some(cp2) && self.c3 == Some(cp3) { + self.advance(); + self.advance(); + self.advance(); + true + } else { + false + } + } + + fn char_at(&self, index: usize) -> Option { + if index < self.end { + self.source[index..].chars().next() + } else { + None + } + } +} + +trait ReaderImpl { + fn at(&self, s: &str, end: usize, i: usize) -> Option; + fn width(&self, c: Option) -> usize; +} + +struct LegacyImpl; +/// Used with `u` flag +struct UnicodeImpl; + +impl ReaderImpl for LegacyImpl { + fn at(&self, s: &str, end: usize, i: usize) -> Option { + if i < end { + return s.chars().nth(i); + } + None + } + + fn width(&self, _c: Option) -> usize { + 1 + } +} + +impl ReaderImpl for UnicodeImpl { + fn at(&self, s: &str, end: usize, i: usize) -> Option { + if i < end { + return s[i..].chars().next(); + } + None + } + + fn width(&self, c: Option) -> usize { + match c { + Some(c) if c as u32 > 0xFFFF => 2, + _ => 1, + } + } +} diff --git a/crates/oxc_regexp_parser/src/state.rs b/crates/oxc_regexp_parser/src/state.rs deleted file mode 100644 index f39b7746ba843..0000000000000 --- a/crates/oxc_regexp_parser/src/state.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub struct ParserState { - strict: bool, - ecma_version: u32, -} - -impl ParserState { - pub fn new(strict: bool, ecma_version: u32) -> Self { - Self { strict, ecma_version } - } -} From 8d03d2b1ad058dfb8b60722b03e26599c7d46fb0 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 21 Jun 2024 22:08:58 +0900 Subject: [PATCH 005/143] Adjust span --- crates/oxc_regexp_parser/examples/parser.rs | 11 +++-- .../src/parser/body_parser/mod.rs | 39 +++++++++++----- .../src/parser/flag_parser.rs | 20 +++++--- .../src/parser/literal_parser.rs | 46 +++++++++++-------- crates/oxc_regexp_parser/src/parser/mod.rs | 1 + .../oxc_regexp_parser/src/parser/options.rs | 14 ++++-- crates/oxc_regexp_parser/src/parser/reader.rs | 20 +++----- crates/oxc_regexp_parser/src/parser/span.rs | 16 +++++++ 8 files changed, 110 insertions(+), 57 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/span.rs diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 7dab1386d60d7..9734f60d83b89 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -5,8 +5,9 @@ fn main() { let allocator = Allocator::default(); for (pat, options) in [ - ("/abc/", ParserOptions::default()), - ("/abc/iv", ParserOptions::default()), + ("/ab/", ParserOptions::default()), + ("/abc/i", ParserOptions::default()), + ("/abcd/igv", ParserOptions::default()), ("/duplicated-flags/ii", ParserOptions::default()), ("/invalid-flags/x", ParserOptions::default()), ] { @@ -16,8 +17,10 @@ fn main() { match ret { Ok(ast::RegExpLiteral { pattern, flags, .. }) => { - println!("✨ {pattern:#?}"); - println!("✨ {flags:?}"); + println!("✨ {}", pattern.span.source_text(pat)); + println!("{pattern:#?}"); + println!("✨ {}", flags.span.source_text(pat)); + println!("{flags:?}"); } Err(err) => println!("💥 {}", err.message), } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 3c41d850bd7a5..12155b463acd9 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -2,18 +2,20 @@ mod state; use oxc_allocator::Allocator; use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Span; use crate::{ ast, ast_builder::AstBuilder, - parser::{body_parser::state::ParserState, options::ParserOptions, reader::Reader}, + parser::{ + body_parser::state::ParserState, options::ParserOptions, reader::Reader, span::SpanFactory, + }, }; pub struct PatternParser<'a> { source_text: &'a str, - ast: AstBuilder<'a>, options: ParserOptions, + ast: AstBuilder<'a>, + span_factory: SpanFactory, reader: Reader<'a>, state: ParserState, } @@ -22,8 +24,9 @@ impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { Self { source_text, - ast: AstBuilder::new(allocator), options, + ast: AstBuilder::new(allocator), + span_factory: SpanFactory::new(options.span_offset), reader: Reader::new(), state: ParserState::default(), } @@ -37,17 +40,29 @@ impl<'a> PatternParser<'a> { let (start, end) = (0, self.source_text.len()); self.reader.reset(self.source_text, start, end, self.state.unicode_mode); - // const unicode = source.includes("u", flagStart) - // const unicodeSets = source.includes("v", flagStart) - // this.validatePatternInternal(source, start + 1, flagStart - 1, { - // unicode, - // unicodeSets, - // }) let pattern = self.ast.pattern( - #[allow(clippy::cast_possible_truncation)] - Span::new(0, self.source_text.len() as u32), + self.span_factory.new_with_offset(0, self.source_text.len()), self.ast.new_vec(), ); + // const unicode = source.includes("u", flagStart) + // const unicodeSets = source.includes("v", flagStart) + // const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); + + // this._unicodeMode = mode.unicodeMode; + // this._nFlag = mode.nFlag; + // this._unicodeSetsMode = mode.unicodeSetsMode; + // this.reset(source, start, end); + // this.consumePattern(); + + // if ( + // !this._nFlag && + // this.ecmaVersion >= 2018 && + // !this._groupSpecifiers.isEmpty() + // ) { + // this._nFlag = true; + // this.rewind(start); + // this.consumePattern(); + // } Ok(pattern) } diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/parser/flag_parser.rs index efe79c376dbc6..cfbd5cbc78687 100644 --- a/crates/oxc_regexp_parser/src/parser/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/flag_parser.rs @@ -1,19 +1,28 @@ use oxc_allocator::Allocator; use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Span; use rustc_hash::FxHashSet; -use crate::{ast, ast_builder::AstBuilder, parser::ParserOptions}; +use crate::{ + ast, + ast_builder::AstBuilder, + parser::{options::ParserOptions, span::SpanFactory}, +}; pub struct FlagsParser<'a> { source_text: &'a str, - ast: AstBuilder<'a>, options: ParserOptions, + ast: AstBuilder<'a>, + span_factory: SpanFactory, } impl<'a> FlagsParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { - Self { source_text, ast: AstBuilder::new(allocator), options } + Self { + source_text, + options, + ast: AstBuilder::new(allocator), + span_factory: SpanFactory::new(options.span_offset), + } } pub fn parse(&mut self) -> Result { @@ -47,8 +56,7 @@ impl<'a> FlagsParser<'a> { } Ok(self.ast.flags( - #[allow(clippy::cast_possible_truncation)] - Span::new(0, self.source_text.len() as u32), + self.span_factory.new_with_offset(0, self.source_text.len()), global, ignore_case, multiline, diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index babf5e4522bd5..001dc5b417220 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -1,6 +1,5 @@ use oxc_allocator::Allocator; use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Span; use oxc_syntax::identifier::is_line_terminator; use crate::{ @@ -8,42 +7,53 @@ use crate::{ ast_builder::AstBuilder, parser::{ body_parser::PatternParser, flag_parser::FlagsParser, options::ParserOptions, - reader::Reader, + reader::Reader, span::SpanFactory, }, }; +// LiteralParser pub struct Parser<'a> { allocator: &'a Allocator, source_text: &'a str, - ast: AstBuilder<'a>, options: ParserOptions, + ast: AstBuilder<'a>, + span_factory: SpanFactory, } impl<'a> Parser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { - Self { allocator, source_text, ast: AstBuilder::new(allocator), options } + Self { + allocator, + source_text, + options, + ast: AstBuilder::new(allocator), + span_factory: SpanFactory::new(options.span_offset), + } } // NOTE: Should return `ParserReturn { (empty)literal, errors }`? pub fn parse(self) -> Result> { let flag_start_idx = is_valid_reg_exp_literal(self.source_text)?; - let body_text = &self.source_text[1..flag_start_idx - 1]; - let flag_text = &self.source_text[flag_start_idx..]; - - let mut flags = FlagsParser::new(self.allocator, flag_text, self.options).parse()?; - // Adjust Span to be based on the original source text - #[allow(clippy::cast_possible_truncation)] - let flags_span = Span::new( - flags.span.start + flag_start_idx as u32, - flags.span.end + flag_start_idx as u32, - ); - flags.span = flags_span; + let flags = FlagsParser::new( + self.allocator, + &self.source_text[flag_start_idx..], + #[allow(clippy::cast_possible_truncation)] + self.options.with_span_offset(self.options.span_offset + flag_start_idx as u32), + ) + .parse()?; - let pattern = PatternParser::new(self.allocator, body_text, self.options).parse()?; + // TODO: Pass these flags to `PatternParser` + flags.unicode; + flags.unicode_sets; + let pattern = PatternParser::new( + self.allocator, + &self.source_text[1..flag_start_idx - 1], + self.options.with_span_offset(self.options.span_offset + 1), + ) + .parse()?; - #[allow(clippy::cast_possible_truncation)] - let span = Span::new(0, self.source_text.len() as u32); + let span = self.span_factory.new_with_offset(0, self.source_text.len()); Ok(self.ast.reg_exp_literal(span, pattern, flags)) } } diff --git a/crates/oxc_regexp_parser/src/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/mod.rs index 4e26df9d8304f..0a629f9cdd704 100644 --- a/crates/oxc_regexp_parser/src/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/mod.rs @@ -4,6 +4,7 @@ mod flag_parser; mod literal_parser; mod options; mod reader; +mod span; pub use body_parser::PatternParser; pub use flag_parser::FlagsParser; diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/parser/options.rs index d2fc8521e0d47..0131f8d94112d 100644 --- a/crates/oxc_regexp_parser/src/parser/options.rs +++ b/crates/oxc_regexp_parser/src/parser/options.rs @@ -14,16 +14,24 @@ pub struct ParserOptions { /// - `2025` added duplicate named capturing groups /// Default: 2025 pub ecma_version: u32, // TODO: Enum? + + /// Used to adjust Span pos to the global source code. + pub span_offset: u32, } impl Default for ParserOptions { fn default() -> Self { - Self { strict: false, ecma_version: 2025 } + Self { strict: false, ecma_version: 2025, span_offset: 0 } } } impl ParserOptions { #[must_use] - pub fn new(self, is_strict: bool, ecma_version: u32) -> Self { - Self { strict: is_strict, ecma_version } + pub fn new(is_strict: bool, ecma_version: u32) -> Self { + Self { strict: is_strict, ecma_version, span_offset: 0 } + } + + #[must_use] + pub fn with_span_offset(self, span_offset: u32) -> ParserOptions { + ParserOptions { span_offset, ..self } } } diff --git a/crates/oxc_regexp_parser/src/parser/reader.rs b/crates/oxc_regexp_parser/src/parser/reader.rs index eca9e750a9460..39f5e18f62fee 100644 --- a/crates/oxc_regexp_parser/src/parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/reader.rs @@ -55,13 +55,12 @@ impl<'a> Reader<'a> { if self.c1.is_some() { self.idx += self.w1; self.c1 = self.c2; - self.w1 = self.c1.map_or(0, |c| c.len_utf8()); + self.w1 = self.w2; self.c2 = self.c3; - self.w2 = self.c2.map_or(0, |c| c.len_utf8()); + self.w2 = self.r_impl.width(self.c2); self.c3 = self.c4; - self.w3 = self.c3.map_or(0, |c| c.len_utf8()); - self.c4 = - self.r_impl.at(self.source, self.end, self.idx + self.w1 + self.w2 + self.w3); + self.w3 = self.r_impl.width(self.c3); + self.c4 = self.r_impl.at(self.source, self.end, self.idx + self.w1 + self.w2 + self.w3); } } @@ -94,23 +93,16 @@ impl<'a> Reader<'a> { false } } - - fn char_at(&self, index: usize) -> Option { - if index < self.end { - self.source[index..].chars().next() - } else { - None - } - } } +// NOTE: I'm not sure this implementation is required for Rust... trait ReaderImpl { fn at(&self, s: &str, end: usize, i: usize) -> Option; fn width(&self, c: Option) -> usize; } struct LegacyImpl; -/// Used with `u` flag +/// Used when `u` or `v` flag is set struct UnicodeImpl; impl ReaderImpl for LegacyImpl { diff --git a/crates/oxc_regexp_parser/src/parser/span.rs b/crates/oxc_regexp_parser/src/parser/span.rs new file mode 100644 index 0000000000000..4278e22758ce9 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/span.rs @@ -0,0 +1,16 @@ +use oxc_span::Span; + +pub struct SpanFactory { + span_offset: u32, +} + +impl SpanFactory { + pub fn new(span_offset: u32) -> Self { + Self { span_offset } + } + + #[allow(clippy::cast_possible_truncation)] + pub fn new_with_offset(&self, start: usize, end: usize) -> Span { + Span::new((start as u32) + self.span_offset, (end as u32) + self.span_offset) + } +} From 396c4391d7bc805fc7d3cee232a6f24cc3099ee3 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Sat, 22 Jun 2024 19:12:37 +0900 Subject: [PATCH 006/143] Omit options support --- .../src/parser/body_parser/mod.rs | 5 ++-- .../src/parser/flag_parser.rs | 18 ++++++----- .../oxc_regexp_parser/src/parser/options.rs | 30 +++---------------- 3 files changed, 17 insertions(+), 36 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 12155b463acd9..58accb1c4e05e 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -13,7 +13,7 @@ use crate::{ pub struct PatternParser<'a> { source_text: &'a str, - options: ParserOptions, + // options: ParserOptions, ast: AstBuilder<'a>, span_factory: SpanFactory, reader: Reader<'a>, @@ -24,7 +24,7 @@ impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { Self { source_text, - options, + // options, ast: AstBuilder::new(allocator), span_factory: SpanFactory::new(options.span_offset), reader: Reader::new(), @@ -56,7 +56,6 @@ impl<'a> PatternParser<'a> { // if ( // !this._nFlag && - // this.ecmaVersion >= 2018 && // !this._groupSpecifiers.isEmpty() // ) { // this._nFlag = true; diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/parser/flag_parser.rs index cfbd5cbc78687..568c919682e66 100644 --- a/crates/oxc_regexp_parser/src/parser/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/flag_parser.rs @@ -10,7 +10,7 @@ use crate::{ pub struct FlagsParser<'a> { source_text: &'a str, - options: ParserOptions, + // options: ParserOptions, ast: AstBuilder<'a>, span_factory: SpanFactory, } @@ -19,7 +19,7 @@ impl<'a> FlagsParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { Self { source_text, - options, + // options, ast: AstBuilder::new(allocator), span_factory: SpanFactory::new(options.span_offset), } @@ -46,15 +46,19 @@ impl<'a> FlagsParser<'a> { 'g' => global = true, 'i' => ignore_case = true, 'm' => multiline = true, - 'u' if 2015 <= self.options.ecma_version => unicode = true, - 'y' if 2015 <= self.options.ecma_version => sticky = true, - 's' if 2018 <= self.options.ecma_version => dot_all = true, - 'd' if 2022 <= self.options.ecma_version => has_indices = true, - 'v' if 2024 <= self.options.ecma_version => unicode_sets = true, + 'u' => unicode = true, + 'y' => sticky = true, + 's' => dot_all = true, + 'd' => has_indices = true, + 'v' => unicode_sets = true, _ => return Err(OxcDiagnostic::error(format!("Invalid flag `{c}`"))), } } + if unicode && unicode_sets { + return Err(OxcDiagnostic::error("Invalid regular expression flags")); + } + Ok(self.ast.flags( self.span_factory.new_with_offset(0, self.source_text.len()), global, diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/parser/options.rs index 0131f8d94112d..c22b92606d451 100644 --- a/crates/oxc_regexp_parser/src/parser/options.rs +++ b/crates/oxc_regexp_parser/src/parser/options.rs @@ -1,35 +1,13 @@ -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Default)] pub struct ParserOptions { - /// The flag to disable Annex B syntax. - /// Default: false - pub strict: bool, - /// ECMAScript version. - /// - `2015` added `u` and `y` flags - /// - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, - /// and Unicode Property Escape - /// - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes - /// - `2022` added `d` flag - /// - `2023` added more valid Unicode Property Escapes - /// - `2024` added `v` flag - /// - `2025` added duplicate named capturing groups - /// Default: 2025 - pub ecma_version: u32, // TODO: Enum? - + // Not planning to implement + // pub strict: bool, + // pub ecma_version: u32, // or Enum? /// Used to adjust Span pos to the global source code. pub span_offset: u32, } -impl Default for ParserOptions { - fn default() -> Self { - Self { strict: false, ecma_version: 2025, span_offset: 0 } - } -} impl ParserOptions { - #[must_use] - pub fn new(is_strict: bool, ecma_version: u32) -> Self { - Self { strict: is_strict, ecma_version, span_offset: 0 } - } - #[must_use] pub fn with_span_offset(self, span_offset: u32) -> ParserOptions { ParserOptions { span_offset, ..self } From 56f7fdc0351274279f94193c46681122379f7838 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Sat, 22 Jun 2024 20:43:10 +0900 Subject: [PATCH 007/143] Run fmt --- crates/oxc_regexp_parser/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/lib.rs b/crates/oxc_regexp_parser/src/lib.rs index ca29d3a448ee2..f04e9876d6ef9 100644 --- a/crates/oxc_regexp_parser/src/lib.rs +++ b/crates/oxc_regexp_parser/src/lib.rs @@ -2,4 +2,4 @@ pub mod ast; mod ast_builder; mod parser; -pub use crate::parser::{FlagsParser, Parser, PatternParser, ParserOptions}; +pub use crate::parser::{FlagsParser, Parser, ParserOptions, PatternParser}; From dc57a2b5e13d2d0d9e5e746be1fa0e79f8fba1bf Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Sat, 22 Jun 2024 20:44:42 +0900 Subject: [PATCH 008/143] Fix typo --- crates/oxc_regexp_parser/_oxc_js_regex/parser.rs | 2 +- crates/oxc_regexp_parser/src/ast.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs b/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs index bca2c289ec990..05177acfe790e 100644 --- a/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs +++ b/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs @@ -58,7 +58,7 @@ pub struct Parser<'a> { back_reference_names: HashSet, last_assertion_is_quantifiable: bool, last_range: Range, - last_str_value: Stirng, + last_str_value: String, } #[derive(Default, Copy, Clone)] diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index e50b00c02781b..15c77e53293e7 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -63,7 +63,7 @@ pub enum EdgeAssertionKind { End, } -/// The word bondary assertion. +/// The word boundary assertion. /// E.g. `\b`, `\B` #[derive(Debug)] pub struct WordBoundaryAssertion { From 76f23eaa4fac3ec54975d237d414bbaf10e44086 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Sat, 22 Jun 2024 20:45:41 +0900 Subject: [PATCH 009/143] Fix doc --- crates/oxc_regexp_parser/src/parser/literal_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index 001dc5b417220..e2218ea464435 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -61,7 +61,7 @@ impl<'a> Parser<'a> { /// ``` /// / RegularExpressionBody / RegularExpressionFlags /// ``` -/// https://tc39.es/ecma262/#sec-literals-regular-expression-literals +/// fn is_valid_reg_exp_literal(source_text: &str) -> Result { let mut reader = Reader::new(); reader.reset(source_text, 0, source_text.len(), false); From dfe439efbbf6730853785e3a40a73a0225b870fc Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 24 Jun 2024 11:16:58 +0900 Subject: [PATCH 010/143] Remove ast_builder --- crates/oxc_regexp_parser/src/ast_builder.rs | 64 ------------------- crates/oxc_regexp_parser/src/lib.rs | 1 - .../src/parser/body_parser/mod.rs | 15 ++--- .../src/parser/flag_parser.rs | 11 ++-- .../src/parser/literal_parser.rs | 5 +- 5 files changed, 12 insertions(+), 84 deletions(-) delete mode 100644 crates/oxc_regexp_parser/src/ast_builder.rs diff --git a/crates/oxc_regexp_parser/src/ast_builder.rs b/crates/oxc_regexp_parser/src/ast_builder.rs deleted file mode 100644 index 3213dbccbb9a1..0000000000000 --- a/crates/oxc_regexp_parser/src/ast_builder.rs +++ /dev/null @@ -1,64 +0,0 @@ -#![allow(clippy::unused_self, clippy::fn_params_excessive_bools, clippy::too_many_arguments)] - -use oxc_allocator::{Allocator, Vec}; -use oxc_span::Span; - -use crate::ast; - -#[derive(Copy, Clone)] -pub struct AstBuilder<'a> { - pub allocator: &'a Allocator, -} - -impl<'a> AstBuilder<'a> { - pub fn new(allocator: &'a Allocator) -> Self { - Self { allocator } - } - - #[inline] - pub fn new_vec(self) -> Vec<'a, T> { - Vec::new_in(self.allocator) - } - - pub fn reg_exp_literal( - self, - span: Span, - pattern: ast::Pattern<'a>, - flags: ast::Flags, - ) -> ast::RegExpLiteral<'a> { - ast::RegExpLiteral { span, pattern, flags } - } - - pub fn pattern( - self, - span: Span, - alternatives: Vec<'a, ast::Alternative<'a>>, - ) -> ast::Pattern<'a> { - ast::Pattern { span, alternatives } - } - - pub fn flags( - self, - span: Span, - global: bool, - ignore_case: bool, - multiline: bool, - unicode: bool, - sticky: bool, - dot_all: bool, - has_indices: bool, - unicode_sets: bool, - ) -> ast::Flags { - ast::Flags { - span, - global, - ignore_case, - multiline, - unicode, - sticky, - dot_all, - has_indices, - unicode_sets, - } - } -} diff --git a/crates/oxc_regexp_parser/src/lib.rs b/crates/oxc_regexp_parser/src/lib.rs index f04e9876d6ef9..5d6b6269e0744 100644 --- a/crates/oxc_regexp_parser/src/lib.rs +++ b/crates/oxc_regexp_parser/src/lib.rs @@ -1,5 +1,4 @@ pub mod ast; -mod ast_builder; mod parser; pub use crate::parser::{FlagsParser, Parser, ParserOptions, PatternParser}; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 58accb1c4e05e..1b7fef23efff6 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -1,20 +1,19 @@ mod state; -use oxc_allocator::Allocator; +use oxc_allocator::{Allocator, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, - ast_builder::AstBuilder, parser::{ body_parser::state::ParserState, options::ParserOptions, reader::Reader, span::SpanFactory, }, }; pub struct PatternParser<'a> { + allocator: &'a Allocator, source_text: &'a str, // options: ParserOptions, - ast: AstBuilder<'a>, span_factory: SpanFactory, reader: Reader<'a>, state: ParserState, @@ -23,9 +22,9 @@ pub struct PatternParser<'a> { impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { Self { + allocator, source_text, // options, - ast: AstBuilder::new(allocator), span_factory: SpanFactory::new(options.span_offset), reader: Reader::new(), state: ParserState::default(), @@ -40,10 +39,10 @@ impl<'a> PatternParser<'a> { let (start, end) = (0, self.source_text.len()); self.reader.reset(self.source_text, start, end, self.state.unicode_mode); - let pattern = self.ast.pattern( - self.span_factory.new_with_offset(0, self.source_text.len()), - self.ast.new_vec(), - ); + let pattern = ast::Pattern { + span: self.span_factory.new_with_offset(0, self.source_text.len()), + alternatives: Vec::new_in(self.allocator), + }; // const unicode = source.includes("u", flagStart) // const unicodeSets = source.includes("v", flagStart) // const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/parser/flag_parser.rs index 568c919682e66..065d2ce748728 100644 --- a/crates/oxc_regexp_parser/src/parser/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/flag_parser.rs @@ -4,23 +4,20 @@ use rustc_hash::FxHashSet; use crate::{ ast, - ast_builder::AstBuilder, parser::{options::ParserOptions, span::SpanFactory}, }; pub struct FlagsParser<'a> { source_text: &'a str, // options: ParserOptions, - ast: AstBuilder<'a>, span_factory: SpanFactory, } impl<'a> FlagsParser<'a> { - pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + pub fn new(_allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { Self { source_text, // options, - ast: AstBuilder::new(allocator), span_factory: SpanFactory::new(options.span_offset), } } @@ -59,8 +56,8 @@ impl<'a> FlagsParser<'a> { return Err(OxcDiagnostic::error("Invalid regular expression flags")); } - Ok(self.ast.flags( - self.span_factory.new_with_offset(0, self.source_text.len()), + Ok(ast::Flags { + span: self.span_factory.new_with_offset(0, self.source_text.len()), global, ignore_case, multiline, @@ -69,6 +66,6 @@ impl<'a> FlagsParser<'a> { dot_all, has_indices, unicode_sets, - )) + }) } } diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index e2218ea464435..b26ec21aebbfa 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -4,7 +4,6 @@ use oxc_syntax::identifier::is_line_terminator; use crate::{ ast, - ast_builder::AstBuilder, parser::{ body_parser::PatternParser, flag_parser::FlagsParser, options::ParserOptions, reader::Reader, span::SpanFactory, @@ -16,7 +15,6 @@ pub struct Parser<'a> { allocator: &'a Allocator, source_text: &'a str, options: ParserOptions, - ast: AstBuilder<'a>, span_factory: SpanFactory, } @@ -26,7 +24,6 @@ impl<'a> Parser<'a> { allocator, source_text, options, - ast: AstBuilder::new(allocator), span_factory: SpanFactory::new(options.span_offset), } } @@ -54,7 +51,7 @@ impl<'a> Parser<'a> { .parse()?; let span = self.span_factory.new_with_offset(0, self.source_text.len()); - Ok(self.ast.reg_exp_literal(span, pattern, flags)) + Ok(ast::RegExpLiteral { span, pattern, flags }) } } From cb4d2783c7181d93ab5b069700be138b866adb1a Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 24 Jun 2024 12:51:02 +0900 Subject: [PATCH 011/143] Keep enum size small --- crates/oxc_regexp_parser/src/ast.rs | 92 ++++++++++++++--------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 15c77e53293e7..33d3a9e6adddb 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -27,24 +27,24 @@ pub struct Alternative<'a> { /// The type which includes all atom nodes. #[derive(Debug)] pub enum Element<'a> { - Assertion(Assertion<'a>), + Assertion(Box<'a, Assertion<'a>>), #[allow(clippy::enum_variant_names)] - QuantifiableElement(QuantifiableElement<'a>), - Quantifier(Quantifier<'a>), + QuantifiableElement(Box<'a, QuantifiableElement<'a>>), + Quantifier(Box<'a, Quantifier<'a>>), } /// The assertion. #[derive(Debug)] pub enum Assertion<'a> { - BoundaryAssertion(BoundaryAssertion), - LookaroundAssertion(LookaroundAssertion<'a>), + BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), + LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), } /// The boundary assertion. #[derive(Debug)] -pub enum BoundaryAssertion { - EdgeAssertion(EdgeAssertion), - WordBoundaryAssertion(WordBoundaryAssertion), +pub enum BoundaryAssertion<'a> { + EdgeAssertion(Box<'a, EdgeAssertion>), + WordBoundaryAssertion(Box<'a, WordBoundaryAssertion>), } /// The edge boundary assertion. @@ -74,8 +74,8 @@ pub struct WordBoundaryAssertion { /// The lookaround assertion. #[derive(Debug)] pub enum LookaroundAssertion<'a> { - LookaheadAssertion(LookaheadAssertion<'a>), - LookbehindAssertion(LookbehindAssertion<'a>), + LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), + LookbehindAssertion(Box<'a, LookbehindAssertion<'a>>), } /// The lookahead assertion. @@ -99,22 +99,22 @@ pub struct LookbehindAssertion<'a> { /// The type which includes all atom nodes that Quantifier node can have as children. #[derive(Debug)] pub enum QuantifiableElement<'a> { - Backreference(Backreference<'a>), - CapturingGroup(CapturingGroup<'a>), - Character(Character), - CharacterClass(CharacterClass<'a>), - CharacterSet(CharacterSet<'a>), - ExpressionCharacterClass(ExpressionCharacterClass<'a>), - Group(Group<'a>), - LookaheadAssertion(LookaheadAssertion<'a>), + Backreference(Box<'a, Backreference<'a>>), + CapturingGroup(Box<'a, CapturingGroup<'a>>), + Character(Box<'a, Character>), + CharacterClass(Box<'a, CharacterClass<'a>>), + CharacterSet(Box<'a, CharacterSet<'a>>), + ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + Group(Box<'a, Group<'a>>), + LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), } /// The backreference. /// E.g. `\1`, `\k` #[derive(Debug)] pub enum Backreference<'a> { - AmbiguousBackreference(AmbiguousBackreference<'a>), - UnambiguousBackreference(UnambiguousBackreference<'a>), + AmbiguousBackreference(Box<'a, AmbiguousBackreference<'a>>), + UnambiguousBackreference(Box<'a, UnambiguousBackreference<'a>>), } #[derive(Debug)] @@ -154,8 +154,8 @@ pub struct Character { /// E.g. `[ab]`, `[^ab]` #[derive(Debug)] pub enum CharacterClass<'a> { - ClassRangesCharacterClass(ClassRangesCharacterClass<'a>), - UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), + ClassRangesCharacterClass(Box<'a, ClassRangesCharacterClass<'a>>), + UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), } /// The character class used in legacy (neither `u` nor `v` flag) and Unicode mode (`u` flag). @@ -171,10 +171,10 @@ pub struct ClassRangesCharacterClass<'a> { #[derive(Debug)] pub enum ClassRangesCharacterClassElement<'a> { - Character(Character), - CharacterClassRange(CharacterClassRange), - CharacterUnicodePropertyCharacterSet(CharacterUnicodePropertyCharacterSet<'a>), - EscapeCharacterSet(EscapeCharacterSet), + Character(Box<'a, Character>), + CharacterClassRange(Box<'a, CharacterClassRange>), + CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), } /// The character class. @@ -221,13 +221,13 @@ pub struct UnicodeSetsCharacterClass<'a> { #[derive(Debug)] pub enum UnicodeSetsCharacterClassElement<'a> { - Character(Character), - CharacterClassRange(CharacterClassRange), - ClassStringDisjunction(ClassStringDisjunction<'a>), - EscapeCharacterSet(EscapeCharacterSet), - ExpressionCharacterClass(ExpressionCharacterClass<'a>), - UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), - UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), + Character(Box<'a, Character>), + CharacterClassRange(Box<'a, CharacterClassRange>), + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), + UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), } /// The character set. @@ -235,8 +235,8 @@ pub enum UnicodeSetsCharacterClassElement<'a> { #[allow(clippy::enum_variant_names)] pub enum CharacterSet<'a> { AnyCharacterSet, - EscapeCharacterSet(EscapeCharacterSet), - UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), } /// The character class escape. @@ -259,8 +259,8 @@ pub enum EscapeCharacterSetKind { /// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` #[derive(Debug)] pub enum UnicodePropertyCharacterSet<'a> { - CharacterUnicodePropertyCharacterSet(CharacterUnicodePropertyCharacterSet<'a>), - StringsUnicodePropertyCharacterSet(StringsUnicodePropertyCharacterSet<'a>), + CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), + StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet<'a>>), } /// The unicode property escape with property of strings. @@ -281,18 +281,18 @@ pub struct ExpressionCharacterClass<'a> { #[derive(Debug)] pub enum ExpressionCharacterClassExpr<'a> { - ClassIntersection(ClassIntersection<'a>), - ClassSubtraction(ClassSubtraction<'a>), + ClassIntersection(Box<'a, ClassIntersection<'a>>), + ClassSubtraction(Box<'a, ClassSubtraction<'a>>), } #[derive(Debug)] pub enum ClassSetOperand<'a> { - Character(Character), - ClassStringDisjunction(ClassStringDisjunction<'a>), - EscapeCharacterSet(EscapeCharacterSet), + Character(Box<'a, Character>), + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), - UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), + UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), } /// The character class intersection. @@ -307,7 +307,7 @@ pub struct ClassIntersection<'a> { #[derive(Debug)] pub enum ClassIntersectionLeft<'a> { ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSetOperand(ClassSetOperand<'a>), + ClassSetOperand(Box<'a, ClassSetOperand<'a>>), } /// The character class subtraction. @@ -321,7 +321,7 @@ pub struct ClassSubtraction<'a> { #[derive(Debug)] pub enum ClassSubtractionLeft<'a> { - ClassSetOperand(ClassSetOperand<'a>), + ClassSetOperand(Box<'a, ClassSetOperand<'a>>), ClassSubtraction(Box<'a, ClassSubtraction<'a>>), } From 912929a48f9ca7fdc20c9a79fe122b2b690d9a40 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 25 Jun 2024 16:03:17 +0900 Subject: [PATCH 012/143] Validate u+v flags --- crates/oxc_regexp_parser/src/parser/flag_parser.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/parser/flag_parser.rs index 065d2ce748728..12e756ce0955a 100644 --- a/crates/oxc_regexp_parser/src/parser/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/flag_parser.rs @@ -52,6 +52,8 @@ impl<'a> FlagsParser<'a> { } } + // This should be a `SyntaxError` + // https://tc39.es/ecma262/#sec-parsepattern if unicode && unicode_sets { return Err(OxcDiagnostic::error("Invalid regular expression flags")); } From 164bb37587e233cc4cd5ae46064da999dd28aee6 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 25 Jun 2024 23:41:01 +0900 Subject: [PATCH 013/143] Clean up --- crates/oxc_regexp_parser/examples/parser.rs | 1 + .../src/parser/body_parser/mod.rs | 33 +++---------- .../src/parser/body_parser/state.rs | 6 +-- .../src/parser/flag_parser.rs | 2 +- .../src/parser/literal_parser.rs | 49 +++++++++++++++---- .../oxc_regexp_parser/src/parser/options.rs | 7 +++ crates/oxc_regexp_parser/src/parser/reader.rs | 25 +++------- crates/oxc_regexp_parser/src/parser/span.rs | 2 +- 8 files changed, 65 insertions(+), 60 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 9734f60d83b89..f0d5f92ea9d8b 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -8,6 +8,7 @@ fn main() { ("/ab/", ParserOptions::default()), ("/abc/i", ParserOptions::default()), ("/abcd/igv", ParserOptions::default()), + ("//", ParserOptions::default()), ("/duplicated-flags/ii", ParserOptions::default()), ("/invalid-flags/x", ParserOptions::default()), ] { diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 1b7fef23efff6..75267cca6a7f4 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -13,20 +13,22 @@ use crate::{ pub struct PatternParser<'a> { allocator: &'a Allocator, source_text: &'a str, - // options: ParserOptions, span_factory: SpanFactory, reader: Reader<'a>, state: ParserState, } impl<'a> PatternParser<'a> { - pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + pub fn new( + allocator: &'a Allocator, + source_text: &'a str, + options: ParserOptions, + ) -> Self { Self { allocator, source_text, - // options, span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(), + reader: Reader::new(source_text, options.unicode_mode), state: ParserState::default(), } } @@ -36,31 +38,10 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Empty")); } - let (start, end) = (0, self.source_text.len()); - self.reader.reset(self.source_text, start, end, self.state.unicode_mode); - let pattern = ast::Pattern { - span: self.span_factory.new_with_offset(0, self.source_text.len()), + span: self.span_factory.create(0, self.source_text.len()), alternatives: Vec::new_in(self.allocator), }; - // const unicode = source.includes("u", flagStart) - // const unicodeSets = source.includes("v", flagStart) - // const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); - - // this._unicodeMode = mode.unicodeMode; - // this._nFlag = mode.nFlag; - // this._unicodeSetsMode = mode.unicodeSetsMode; - // this.reset(source, start, end); - // this.consumePattern(); - - // if ( - // !this._nFlag && - // !this._groupSpecifiers.isEmpty() - // ) { - // this._nFlag = true; - // this.rewind(start); - // this.consumePattern(); - // } Ok(pattern) } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/state.rs b/crates/oxc_regexp_parser/src/parser/body_parser/state.rs index 6a7d3fb48c71f..0c36346f0a505 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/state.rs @@ -1,8 +1,4 @@ #[derive(Debug, Default)] -pub struct ParserState { - pub unicode_mode: bool, - pub unicode_sets_mode: bool, - pub n_flag: bool, -} +pub struct ParserState; impl ParserState {} diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/parser/flag_parser.rs index 12e756ce0955a..e8659eb7e635a 100644 --- a/crates/oxc_regexp_parser/src/parser/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/flag_parser.rs @@ -59,7 +59,7 @@ impl<'a> FlagsParser<'a> { } Ok(ast::Flags { - span: self.span_factory.new_with_offset(0, self.source_text.len()), + span: self.span_factory.create(0, self.source_text.len()), global, ignore_case, multiline, diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index b26ec21aebbfa..568e6bc6094f4 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -28,10 +28,11 @@ impl<'a> Parser<'a> { } } - // NOTE: Should return `ParserReturn { (empty)literal, errors }`? pub fn parse(self) -> Result> { + // Precheck if the source text is a valid regular expression literal let flag_start_idx = is_valid_reg_exp_literal(self.source_text)?; + // If valid, parse flags first let flags = FlagsParser::new( self.allocator, &self.source_text[flag_start_idx..], @@ -40,18 +41,24 @@ impl<'a> Parser<'a> { ) .parse()?; - // TODO: Pass these flags to `PatternParser` - flags.unicode; - flags.unicode_sets; + // Then parse the pattern with the flags + let unicode_mode = flags.unicode || flags.unicode_sets; + let unicode_sets_mode = flags.unicode_sets; + let pattern = PatternParser::new( self.allocator, &self.source_text[1..flag_start_idx - 1], - self.options.with_span_offset(self.options.span_offset + 1), + self.options + .with_span_offset(self.options.span_offset + 1) + .with_modes(unicode_mode, unicode_sets_mode), ) .parse()?; - let span = self.span_factory.new_with_offset(0, self.source_text.len()); - Ok(ast::RegExpLiteral { span, pattern, flags }) + Ok(ast::RegExpLiteral { + span: self.span_factory.create(0, self.source_text.len()), + pattern, + flags, + }) } } @@ -60,14 +67,15 @@ impl<'a> Parser<'a> { /// ``` /// fn is_valid_reg_exp_literal(source_text: &str) -> Result { - let mut reader = Reader::new(); - reader.reset(source_text, 0, source_text.len(), false); + let mut reader = Reader::new( + source_text, + false, // We don't care Unicode or UTF-16 here + ); if !reader.eat('/') { return Err(OxcDiagnostic::error("Unexpected character")); }; - // For `RegularExpressionFirstChar` check let body_start_idx = reader.idx; let mut in_escape = false; let mut in_character_class = false; @@ -93,6 +101,8 @@ fn is_valid_reg_exp_literal(source_text: &str) -> Result { } else if c == ']' { in_character_class = false; } else if c == '/' && !in_character_class + // `*` is not allowed as `RegularExpressionFirstChar` + // https://tc39.es/ecma262/#prod-RegularExpressionBody || c == '*' && reader.idx == body_start_idx { break; @@ -114,3 +124,22 @@ fn is_valid_reg_exp_literal(source_text: &str) -> Result { // flag start Ok(reader.idx) } + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_is_valid_reg_exp_literal() { + assert_eq!(is_valid_reg_exp_literal("/abc/").unwrap(), 5); + assert_eq!(is_valid_reg_exp_literal("/abcd/i").unwrap(), 6); + assert_eq!(is_valid_reg_exp_literal("/正規表現/u").unwrap(), 6); + assert_eq!(is_valid_reg_exp_literal("/👈🏻/i").unwrap(), 4); + + assert!(is_valid_reg_exp_literal("/").is_err()); + assert!(is_valid_reg_exp_literal("//").is_err()); + assert!(is_valid_reg_exp_literal("///").is_err()); + assert!(is_valid_reg_exp_literal("/*abc/").is_err()); + assert!(is_valid_reg_exp_literal("/\\/").is_err()); + } +} diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/parser/options.rs index c22b92606d451..c2a0225257d96 100644 --- a/crates/oxc_regexp_parser/src/parser/options.rs +++ b/crates/oxc_regexp_parser/src/parser/options.rs @@ -5,6 +5,8 @@ pub struct ParserOptions { // pub ecma_version: u32, // or Enum? /// Used to adjust Span pos to the global source code. pub span_offset: u32, + pub unicode_mode: bool, + pub unicode_sets_mode: bool, } impl ParserOptions { @@ -12,4 +14,9 @@ impl ParserOptions { pub fn with_span_offset(self, span_offset: u32) -> ParserOptions { ParserOptions { span_offset, ..self } } + + #[must_use] + pub fn with_modes(self, unicode_mode: bool, unicode_sets_mode: bool) -> ParserOptions { + ParserOptions { unicode_mode, unicode_sets_mode, ..self } + } } diff --git a/crates/oxc_regexp_parser/src/parser/reader.rs b/crates/oxc_regexp_parser/src/parser/reader.rs index 39f5e18f62fee..18e17abc7733e 100644 --- a/crates/oxc_regexp_parser/src/parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/reader.rs @@ -13,11 +13,11 @@ pub struct Reader<'a> { } impl<'a> Reader<'a> { - pub fn new() -> Self { - Self { - source: "", + pub fn new(source: &'a str, unicode_mode: bool) -> Self { + let mut reader = Self { + source, idx: 0, - end: 0, + end: source.len(), c1: None, w1: 0, c2: None, @@ -25,19 +25,10 @@ impl<'a> Reader<'a> { c3: None, w3: 0, c4: None, - r_impl: Box::new(LegacyImpl), - } - } - - pub fn reset(&mut self, source: &'a str, start: usize, end: usize, u_flag: bool) { - self.source = source; - self.end = end; - if u_flag { - self.r_impl = Box::new(UnicodeImpl); - } else { - self.r_impl = Box::new(LegacyImpl); - } - self.rewind(start); + r_impl: if unicode_mode { Box::new(UnicodeImpl) } else { Box::new(LegacyImpl) }, + }; + reader.rewind(0); + reader } pub fn rewind(&mut self, index: usize) { diff --git a/crates/oxc_regexp_parser/src/parser/span.rs b/crates/oxc_regexp_parser/src/parser/span.rs index 4278e22758ce9..ed57d43c54159 100644 --- a/crates/oxc_regexp_parser/src/parser/span.rs +++ b/crates/oxc_regexp_parser/src/parser/span.rs @@ -10,7 +10,7 @@ impl SpanFactory { } #[allow(clippy::cast_possible_truncation)] - pub fn new_with_offset(&self, start: usize, end: usize) -> Span { + pub fn create(&self, start: usize, end: usize) -> Span { Span::new((start as u32) + self.span_offset, (end as u32) + self.span_offset) } } From 6fbb6595e55bb81088f945f45abac18371e37a50 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 26 Jun 2024 10:19:28 +0900 Subject: [PATCH 014/143] Wip reader --- crates/oxc_regexp_parser/src/parser/reader.rs | 123 ++++++++++++------ 1 file changed, 81 insertions(+), 42 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/reader.rs b/crates/oxc_regexp_parser/src/parser/reader.rs index 18e17abc7733e..65e131aaeafcf 100644 --- a/crates/oxc_regexp_parser/src/parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/reader.rs @@ -1,8 +1,22 @@ +// pub struct Reader2<'a> { +// chars: Box + 'a>, +// } +// impl<'a> Reader2<'a> { +// pub fn new(source: &'a str, unicode_mode: bool) -> Self { +// let chars: Box> = if unicode_mode { +// Box::new(source.chars().map(|c| c as u32)) +// } else { +// #[allow(clippy::cast_lossless)] +// Box::new(source.encode_utf16().map(|c| c as u32)) +// }; + +// Self { chars } +// } +// } + pub struct Reader<'a> { - r_impl: Box, - source: &'a str, + r_impl: Box>, pub idx: usize, - end: usize, pub c1: Option, w1: usize, c2: Option, @@ -15,9 +29,7 @@ pub struct Reader<'a> { impl<'a> Reader<'a> { pub fn new(source: &'a str, unicode_mode: bool) -> Self { let mut reader = Self { - source, idx: 0, - end: source.len(), c1: None, w1: 0, c2: None, @@ -25,7 +37,11 @@ impl<'a> Reader<'a> { c3: None, w3: 0, c4: None, - r_impl: if unicode_mode { Box::new(UnicodeImpl) } else { Box::new(LegacyImpl) }, + r_impl: if unicode_mode { + Box::new(UnicodeImpl::new(source)) + } else { + Box::new(LegacyImpl::new(source)) + }, }; reader.rewind(0); reader @@ -33,13 +49,13 @@ impl<'a> Reader<'a> { pub fn rewind(&mut self, index: usize) { self.idx = index; - self.c1 = self.r_impl.at(self.source, self.end, index); + self.c1 = self.r_impl.at(index); self.w1 = self.r_impl.width(self.c1); - self.c2 = self.r_impl.at(self.source, self.end, index + self.w1); + self.c2 = self.r_impl.at(index + self.w1); self.w2 = self.r_impl.width(self.c2); - self.c3 = self.r_impl.at(self.source, self.end, index + self.w1 + self.w2); + self.c3 = self.r_impl.at(index + self.w1 + self.w2); self.w3 = self.r_impl.width(self.c3); - self.c4 = self.r_impl.at(self.source, self.end, index + self.w1 + self.w2 + self.w3); + self.c4 = self.r_impl.at(index + self.w1 + self.w2 + self.w3); } pub fn advance(&mut self) { @@ -51,7 +67,7 @@ impl<'a> Reader<'a> { self.w2 = self.r_impl.width(self.c2); self.c3 = self.c4; self.w3 = self.r_impl.width(self.c3); - self.c4 = self.r_impl.at(self.source, self.end, self.idx + self.w1 + self.w2 + self.w3); + self.c4 = self.r_impl.at(self.idx + self.w1 + self.w2 + self.w3); } } @@ -64,42 +80,57 @@ impl<'a> Reader<'a> { } } - pub fn eat2(&mut self, cp1: char, cp2: char) -> bool { - if self.c1 == Some(cp1) && self.c2 == Some(cp2) { - self.advance(); - self.advance(); - true - } else { - false - } - } + // pub fn eat2(&mut self, cp1: char, cp2: char) -> bool { + // if self.c1 == Some(cp1) && self.c2 == Some(cp2) { + // self.advance(); + // self.advance(); + // true + // } else { + // false + // } + // } - pub fn eat3(&mut self, cp1: char, cp2: char, cp3: char) -> bool { - if self.c1 == Some(cp1) && self.c2 == Some(cp2) && self.c3 == Some(cp3) { - self.advance(); - self.advance(); - self.advance(); - true - } else { - false - } - } + // pub fn eat3(&mut self, cp1: char, cp2: char, cp3: char) -> bool { + // if self.c1 == Some(cp1) && self.c2 == Some(cp2) && self.c3 == Some(cp3) { + // self.advance(); + // self.advance(); + // self.advance(); + // true + // } else { + // false + // } + // } } // NOTE: I'm not sure this implementation is required for Rust... -trait ReaderImpl { - fn at(&self, s: &str, end: usize, i: usize) -> Option; +trait ReaderImpl<'a> { + fn at(&self, i: usize) -> Option; fn width(&self, c: Option) -> usize; } -struct LegacyImpl; +struct LegacyImpl { + chars: Vec, + end: usize, +} /// Used when `u` or `v` flag is set -struct UnicodeImpl; +struct UnicodeImpl { + chars: Vec, + end: usize, +} + +impl LegacyImpl { + fn new(source: &str) -> Self { + #[allow(clippy::cast_lossless)] + let chars = source.encode_utf16().map(|c| c as u32).collect::>(); + let end = chars.len(); + Self { chars, end } + } +} -impl ReaderImpl for LegacyImpl { - fn at(&self, s: &str, end: usize, i: usize) -> Option { - if i < end { - return s.chars().nth(i); +impl<'a> ReaderImpl<'a> for LegacyImpl { + fn at(&self, i: usize) -> Option { + if i < self.end { + return self.chars.get(i).map(|&c| char::from_u32(c))?; } None } @@ -109,10 +140,18 @@ impl ReaderImpl for LegacyImpl { } } -impl ReaderImpl for UnicodeImpl { - fn at(&self, s: &str, end: usize, i: usize) -> Option { - if i < end { - return s[i..].chars().next(); +impl UnicodeImpl { + fn new(source: &str) -> Self { + let chars = source.chars().map(|c| c as u32).collect::>(); + let end = chars.len(); + Self { chars, end } + } +} + +impl<'a> ReaderImpl<'a> for UnicodeImpl { + fn at(&self, i: usize) -> Option { + if i < self.end { + return self.chars.get(i).map(|&c| char::from_u32(c))?; } None } From 0dc517b9671799b65b9dd4f9bf01ac421c0f9daf Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 27 Jun 2024 13:53:59 +0900 Subject: [PATCH 015/143] Fix warnings --- crates/oxc_regexp_parser/examples/parser.rs | 1 + .../src/parser/body_parser/mod.rs | 20 ++- .../src/parser/body_parser/reader.rs | 138 +++++++++++++++ .../src/parser/literal_parser.rs | 100 ++++++----- crates/oxc_regexp_parser/src/parser/mod.rs | 1 - crates/oxc_regexp_parser/src/parser/reader.rs | 165 ------------------ 6 files changed, 211 insertions(+), 214 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/reader.rs delete mode 100644 crates/oxc_regexp_parser/src/parser/reader.rs diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index f0d5f92ea9d8b..83f645bd36a73 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -8,6 +8,7 @@ fn main() { ("/ab/", ParserOptions::default()), ("/abc/i", ParserOptions::default()), ("/abcd/igv", ParserOptions::default()), + ("/emo👈🏻ji/u", ParserOptions::default()), ("//", ParserOptions::default()), ("/duplicated-flags/ii", ParserOptions::default()), ("/invalid-flags/x", ParserOptions::default()), diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 75267cca6a7f4..ac2ebb5844866 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -1,3 +1,4 @@ +mod reader; mod state; use oxc_allocator::{Allocator, Vec}; @@ -6,7 +7,9 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, parser::{ - body_parser::state::ParserState, options::ParserOptions, reader::Reader, span::SpanFactory, + body_parser::{reader::Reader, state::ParserState}, + options::ParserOptions, + span::SpanFactory, }, }; @@ -14,22 +17,18 @@ pub struct PatternParser<'a> { allocator: &'a Allocator, source_text: &'a str, span_factory: SpanFactory, - reader: Reader<'a>, - state: ParserState, + reader: Reader, + _state: ParserState, } impl<'a> PatternParser<'a> { - pub fn new( - allocator: &'a Allocator, - source_text: &'a str, - options: ParserOptions, - ) -> Self { + pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { Self { allocator, source_text, span_factory: SpanFactory::new(options.span_offset), reader: Reader::new(source_text, options.unicode_mode), - state: ParserState::default(), + _state: ParserState, } } @@ -38,6 +37,9 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Empty")); } + self.reader.eat1('/'); + self.reader.rewind(0); + let pattern = ast::Pattern { span: self.span_factory.create(0, self.source_text.len()), alternatives: Vec::new_in(self.allocator), diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs new file mode 100644 index 0000000000000..13290d0af8f2e --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -0,0 +1,138 @@ +pub struct Reader { + units: Vec, + pub index: usize, +} + +impl<'a> Reader { + pub fn new(source: &'a str, unicode_mode: bool) -> Self { + // NOTE: Is there a better way to avoid using `Vec`? + // - To implement `peek2`, `peek3`, `Peekable` is not enough + // - To `rewind` at any point, consuming `Iter` need more efforts(e.g. cache) + let units = if unicode_mode { + source.chars().map(|c| c as u32).collect() + } else { + #[allow(clippy::cast_lossless)] + source.encode_utf16().map(|u| u as u32).collect() + }; + + Self { units, index: 0 } + } + + // NOTE: How to know global unicode(utf8?) `Span` position? + // - If reader is non-unicode mode, the `index` is not a valid position anymore + // - Need map or something with using `ch.len_utf8|16`? + #[allow(clippy::unused_self, dead_code)] + pub fn position(&self) -> usize { + 0 + } + + pub fn rewind(&mut self, index: usize) { + self.index = index; + } + + pub fn advance(&mut self) { + self.index += 1; + } + + pub fn peek1(&self) -> Option { + self.units.get(self.index).copied() + } + // TODO: peek2, peek3 + + pub fn eat1(&mut self, ch: char) -> bool { + if self.peek1() == Some(ch as u32) { + self.advance(); + return true; + } + false + } + // TODO: eat2, eat3 +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_index_basic() { + let source_text = "/RegExp✨/i"; + let unicode_reader = Reader::new(source_text, true); + let legacy_reader = Reader::new(source_text, false); + + for mut reader in [unicode_reader, legacy_reader] { + assert_eq!(reader.index, 0); + assert_eq!(reader.peek1(), Some('/' as u32)); + + reader.advance(); + assert_eq!(reader.index, 1); + assert_eq!(reader.peek1(), Some('R' as u32)); + + assert!(reader.eat1('R')); + assert!(!reader.eat1('R')); + assert!(reader.eat1('e')); + assert!(reader.eat1('g')); + assert!(reader.eat1('E')); + assert!(!reader.eat1('E')); + assert!(reader.eat1('x')); + assert!(reader.eat1('p')); + + let start = reader.index; + assert_eq!(start, 7); + assert_eq!(reader.peek1(), Some('✨' as u32)); + + reader.advance(); + reader.advance(); + assert_eq!(reader.peek1(), Some('i' as u32)); + + reader.advance(); + assert_eq!(reader.peek1(), None); + + reader.rewind(start); + assert_eq!(reader.peek1(), Some('✨' as u32)); + } + } + + #[test] + fn test_index_unicode() { + let source_text = "𠮷野家は👈🏻あっち"; + + let mut unicode_reader = Reader::new(source_text, true); + + assert!(unicode_reader.eat1('𠮷')); // Can eat + assert!(unicode_reader.eat1('野')); + assert!(unicode_reader.eat1('家')); + let start = unicode_reader.index; + assert!(unicode_reader.eat1('は')); + + // Emoji + Skin tone + unicode_reader.advance(); + unicode_reader.advance(); + + assert!(unicode_reader.eat1('あ')); + + unicode_reader.rewind(start); + assert!(unicode_reader.eat1('は')); + + let mut legacy_reader = Reader::new(source_text, false); + + assert!(!legacy_reader.eat1('𠮷')); // Can not eat + legacy_reader.advance(); + assert!(!legacy_reader.eat1('𠮷')); // Also can not + legacy_reader.advance(); + + assert!(legacy_reader.eat1('野')); + assert!(legacy_reader.eat1('家')); + let start = unicode_reader.index; + assert!(legacy_reader.eat1('は')); + + legacy_reader.advance(); + legacy_reader.advance(); + legacy_reader.advance(); + legacy_reader.advance(); + + assert!(legacy_reader.eat1('あ')); + + legacy_reader.rewind(start); + assert!(legacy_reader.eat1('は')); + } +} diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index 568e6bc6094f4..d1c7644f1c302 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -6,7 +6,7 @@ use crate::{ ast, parser::{ body_parser::PatternParser, flag_parser::FlagsParser, options::ParserOptions, - reader::Reader, span::SpanFactory, + span::SpanFactory, }, }; @@ -30,14 +30,15 @@ impl<'a> Parser<'a> { pub fn parse(self) -> Result> { // Precheck if the source text is a valid regular expression literal - let flag_start_idx = is_valid_reg_exp_literal(self.source_text)?; + let (body_start_offset, body_end_offset, flag_start_offset) = + parse_reg_exp_literal(self.source_text)?; // If valid, parse flags first let flags = FlagsParser::new( self.allocator, - &self.source_text[flag_start_idx..], + &self.source_text[flag_start_offset..], #[allow(clippy::cast_possible_truncation)] - self.options.with_span_offset(self.options.span_offset + flag_start_idx as u32), + self.options.with_span_offset(self.options.span_offset + flag_start_offset as u32), ) .parse()?; @@ -47,9 +48,10 @@ impl<'a> Parser<'a> { let pattern = PatternParser::new( self.allocator, - &self.source_text[1..flag_start_idx - 1], + &self.source_text[body_start_offset..body_end_offset], + #[allow(clippy::cast_possible_truncation)] self.options - .with_span_offset(self.options.span_offset + 1) + .with_span_offset(self.options.span_offset + body_start_offset as u32) .with_modes(unicode_mode, unicode_sets_mode), ) .parse()?; @@ -62,67 +64,71 @@ impl<'a> Parser<'a> { } } +/// Check passed source text is a valid regular expression literal. /// ``` /// / RegularExpressionBody / RegularExpressionFlags /// ``` /// -fn is_valid_reg_exp_literal(source_text: &str) -> Result { - let mut reader = Reader::new( - source_text, - false, // We don't care Unicode or UTF-16 here - ); +/// Returns `(body_start_offset, body_end_offset, flag_start_offset)`. +fn parse_reg_exp_literal(source_text: &str) -> Result<(usize, usize, usize)> { + let mut offset = 0; + let mut chars = source_text.chars().peekable(); - if !reader.eat('/') { + let Some('/') = chars.next() else { return Err(OxcDiagnostic::error("Unexpected character")); }; + offset += 1; // '/' + + let body_start = offset; - let body_start_idx = reader.idx; let mut in_escape = false; let mut in_character_class = false; loop { - match reader.c1 { + match chars.peek() { None => { let kind = if in_character_class { "character class" } else { "regular expression" }; return Err(OxcDiagnostic::error(format!("Unterminated {kind}"))); } - Some(c) if is_line_terminator(c) => { + Some(&ch) if is_line_terminator(ch) => { let kind = if in_character_class { "character class" } else { "regular expression" }; return Err(OxcDiagnostic::error(format!("Unterminated {kind}"))); } - Some(c) => { + Some(&ch) => { if in_escape { in_escape = false; - } else if c == '\\' { + } else if ch == '\\' { in_escape = true; - } else if c == '[' { + } else if ch == '[' { in_character_class = true; - } else if c == ']' { + } else if ch == ']' { in_character_class = false; - } else if c == '/' && !in_character_class + } else if ch == '/' && !in_character_class // `*` is not allowed as `RegularExpressionFirstChar` // https://tc39.es/ecma262/#prod-RegularExpressionBody - || c == '*' && reader.idx == body_start_idx + || offset == body_start && ch == '*' { break; } - reader.advance(); + offset += ch.len_utf8(); } } - } - if reader.idx == body_start_idx { - return Err(OxcDiagnostic::error("Empty")); + chars.next(); } - if !reader.eat('/') { + let Some('/') = chars.next() else { return Err(OxcDiagnostic::error("Unexpected character")); }; + let body_end = offset; + + if body_end == body_start { + return Err(OxcDiagnostic::error("Empty")); + } - // flag start - Ok(reader.idx) + Ok((body_start, body_end, body_end + 1)) } #[cfg(test)] @@ -130,16 +136,32 @@ mod test { use super::*; #[test] - fn test_is_valid_reg_exp_literal() { - assert_eq!(is_valid_reg_exp_literal("/abc/").unwrap(), 5); - assert_eq!(is_valid_reg_exp_literal("/abcd/i").unwrap(), 6); - assert_eq!(is_valid_reg_exp_literal("/正規表現/u").unwrap(), 6); - assert_eq!(is_valid_reg_exp_literal("/👈🏻/i").unwrap(), 4); - - assert!(is_valid_reg_exp_literal("/").is_err()); - assert!(is_valid_reg_exp_literal("//").is_err()); - assert!(is_valid_reg_exp_literal("///").is_err()); - assert!(is_valid_reg_exp_literal("/*abc/").is_err()); - assert!(is_valid_reg_exp_literal("/\\/").is_err()); + fn parse_valid_reg_exp_literal() { + for literal_text in [ + "/(?:)/", + "/abc/", + "/abcd/igsmv", + r"/\w+/u", + r"/foo\/bar/i", + "/[a-z]/", + "/正規表現/u", + "/あっち👈🏻/i", + "/👈🏻こっち/u", + ] { + let (body_start_offset, body_end_offset, flag_start_offset) = + parse_reg_exp_literal(literal_text) + .unwrap_or_else(|_| panic!("{literal_text} should be parsed")); + + let body_text = &literal_text[body_start_offset..body_end_offset]; + let flag_text = &literal_text[flag_start_offset..]; + assert_eq!(format!("/{body_text}/{flag_text}",), literal_text); + } + } + + #[test] + fn parse_invalid_reg_exp_literal() { + for literal_text in ["", "foo", ":(", "a\nb", "/", "//", "///", "/*abc/", "/\\/"] { + assert!(parse_reg_exp_literal(literal_text).is_err()); + } } } diff --git a/crates/oxc_regexp_parser/src/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/mod.rs index 0a629f9cdd704..5230ed7245872 100644 --- a/crates/oxc_regexp_parser/src/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/mod.rs @@ -3,7 +3,6 @@ mod body_parser; mod flag_parser; mod literal_parser; mod options; -mod reader; mod span; pub use body_parser::PatternParser; diff --git a/crates/oxc_regexp_parser/src/parser/reader.rs b/crates/oxc_regexp_parser/src/parser/reader.rs deleted file mode 100644 index 65e131aaeafcf..0000000000000 --- a/crates/oxc_regexp_parser/src/parser/reader.rs +++ /dev/null @@ -1,165 +0,0 @@ -// pub struct Reader2<'a> { -// chars: Box + 'a>, -// } -// impl<'a> Reader2<'a> { -// pub fn new(source: &'a str, unicode_mode: bool) -> Self { -// let chars: Box> = if unicode_mode { -// Box::new(source.chars().map(|c| c as u32)) -// } else { -// #[allow(clippy::cast_lossless)] -// Box::new(source.encode_utf16().map(|c| c as u32)) -// }; - -// Self { chars } -// } -// } - -pub struct Reader<'a> { - r_impl: Box>, - pub idx: usize, - pub c1: Option, - w1: usize, - c2: Option, - w2: usize, - c3: Option, - w3: usize, - c4: Option, -} - -impl<'a> Reader<'a> { - pub fn new(source: &'a str, unicode_mode: bool) -> Self { - let mut reader = Self { - idx: 0, - c1: None, - w1: 0, - c2: None, - w2: 0, - c3: None, - w3: 0, - c4: None, - r_impl: if unicode_mode { - Box::new(UnicodeImpl::new(source)) - } else { - Box::new(LegacyImpl::new(source)) - }, - }; - reader.rewind(0); - reader - } - - pub fn rewind(&mut self, index: usize) { - self.idx = index; - self.c1 = self.r_impl.at(index); - self.w1 = self.r_impl.width(self.c1); - self.c2 = self.r_impl.at(index + self.w1); - self.w2 = self.r_impl.width(self.c2); - self.c3 = self.r_impl.at(index + self.w1 + self.w2); - self.w3 = self.r_impl.width(self.c3); - self.c4 = self.r_impl.at(index + self.w1 + self.w2 + self.w3); - } - - pub fn advance(&mut self) { - if self.c1.is_some() { - self.idx += self.w1; - self.c1 = self.c2; - self.w1 = self.w2; - self.c2 = self.c3; - self.w2 = self.r_impl.width(self.c2); - self.c3 = self.c4; - self.w3 = self.r_impl.width(self.c3); - self.c4 = self.r_impl.at(self.idx + self.w1 + self.w2 + self.w3); - } - } - - pub fn eat(&mut self, cp: char) -> bool { - if self.c1 == Some(cp) { - self.advance(); - true - } else { - false - } - } - - // pub fn eat2(&mut self, cp1: char, cp2: char) -> bool { - // if self.c1 == Some(cp1) && self.c2 == Some(cp2) { - // self.advance(); - // self.advance(); - // true - // } else { - // false - // } - // } - - // pub fn eat3(&mut self, cp1: char, cp2: char, cp3: char) -> bool { - // if self.c1 == Some(cp1) && self.c2 == Some(cp2) && self.c3 == Some(cp3) { - // self.advance(); - // self.advance(); - // self.advance(); - // true - // } else { - // false - // } - // } -} - -// NOTE: I'm not sure this implementation is required for Rust... -trait ReaderImpl<'a> { - fn at(&self, i: usize) -> Option; - fn width(&self, c: Option) -> usize; -} - -struct LegacyImpl { - chars: Vec, - end: usize, -} -/// Used when `u` or `v` flag is set -struct UnicodeImpl { - chars: Vec, - end: usize, -} - -impl LegacyImpl { - fn new(source: &str) -> Self { - #[allow(clippy::cast_lossless)] - let chars = source.encode_utf16().map(|c| c as u32).collect::>(); - let end = chars.len(); - Self { chars, end } - } -} - -impl<'a> ReaderImpl<'a> for LegacyImpl { - fn at(&self, i: usize) -> Option { - if i < self.end { - return self.chars.get(i).map(|&c| char::from_u32(c))?; - } - None - } - - fn width(&self, _c: Option) -> usize { - 1 - } -} - -impl UnicodeImpl { - fn new(source: &str) -> Self { - let chars = source.chars().map(|c| c as u32).collect::>(); - let end = chars.len(); - Self { chars, end } - } -} - -impl<'a> ReaderImpl<'a> for UnicodeImpl { - fn at(&self, i: usize) -> Option { - if i < self.end { - return self.chars.get(i).map(|&c| char::from_u32(c))?; - } - None - } - - fn width(&self, c: Option) -> usize { - match c { - Some(c) if c as u32 > 0xFFFF => 2, - _ => 1, - } - } -} From 1794de8bc188fba8be4c97d07ce7a855fb242541 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 27 Jun 2024 14:14:12 +0900 Subject: [PATCH 016/143] Fix clippy --- crates/oxc_regexp_parser/examples/parser.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 83f645bd36a73..46bd461ee2ef1 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -1,3 +1,5 @@ +#![allow(clippy::print_stdout)] + use oxc_allocator::Allocator; use oxc_regexp_parser::{ast, Parser, ParserOptions}; From 53705c78ff4ac53c741875c1413e1789bf159069 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 27 Jun 2024 14:41:52 +0900 Subject: [PATCH 017/143] Reader#eat2(), eat3() --- .../src/parser/body_parser/mod.rs | 5 +- .../src/parser/body_parser/reader.rs | 46 +++++++++++++++---- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index ac2ebb5844866..5c723d0cf8b0f 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -37,7 +37,10 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Empty")); } - self.reader.eat1('/'); + // TODO: ... + self.reader.eat1('a'); + self.reader.eat2('a', 'b'); + self.reader.eat3('a', 'b', 'c'); self.reader.rewind(0); let pattern = ast::Pattern { diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 13290d0af8f2e..5070979e3210d 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -37,7 +37,12 @@ impl<'a> Reader { pub fn peek1(&self) -> Option { self.units.get(self.index).copied() } - // TODO: peek2, peek3 + pub fn peek2(&self) -> Option { + self.units.get(self.index + 1).copied() + } + pub fn peek3(&self) -> Option { + self.units.get(self.index + 2).copied() + } pub fn eat1(&mut self, ch: char) -> bool { if self.peek1() == Some(ch as u32) { @@ -46,7 +51,26 @@ impl<'a> Reader { } false } - // TODO: eat2, eat3 + pub fn eat2(&mut self, ch: char, ch2: char) -> bool { + if self.peek1() == Some(ch as u32) && self.peek2() == Some(ch2 as u32) { + self.advance(); + self.advance(); + return true; + } + false + } + pub fn eat3(&mut self, ch: char, ch2: char, ch3: char) -> bool { + if self.peek1() == Some(ch as u32) + && self.peek2() == Some(ch2 as u32) + && self.peek3() == Some(ch3 as u32) + { + self.advance(); + self.advance(); + self.advance(); + return true; + } + false + } } #[cfg(test)] @@ -66,15 +90,16 @@ mod test { reader.advance(); assert_eq!(reader.index, 1); assert_eq!(reader.peek1(), Some('R' as u32)); + assert_eq!(reader.peek2(), Some('e' as u32)); + assert_eq!(reader.peek3(), Some('g' as u32)); assert!(reader.eat1('R')); assert!(!reader.eat1('R')); assert!(reader.eat1('e')); assert!(reader.eat1('g')); assert!(reader.eat1('E')); - assert!(!reader.eat1('E')); - assert!(reader.eat1('x')); - assert!(reader.eat1('p')); + assert!(!reader.eat3('E', 'x', 'p')); + assert!(reader.eat2('x', 'p')); let start = reader.index; assert_eq!(start, 7); @@ -99,8 +124,7 @@ mod test { let mut unicode_reader = Reader::new(source_text, true); assert!(unicode_reader.eat1('𠮷')); // Can eat - assert!(unicode_reader.eat1('野')); - assert!(unicode_reader.eat1('家')); + assert!(unicode_reader.eat2('野', '家')); let start = unicode_reader.index; assert!(unicode_reader.eat1('は')); @@ -109,6 +133,9 @@ mod test { unicode_reader.advance(); assert!(unicode_reader.eat1('あ')); + assert_eq!(unicode_reader.peek1(), Some('っ' as u32)); + assert_eq!(unicode_reader.peek2(), Some('ち' as u32)); + assert_eq!(unicode_reader.peek3(), None); unicode_reader.rewind(start); assert!(unicode_reader.eat1('は')); @@ -130,7 +157,10 @@ mod test { legacy_reader.advance(); legacy_reader.advance(); - assert!(legacy_reader.eat1('あ')); + assert_eq!(legacy_reader.peek1(), Some('あ' as u32)); + assert_eq!(legacy_reader.peek2(), Some('っ' as u32)); + assert_eq!(legacy_reader.peek3(), Some('ち' as u32)); + assert!(legacy_reader.eat3('あ', 'っ', 'ち')); legacy_reader.rewind(start); assert!(legacy_reader.eat1('は')); From ec878650cfeb72dad95cd10dcd338eb0985747f3 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 27 Jun 2024 21:52:12 +0900 Subject: [PATCH 018/143] Calculate unified span pos --- .../src/parser/body_parser/mod.rs | 4 +- .../src/parser/body_parser/reader.rs | 102 ++++++++++++++---- 2 files changed, 82 insertions(+), 24 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 5c723d0cf8b0f..7d287073ed349 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -17,7 +17,7 @@ pub struct PatternParser<'a> { allocator: &'a Allocator, source_text: &'a str, span_factory: SpanFactory, - reader: Reader, + reader: Reader<'a>, _state: ParserState, } @@ -38,10 +38,12 @@ impl<'a> PatternParser<'a> { } // TODO: ... + self.reader.position(); self.reader.eat1('a'); self.reader.eat2('a', 'b'); self.reader.eat3('a', 'b', 'c'); self.reader.rewind(0); + self.reader.position(); let pattern = ast::Pattern { span: self.span_factory.create(0, self.source_text.len()), diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 5070979e3210d..60897a5f4e143 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -1,29 +1,38 @@ -pub struct Reader { - units: Vec, - pub index: usize, +pub struct Reader<'a> { + source: &'a str, + char_indices: std::str::CharIndices<'a>, + unicode_mode: bool, + index: usize, } -impl<'a> Reader { +impl<'a> Reader<'a> { pub fn new(source: &'a str, unicode_mode: bool) -> Self { - // NOTE: Is there a better way to avoid using `Vec`? - // - To implement `peek2`, `peek3`, `Peekable` is not enough - // - To `rewind` at any point, consuming `Iter` need more efforts(e.g. cache) - let units = if unicode_mode { - source.chars().map(|c| c as u32).collect() - } else { - #[allow(clippy::cast_lossless)] - source.encode_utf16().map(|u| u as u32).collect() - }; - - Self { units, index: 0 } + Self { source, char_indices: source.char_indices(), unicode_mode, index: 0 } } - // NOTE: How to know global unicode(utf8?) `Span` position? - // - If reader is non-unicode mode, the `index` is not a valid position anymore - // - Need map or something with using `ch.len_utf8|16`? - #[allow(clippy::unused_self, dead_code)] + // NOTE: Should be decoupled from the reader...? + // ``` + // let pos = Position::new(source, unicode_mode); + // pos.get(reader.index); + // ```` pub fn position(&self) -> usize { - 0 + let mut char_indices = self.char_indices.clone(); + + if self.unicode_mode { + char_indices.nth(self.index).map_or(self.source.len(), |(i, _)| i) + } else { + let mut utf16_units = 0; + let mut byte_index = 0; + for (idx, ch) in char_indices { + if utf16_units == self.index { + return idx; + } + + utf16_units += ch.len_utf16(); + byte_index = idx + ch.len_utf8(); + } + byte_index + } } pub fn rewind(&mut self, index: usize) { @@ -34,14 +43,26 @@ impl<'a> Reader { self.index += 1; } + fn peek_nth(&self, n: usize) -> Option { + let nth = self.index + n; + + // NOTE: This may affect performance? + if self.unicode_mode { + self.source.chars().nth(nth).map(|c| c as u32) + } else { + #[allow(clippy::cast_lossless)] + self.source.encode_utf16().nth(nth).map(|u| u as u32) + } + } + pub fn peek1(&self) -> Option { - self.units.get(self.index).copied() + self.peek_nth(0) } pub fn peek2(&self) -> Option { - self.units.get(self.index + 1).copied() + self.peek_nth(1) } pub fn peek3(&self) -> Option { - self.units.get(self.index + 2).copied() + self.peek_nth(2) } pub fn eat1(&mut self, ch: char) -> bool { @@ -165,4 +186,39 @@ mod test { legacy_reader.rewind(start); assert!(legacy_reader.eat1('は')); } + + #[test] + fn test_position_basic() { + let source_text = "^ Catch😎 @ symbols🇺🇳 $"; + + let unicode_reader = Reader::new(source_text, true); + let legacy_reader = Reader::new(source_text, false); + + for mut reader in [unicode_reader, legacy_reader] { + while reader.peek1() != Some('^' as u32) { + reader.advance(); + } + let s1 = reader.position(); + assert!(reader.eat1('^')); + let e1 = reader.position(); + + while reader.peek1() != Some('@' as u32) { + reader.advance(); + } + let s2 = reader.position(); + assert!(reader.eat1('@')); + let e2 = reader.position(); + + while reader.peek1() != Some('$' as u32) { + reader.advance(); + } + let s3 = reader.position(); + assert!(reader.eat1('$')); + let e3 = reader.position(); + + assert_eq!(&source_text[s1..e1], "^"); + assert_eq!(&source_text[s2..e2], "@"); + assert_eq!(&source_text[s3..e3], "$"); + } + } } From 93d231c9c11601a12d78e261ddc79cc59d960ece Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 27 Jun 2024 22:03:00 +0900 Subject: [PATCH 019/143] Fix test name --- crates/oxc_regexp_parser/src/parser/body_parser/reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 60897a5f4e143..3902f9c92557a 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -188,7 +188,7 @@ mod test { } #[test] - fn test_position_basic() { + fn test_position() { let source_text = "^ Catch😎 @ symbols🇺🇳 $"; let unicode_reader = Reader::new(source_text, true); From 0cac2c458ffab20b94b65519987d6d4e945021da Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 28 Jun 2024 12:14:32 +0900 Subject: [PATCH 020/143] Split mod --- .../src/parser/body_parser/mod.rs | 54 +------------------ .../src/parser/body_parser/parser.rs | 52 ++++++++++++++++++ 2 files changed, 54 insertions(+), 52 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/parser.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 7d287073ed349..8ba264c8721c7 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -1,55 +1,5 @@ +mod parser; mod reader; mod state; -use oxc_allocator::{Allocator, Vec}; -use oxc_diagnostics::{OxcDiagnostic, Result}; - -use crate::{ - ast, - parser::{ - body_parser::{reader::Reader, state::ParserState}, - options::ParserOptions, - span::SpanFactory, - }, -}; - -pub struct PatternParser<'a> { - allocator: &'a Allocator, - source_text: &'a str, - span_factory: SpanFactory, - reader: Reader<'a>, - _state: ParserState, -} - -impl<'a> PatternParser<'a> { - pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { - Self { - allocator, - source_text, - span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(source_text, options.unicode_mode), - _state: ParserState, - } - } - - pub fn parse(&mut self) -> Result> { - if self.source_text.is_empty() { - return Err(OxcDiagnostic::error("Empty")); - } - - // TODO: ... - self.reader.position(); - self.reader.eat1('a'); - self.reader.eat2('a', 'b'); - self.reader.eat3('a', 'b', 'c'); - self.reader.rewind(0); - self.reader.position(); - - let pattern = ast::Pattern { - span: self.span_factory.create(0, self.source_text.len()), - alternatives: Vec::new_in(self.allocator), - }; - - Ok(pattern) - } -} +pub use parser::PatternParser; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs new file mode 100644 index 0000000000000..0bdbb57e265e3 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -0,0 +1,52 @@ +use oxc_allocator::{Allocator, Vec}; +use oxc_diagnostics::{OxcDiagnostic, Result}; + +use crate::{ + ast, + parser::{ + body_parser::{reader::Reader, state::ParserState}, + options::ParserOptions, + span::SpanFactory, + }, +}; + +pub struct PatternParser<'a> { + allocator: &'a Allocator, + source_text: &'a str, + span_factory: SpanFactory, + reader: Reader<'a>, + _state: ParserState, +} + +impl<'a> PatternParser<'a> { + pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + Self { + allocator, + source_text, + span_factory: SpanFactory::new(options.span_offset), + reader: Reader::new(source_text, options.unicode_mode), + _state: ParserState, + } + } + + pub fn parse(&mut self) -> Result> { + if self.source_text.is_empty() { + return Err(OxcDiagnostic::error("Empty")); + } + + // TODO: ... + self.reader.position(); + self.reader.eat1('a'); + self.reader.eat2('a', 'b'); + self.reader.eat3('a', 'b', 'c'); + self.reader.rewind(0); + self.reader.position(); + + let pattern = ast::Pattern { + span: self.span_factory.create(0, self.source_text.len()), + alternatives: Vec::new_in(self.allocator), + }; + + Ok(pattern) + } +} From f657cf0c18fc5675c902f0e74a295ff4efbe6057 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 28 Jun 2024 12:42:31 +0900 Subject: [PATCH 021/143] Align parsing names --- .../src/parser/body_parser/reader.rs | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 3902f9c92557a..47a0e7aac7269 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -55,7 +55,7 @@ impl<'a> Reader<'a> { } } - pub fn peek1(&self) -> Option { + pub fn peek(&self) -> Option { self.peek_nth(0) } pub fn peek2(&self) -> Option { @@ -65,15 +65,15 @@ impl<'a> Reader<'a> { self.peek_nth(2) } - pub fn eat1(&mut self, ch: char) -> bool { - if self.peek1() == Some(ch as u32) { + pub fn eat(&mut self, ch: char) -> bool { + if self.peek() == Some(ch as u32) { self.advance(); return true; } false } pub fn eat2(&mut self, ch: char, ch2: char) -> bool { - if self.peek1() == Some(ch as u32) && self.peek2() == Some(ch2 as u32) { + if self.peek() == Some(ch as u32) && self.peek2() == Some(ch2 as u32) { self.advance(); self.advance(); return true; @@ -81,7 +81,7 @@ impl<'a> Reader<'a> { false } pub fn eat3(&mut self, ch: char, ch2: char, ch3: char) -> bool { - if self.peek1() == Some(ch as u32) + if self.peek() == Some(ch as u32) && self.peek2() == Some(ch2 as u32) && self.peek3() == Some(ch3 as u32) { @@ -106,35 +106,35 @@ mod test { for mut reader in [unicode_reader, legacy_reader] { assert_eq!(reader.index, 0); - assert_eq!(reader.peek1(), Some('/' as u32)); + assert_eq!(reader.peek(), Some('/' as u32)); reader.advance(); assert_eq!(reader.index, 1); - assert_eq!(reader.peek1(), Some('R' as u32)); + assert_eq!(reader.peek(), Some('R' as u32)); assert_eq!(reader.peek2(), Some('e' as u32)); assert_eq!(reader.peek3(), Some('g' as u32)); - assert!(reader.eat1('R')); - assert!(!reader.eat1('R')); - assert!(reader.eat1('e')); - assert!(reader.eat1('g')); - assert!(reader.eat1('E')); + assert!(reader.eat('R')); + assert!(!reader.eat('R')); + assert!(reader.eat('e')); + assert!(reader.eat('g')); + assert!(reader.eat('E')); assert!(!reader.eat3('E', 'x', 'p')); assert!(reader.eat2('x', 'p')); let start = reader.index; assert_eq!(start, 7); - assert_eq!(reader.peek1(), Some('✨' as u32)); + assert_eq!(reader.peek(), Some('✨' as u32)); reader.advance(); reader.advance(); - assert_eq!(reader.peek1(), Some('i' as u32)); + assert_eq!(reader.peek(), Some('i' as u32)); reader.advance(); - assert_eq!(reader.peek1(), None); + assert_eq!(reader.peek(), None); reader.rewind(start); - assert_eq!(reader.peek1(), Some('✨' as u32)); + assert_eq!(reader.peek(), Some('✨' as u32)); } } @@ -144,47 +144,47 @@ mod test { let mut unicode_reader = Reader::new(source_text, true); - assert!(unicode_reader.eat1('𠮷')); // Can eat + assert!(unicode_reader.eat('𠮷')); // Can eat assert!(unicode_reader.eat2('野', '家')); let start = unicode_reader.index; - assert!(unicode_reader.eat1('は')); + assert!(unicode_reader.eat('は')); // Emoji + Skin tone unicode_reader.advance(); unicode_reader.advance(); - assert!(unicode_reader.eat1('あ')); - assert_eq!(unicode_reader.peek1(), Some('っ' as u32)); + assert!(unicode_reader.eat('あ')); + assert_eq!(unicode_reader.peek(), Some('っ' as u32)); assert_eq!(unicode_reader.peek2(), Some('ち' as u32)); assert_eq!(unicode_reader.peek3(), None); unicode_reader.rewind(start); - assert!(unicode_reader.eat1('は')); + assert!(unicode_reader.eat('は')); let mut legacy_reader = Reader::new(source_text, false); - assert!(!legacy_reader.eat1('𠮷')); // Can not eat + assert!(!legacy_reader.eat('𠮷')); // Can not eat legacy_reader.advance(); - assert!(!legacy_reader.eat1('𠮷')); // Also can not + assert!(!legacy_reader.eat('𠮷')); // Also can not legacy_reader.advance(); - assert!(legacy_reader.eat1('野')); - assert!(legacy_reader.eat1('家')); + assert!(legacy_reader.eat('野')); + assert!(legacy_reader.eat('家')); let start = unicode_reader.index; - assert!(legacy_reader.eat1('は')); + assert!(legacy_reader.eat('は')); legacy_reader.advance(); legacy_reader.advance(); legacy_reader.advance(); legacy_reader.advance(); - assert_eq!(legacy_reader.peek1(), Some('あ' as u32)); + assert_eq!(legacy_reader.peek(), Some('あ' as u32)); assert_eq!(legacy_reader.peek2(), Some('っ' as u32)); assert_eq!(legacy_reader.peek3(), Some('ち' as u32)); assert!(legacy_reader.eat3('あ', 'っ', 'ち')); legacy_reader.rewind(start); - assert!(legacy_reader.eat1('は')); + assert!(legacy_reader.eat('は')); } #[test] @@ -195,25 +195,25 @@ mod test { let legacy_reader = Reader::new(source_text, false); for mut reader in [unicode_reader, legacy_reader] { - while reader.peek1() != Some('^' as u32) { + while reader.peek() != Some('^' as u32) { reader.advance(); } let s1 = reader.position(); - assert!(reader.eat1('^')); + assert!(reader.eat('^')); let e1 = reader.position(); - while reader.peek1() != Some('@' as u32) { + while reader.peek() != Some('@' as u32) { reader.advance(); } let s2 = reader.position(); - assert!(reader.eat1('@')); + assert!(reader.eat('@')); let e2 = reader.position(); - while reader.peek1() != Some('$' as u32) { + while reader.peek() != Some('$' as u32) { reader.advance(); } let s3 = reader.position(); - assert!(reader.eat1('$')); + assert!(reader.eat('$')); let e3 = reader.position(); assert_eq!(&source_text[s1..e1], "^"); From 3c9bb6108c71ea0ff20a0c2d126079c9ae9aa61d Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Sat, 29 Jun 2024 09:41:41 +0900 Subject: [PATCH 022/143] Make very minimum pattern pass --- Cargo.lock | 1 - crates/oxc_regexp_parser/Cargo.toml | 1 - crates/oxc_regexp_parser/src/ast.rs | 2 +- .../src/parser/body_parser/mod.rs | 1 + .../src/parser/body_parser/parser.rs | 231 +++++++++++++++++- .../src/parser/body_parser/unicode.rs | 9 + .../src/parser/literal_parser.rs | 8 +- 7 files changed, 233 insertions(+), 20 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs diff --git a/Cargo.lock b/Cargo.lock index 69f52cb83fb33..ab2bd53fb1284 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1659,7 +1659,6 @@ dependencies = [ "oxc_allocator", "oxc_diagnostics", "oxc_span", - "oxc_syntax", "rustc-hash", ] diff --git a/crates/oxc_regexp_parser/Cargo.toml b/crates/oxc_regexp_parser/Cargo.toml index ea71ef973c9d8..e3f28cde517a5 100644 --- a/crates/oxc_regexp_parser/Cargo.toml +++ b/crates/oxc_regexp_parser/Cargo.toml @@ -22,7 +22,6 @@ doctest = false [dependencies] oxc_allocator = { workspace = true } oxc_diagnostics = { workspace = true } -oxc_syntax = { workspace = true } oxc_span = { workspace = true } rustc-hash = { workspace = true } diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 33d3a9e6adddb..d4b7c90d3fef3 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -147,7 +147,7 @@ pub struct CapturingGroup<'a> { #[derive(Debug)] pub struct Character { pub span: Span, - pub value: char, + pub value: u32, } /// The character class. diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 8ba264c8721c7..2a63480bd746d 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -1,5 +1,6 @@ mod parser; mod reader; mod state; +mod unicode; pub use parser::PatternParser; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 0bdbb57e265e3..29a4516af8a2c 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -1,10 +1,10 @@ -use oxc_allocator::{Allocator, Vec}; +use oxc_allocator::{Allocator, Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, parser::{ - body_parser::{reader::Reader, state::ParserState}, + body_parser::{reader::Reader, state::ParserState, unicode}, options::ParserOptions, span::SpanFactory, }, @@ -34,19 +34,230 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Empty")); } - // TODO: ... - self.reader.position(); - self.reader.eat1('a'); + // TODO: Remove later, just for clippy unused self.reader.eat2('a', 'b'); self.reader.eat3('a', 'b', 'c'); self.reader.rewind(0); - self.reader.position(); - let pattern = ast::Pattern { - span: self.span_factory.create(0, self.source_text.len()), - alternatives: Vec::new_in(self.allocator), - }; + self.consume_pattern() + } + + // ``` + // Pattern[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + // + fn consume_pattern(&mut self) -> Result> { + let start = self.reader.position(); + // TODO: Read only constants + // this._numCapturingParens = this.countCapturingParens(); + // TODO: Define state, used later somewhere + // this._groupSpecifiers.clear(); + // TODO: Define state, used later here + // this._backreferenceNames.clear(); + + // TODO: Maybe useless? + // this.onPatternEnter(start); + let alternatives = self.consume_disjunction()?; + + if self.reader.peek().is_some() { + if self.reader.eat(')') { + return Err(OxcDiagnostic::error("Unmatched ')'")); + } + if self.reader.eat('\\') { + return Err(OxcDiagnostic::error("'\\' at end of pattern")); + } + if self.reader.eat(']') || self.reader.eat('}') { + return Err(OxcDiagnostic::error("Lone quantifier brackets")); + } + return Err(OxcDiagnostic::error("Unexpected character")); + } + + // TODO: Implement + // for (const name of this._backreferenceNames) { + // if (!this._groupSpecifiers.hasInPattern(name)) { + // this.raise("Invalid named capture referenced"); + // } + // } + + let end = self.reader.position(); + let pattern = ast::Pattern { span: self.span_factory.create(start, end), alternatives }; + + // TODO: Implement + // this.onPatternLeave(start, this.index); Ok(pattern) } + + // ``` + // Disjunction[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + // + fn consume_disjunction(&mut self) -> Result>> { + let mut alternatives = Vec::new_in(self.allocator); + + // TODO: Implement + // this._groupSpecifiers.enterDisjunction(); + + let mut i: usize = 0; + loop { + alternatives.push(self.consume_alternative(i)?); + i += 1; + + if !self.reader.eat('|') { + break; + } + } + + // TODO: Implement + // if (this.consumeQuantifier(true)) { + // this.raise("Nothing to repeat"); + // } + if self.reader.eat('{') { + return Err(OxcDiagnostic::error("Lone quantifier brackets")); + } + + // TODO: Implement + // this._groupSpecifiers.leaveDisjunction(); + + Ok(alternatives) + } + + // ``` + // Alternative[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // [empty] + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + // + fn consume_alternative(&mut self, _i: usize) -> Result> { + let start = self.reader.position(); + + // TODO: Implement + // this._groupSpecifiers.enterAlternative(i); + + let mut elements = Vec::new_in(self.allocator); + loop { + if self.reader.peek().is_none() { + break; + } + let Some(term) = self.consume_term() else { + break; + }; + elements.push(term); + } + + let end = self.reader.position(); + let alternative = ast::Alternative { span: self.span_factory.create(start, end), elements }; + + Ok(alternative) + } + + // ``` + // Term[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Assertion[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier + // ``` + // + fn consume_term(&mut self) -> Option> { + // TODO: Implement + // let assertion = self.consume_assertion(); + // if assertion.is_some() { + // return assertion; + // } + + match (self.consume_atom(), self.consume_quantifier()) { + (Some(atom), None) => { + Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator))) + } + (Some(atom), Some(quantifier)) => { + return Some(ast::Element::Quantifier(Box::new_in( + ast::Quantifier { + span: self.span_factory.create(0, 0), // TODO: Merge atom.start, quantifier.end + min: quantifier.min, + max: quantifier.max, + greedy: quantifier.greedy, + element: atom, + }, + self.allocator, + ))); + } + _ => None, + } + } + + // SAVEPOINT: dot or pattern character + fn consume_atom(&mut self) -> Option> { + if let Some(character) = self.consume_pattern_character() { + return Some(ast::QuantifiableElement::Character(Box::new_in( + character, + self.allocator, + ))); + } + // TODO: Implement + // return ( + // this.consumePatternCharacter() || + // this.consumeDot() || + // this.consumeReverseSolidusAtomEscape() || + // Boolean(this.consumeCharacterClass()) || + // this.consumeUncapturingGroup() || + // this.consumeCapturingGroup() + // ); + None + } + + // TODO: Not a `Quantifier` itself, just a stuff for it + fn consume_quantifier(&mut self) -> Option> { + // TODO: Implement + // const start = this.index; + // let min = 0; + // let max = 0; + // let greedy = false; + + // // QuantifierPrefix + // if (this.eat(ASTERISK)) { + // min = 0; + // max = Number.POSITIVE_INFINITY; + // } else if (this.eat(PLUS_SIGN)) { + // min = 1; + // max = Number.POSITIVE_INFINITY; + // } else if (this.eat(QUESTION_MARK)) { + // min = 0; + // max = 1; + // } else if (this.eatBracedQuantifier(noConsume)) { + // ({ min, max } = this._lastRange); + // } else { + // return false; + // } + + // // `?` + // greedy = !this.eat(QUESTION_MARK); + + // if (!noConsume) { + // this.onQuantifier(start, this.index, min, max, greedy); + // } + // return true; + + None + } + + // TODO: Comment + fn consume_pattern_character(&mut self) -> Option { + let start = self.reader.position(); + + if let Some(cp) = self.reader.peek() { + if !unicode::is_syntax_character(cp) { + self.reader.advance(); + + return Some(ast::Character { + span: self.span_factory.create(start, self.reader.position()), + value: cp, + }); + } + } + + None + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs new file mode 100644 index 0000000000000..a2b5206e178da --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -0,0 +1,9 @@ +/// `^`, `$`, `\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`, `|` +pub fn is_syntax_character(c: u32) -> bool { + char::from_u32(c).map_or(false, |c| { + matches!( + c, + '^' | '$' | '\\' | '.' | '*' | '+' | '?' | '(' | ')' | '[' | ']' | '{' | '}' | '|' + ) + }) +} diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index d1c7644f1c302..c1bfa03010b7d 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -1,6 +1,5 @@ use oxc_allocator::Allocator; use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_syntax::identifier::is_line_terminator; use crate::{ ast, @@ -85,12 +84,7 @@ fn parse_reg_exp_literal(source_text: &str) -> Result<(usize, usize, usize)> { let mut in_character_class = false; loop { match chars.peek() { - None => { - let kind = - if in_character_class { "character class" } else { "regular expression" }; - return Err(OxcDiagnostic::error(format!("Unterminated {kind}"))); - } - Some(&ch) if is_line_terminator(ch) => { + Some('\u{a}' | '\u{d}' | '\u{2028}' | '\u{2029}') | None => { let kind = if in_character_class { "character class" } else { "regular expression" }; return Err(OxcDiagnostic::error(format!("Unterminated {kind}"))); From 98eb95152c19b5079abf9d8bdd1db59ae7bcdc76 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 10:09:22 +0900 Subject: [PATCH 023/143] Fix --- .../src/parser/body_parser/parser.rs | 94 ++++++++++++------- .../src/parser/body_parser/unicode.rs | 1 - 2 files changed, 62 insertions(+), 33 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 29a4516af8a2c..378669055c7b7 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -51,9 +51,9 @@ impl<'a> PatternParser<'a> { let start = self.reader.position(); // TODO: Read only constants // this._numCapturingParens = this.countCapturingParens(); - // TODO: Define state, used later somewhere + // TODO: Define state, use later somewhere // this._groupSpecifiers.clear(); - // TODO: Define state, used later here + // TODO: Define state, use later here // this._backreferenceNames.clear(); // TODO: Maybe useless? @@ -80,8 +80,10 @@ impl<'a> PatternParser<'a> { // } // } - let end = self.reader.position(); - let pattern = ast::Pattern { span: self.span_factory.create(start, end), alternatives }; + let pattern = ast::Pattern { + span: self.span_factory.create(start, self.reader.position()), + alternatives, + }; // TODO: Implement // this.onPatternLeave(start, this.index); @@ -104,11 +106,12 @@ impl<'a> PatternParser<'a> { let mut i: usize = 0; loop { alternatives.push(self.consume_alternative(i)?); - i += 1; if !self.reader.eat('|') { break; } + + i += 1; } // TODO: Implement @@ -142,16 +145,16 @@ impl<'a> PatternParser<'a> { if self.reader.peek().is_none() { break; } - let Some(term) = self.consume_term() else { + let Some(term) = self.consume_term()? else { break; }; elements.push(term); } - let end = self.reader.position(); - let alternative = ast::Alternative { span: self.span_factory.create(start, end), elements }; - - Ok(alternative) + Ok(ast::Alternative { + span: self.span_factory.create(start, self.reader.position()), + elements, + }) } // ``` @@ -161,19 +164,17 @@ impl<'a> PatternParser<'a> { // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier // ``` // - fn consume_term(&mut self) -> Option> { - // TODO: Implement - // let assertion = self.consume_assertion(); - // if assertion.is_some() { - // return assertion; - // } + fn consume_term(&mut self) -> Result>> { + if let Some(assertion) = self.consume_assertion()? { + return Ok(Some(ast::Element::Assertion(Box::new_in(assertion, self.allocator)))); + } - match (self.consume_atom(), self.consume_quantifier()) { + match (self.consume_atom()?, self.consume_quantifier()) { (Some(atom), None) => { - Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator))) + Ok(Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator)))) } (Some(atom), Some(quantifier)) => { - return Some(ast::Element::Quantifier(Box::new_in( + return Ok(Some(ast::Element::Quantifier(Box::new_in( ast::Quantifier { span: self.span_factory.create(0, 0), // TODO: Merge atom.start, quantifier.end min: quantifier.min, @@ -182,20 +183,32 @@ impl<'a> PatternParser<'a> { element: atom, }, self.allocator, - ))); + )))); } - _ => None, + _ => Ok(None), } } - // SAVEPOINT: dot or pattern character - fn consume_atom(&mut self) -> Option> { - if let Some(character) = self.consume_pattern_character() { - return Some(ast::QuantifiableElement::Character(Box::new_in( - character, - self.allocator, - ))); + // TODO: Implement + fn consume_assertion(&mut self) -> Result>> { + if self.reader.eat('👻') { + return Err(OxcDiagnostic::error("TODO")); } + + Ok(None) + } + + // ``` + // Atom[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // PatternCharacter + // . + // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] + // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] + // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ``` + // + fn consume_atom(&mut self) -> Result>> { // TODO: Implement // return ( // this.consumePatternCharacter() || @@ -205,13 +218,26 @@ impl<'a> PatternParser<'a> { // this.consumeUncapturingGroup() || // this.consumeCapturingGroup() // ); - None + if let Some(character) = self.consume_pattern_character() { + return Ok(Some(ast::QuantifiableElement::Character(Box::new_in( + character, + self.allocator, + )))); + } + + // 🧊: dot, or circular + + if self.reader.eat('👻') { + return Err(OxcDiagnostic::error("TODO")); + } + + Ok(None) } - // TODO: Not a `Quantifier` itself, just a stuff for it + // TODO: Not a `Quantifier` itself, I want `(min, max, greedy, span)` fn consume_quantifier(&mut self) -> Option> { // TODO: Implement - // const start = this.index; + let _start = self.reader.position(); // let min = 0; // let max = 0; // let greedy = false; @@ -243,7 +269,11 @@ impl<'a> PatternParser<'a> { None } - // TODO: Comment + // ``` + // PatternCharacter :: + // SourceCharacter but not SyntaxCharacter + // ``` + // fn consume_pattern_character(&mut self) -> Option { let start = self.reader.position(); diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index a2b5206e178da..657a6befdc8a3 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -1,4 +1,3 @@ -/// `^`, `$`, `\`, `.`, `*`, `+`, `?`, `(`, `)`, `[`, `]`, `{`, `}`, `|` pub fn is_syntax_character(c: u32) -> bool { char::from_u32(c).map_or(false, |c| { matches!( From caa9526cf3161484b747cd14aec77dfc9eb88927 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 10:14:25 +0900 Subject: [PATCH 024/143] Remove refs --- crates/oxc_regexp_parser/_oxc_js_regex/ast.rs | 391 ---- .../_oxc_js_regex/ast_builder.rs | 73 - .../_oxc_js_regex/ast_kind.rs | 25 - .../_oxc_js_regex/ecma_version.rs | 22 - crates/oxc_regexp_parser/_oxc_js_regex/lib.rs | 6 - .../oxc_regexp_parser/_oxc_js_regex/parser.rs | 1604 ----------------- .../oxc_regexp_parser/_oxc_js_regex/util.rs | 84 - 7 files changed, 2205 deletions(-) delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ast.rs delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/lib.rs delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/parser.rs delete mode 100644 crates/oxc_regexp_parser/_oxc_js_regex/util.rs diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ast.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ast.rs deleted file mode 100644 index f4e5900b8da32..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/ast.rs +++ /dev/null @@ -1,391 +0,0 @@ -//! [`@eslint-community/regexpp`](https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/ast.ts) - -use oxc_allocator::{Box, Vec}; -use oxc_span::{Atom, Span}; - -use crate::ast_kind::AstKind; - -/// The type which includes all nodes. -#[derive(Debug)] -pub enum Node<'a> { - Branch(Box<'a, Branch<'a>>), - Leaf(Box<'a, Leaf<'a>>), -} - -/// The type which includes all branch nodes. -#[derive(Debug)] -pub enum Branch<'a> { - Alternative(Box<'a, Alternative<'a>>), - CapturingGroup(Box<'a, CapturingGroup<'a>>), - CharacterClass(Box<'a, CharacterClass<'a>>), - CharacterClassRange(Box<'a, CharacterClassRange>), - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - Group(Box<'a, Group<'a>>), - LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), - Pattern(Box<'a, Pattern<'a>>), - Quantifier(Box<'a, Quantifier<'a>>), - RegExpLiteral(Box<'a, RegExpLiteral<'a>>), - StringAlternative(Box<'a, StringAlternative<'a>>), -} - -/// The type which includes all leaf nodes. -#[derive(Debug)] -pub enum Leaf<'a> { - Backreference(Box<'a, Backreference<'a>>), - BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), - Character(Box<'a, Character>), - CharacterSet(Box<'a, CharacterSet<'a>>), - Flags(Box<'a, Flags>), -} - -/// The type which includes all atom nodes. -#[derive(Debug)] -pub enum Element<'a> { - Assertion(Assertion<'a>), - QuantifiableElement(QuantifiableElement<'a>), - Quantifier(Box<'a, Quantifier<'a>>), -} - -/// The type which includes all atom nodes that Quantifier node can have as children. -#[derive(Debug)] -pub enum QuantifiableElement<'a> { - Backreference(Backreference<'a>), - CapturingGroup(CapturingGroup<'a>), - Character(Character), - CharacterClass(CharacterClass<'a>), - CharacterSet(CharacterSet<'a>), - ExpressionCharacterClass(ExpressionCharacterClass<'a>), - Group(Group<'a>), - LookaheadAssertion(LookaheadAssertion<'a>), -} - -/// The type which includes all character class atom nodes. -#[derive(Debug)] -pub enum CharacterClassElement<'a> { - ClassRangesCharacterClassElement(ClassRangesCharacterClassElement), - UnicodeSetsCharacterClassElement(UnicodeSetsCharacterClassElement<'a>), -} -#[derive(Debug)] -pub enum ClassRangesCharacterClassElement { - Character(Character), - CharacterClassRange(CharacterClassRange), - CharacterUnicodePropertyCharacterSet(CharacterUnicodePropertyCharacterSet), - EscapeCharacterSet(EscapeCharacterSet), -} -#[derive(Debug)] -pub enum UnicodeSetsCharacterClassElement<'a> { - Character(Character), - CharacterClassRange(CharacterClassRange), - ClassStringDisjunction(ClassStringDisjunction<'a>), - EscapeCharacterSet(EscapeCharacterSet), - ExpressionCharacterClass(ExpressionCharacterClass<'a>), - UnicodePropertyCharacterSet(UnicodePropertyCharacterSet<'a>), - UnicodeSetsCharacterClass(UnicodeSetsCharacterClass<'a>), -} - -/// The root node. -#[derive(Debug)] -pub struct RegExpLiteral<'a> { - pub span: Span, - pub pattern: Pattern<'a>, - pub flags: Flags, -} - -/// The pattern. -#[derive(Debug)] -pub struct Pattern<'a> { - pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The alternative. -/// E.g. `a|b` -#[derive(Debug)] -pub struct Alternative<'a> { - pub span: Span, - pub elements: Vec<'a, Element<'a>>, -} - -/// The uncapturing group. -/// E.g. `(?:ab)` -#[derive(Debug)] -pub struct Group<'a> { - pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The capturing group. -/// E.g. `(ab)`, `(?ab)` -#[derive(Debug, Default)] -pub struct CapturingGroup<'a> { - pub span: Span, - pub name: Option, - pub alternatives: Vec<'a, Alternative<'a>>, - pub references: Vec<'a, Backreference<'a>>, -} - -/// The lookaround assertion. -#[derive(Debug)] -pub enum LookaroundAssertion<'a> { - LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), - LookbehindAssertion(Box<'a, LookbehindAssertion<'a>>), -} - -/// The lookahead assertion. -/// E.g. `(?=ab)`, `(?!ab)` -#[derive(Debug)] -pub struct LookaheadAssertion<'a> { - pub span: Span, - pub negate: bool, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The lookbehind assertion. -/// E.g. `(?<=ab)`, `(? { - pub span: Span, - pub negate: bool, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The quantifier. -/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` -#[derive(Debug)] -pub struct Quantifier<'a> { - pub span: Span, - /// https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/validator.ts#L384-L398 - /// both `min` and `max` are integer - pub min: usize, - pub max: usize, - pub greedy: bool, - pub element: QuantifiableElement<'a>, -} - -/// The character class. -/// E.g. `[ab]`, `[^ab]` -#[derive(Debug)] -pub enum CharacterClass<'a> { - ClassRangesCharacterClass(Box<'a, ClassRangesCharacterClass<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), -} - -/// The character class used in legacy (neither `u` nor `v` flag) and Unicode mode (`u` flag). -/// This character class is guaranteed to **not** contain strings. -/// In Unicode sets mode (`v` flag), {@link UnicodeSetsCharacterClass} is used. -#[derive(Debug)] -pub struct ClassRangesCharacterClass<'a> { - pub span: Span, - pub unicode_sets: bool, - pub elements: Vec<'a, ClassRangesCharacterClassElement>, -} - -/// The character class used in Unicode sets mode (`v` flag). -/// This character class may contain strings. -#[derive(Debug)] -pub struct UnicodeSetsCharacterClass<'a> { - pub span: Span, - pub elements: Vec<'a, UnicodeSetsCharacterClassElement<'a>>, -} - -/// The character class. -/// E.g. `[a-b]` -#[derive(Debug)] -pub struct CharacterClassRange { - pub span: Span, - pub min: Character, - pub max: Character, -} - -/// The assertion. -#[derive(Debug)] -pub enum Assertion<'a> { - BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), - LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), -} - -/// The boundary assertion. -#[derive(Debug)] -pub enum BoundaryAssertion<'a> { - EdgeAssertion(Box<'a, EdgeAssertion>), - WordBoundaryAssertion(Box<'a, WordBoundaryAssertion>), -} - -/// The edge boundary assertion. -/// E.g. `^`, `$` -#[derive(Debug)] -pub struct EdgeAssertion { - pub span: Span, - pub kind: EdgeAssertionKind, -} - -#[derive(Debug)] -pub enum EdgeAssertionKind { - Start, - End, -} - -/// The word boundary assertion. -/// E.g. `\b`, `\B` -#[derive(Debug)] -pub struct WordBoundaryAssertion { - pub span: Span, - pub negate: bool, -} - -/// The character set. -#[derive(Debug)] -pub enum CharacterSet<'a> { - AnyCharacterSet, - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), -} - -/// The character class escape. -/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` -#[derive(Debug)] -pub struct EscapeCharacterSet { - pub span: Span, - pub kind: EscapeCharacterSetKind, - pub negate: bool, -} - -#[derive(Debug)] -pub enum EscapeCharacterSetKind { - Digit, - Space, - Word, -} - -/// The unicode property escape. -/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` -#[derive(Debug)] -pub enum UnicodePropertyCharacterSet<'a> { - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet>), - StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet>), -} - -#[derive(Debug)] -pub struct CharacterUnicodePropertyCharacterSet { - pub span: Span, - pub key: Atom, - pub value: Option, - pub negate: bool, -} - -/// StringsUnicodePropertyCharacterSet is Unicode property escape with property of strings. -#[derive(Debug)] -pub struct StringsUnicodePropertyCharacterSet { - pub span: Span, - pub key: Atom, -} - -/// The expression character class. -/// E.g. `[a--b]`, `[a&&b]`,`[^a--b]`, `[^a&&b]` -#[derive(Debug)] -pub struct ExpressionCharacterClass<'a> { - pub span: Span, - pub negate: bool, - pub expression: ExpressionCharacterClassExpr<'a>, -} - -#[derive(Debug)] -pub enum ExpressionCharacterClassExpr<'a> { - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), -} - -#[derive(Debug)] -pub enum ClassSetOperand<'a> { - Character(Box<'a, Character>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), -} - -/// The character class intersection. -/// E.g. `a&&b` -#[derive(Debug)] -pub struct ClassIntersection<'a> { - pub span: Span, - pub left: ClassIntersectionLeft<'a>, - pub right: ClassSetOperand<'a>, -} - -#[derive(Debug)] -pub enum ClassIntersectionLeft<'a> { - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSetOperand(Box<'a, ClassSetOperand<'a>>), -} - -/// The character class subtraction. -/// E.g. `a--b` -#[derive(Debug)] -pub struct ClassSubtraction<'a> { - pub span: Span, - pub left: ClassSubtractionLeft<'a>, - pub right: ClassSetOperand<'a>, -} - -#[derive(Debug)] -pub enum ClassSubtractionLeft<'a> { - ClassSetOperand(Box<'a, ClassSetOperand<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), -} - -/// The character class string disjunction. -/// E.g. `\q{a|b}` -#[derive(Debug)] -pub struct ClassStringDisjunction<'a> { - pub span: Span, - pub alternatives: Vec<'a, StringAlternative<'a>>, -} - -/// StringAlternative is only used for `\q{alt}`({@link ClassStringDisjunction}). -#[derive(Debug)] -pub struct StringAlternative<'a> { - pub span: Span, - pub elements: Vec<'a, Character>, -} - -/// This includes escape sequences which mean a character. -/// E.g. `a`, `あ`, `✿`, `\x65`, `\u0065`, `\u{65}`, `\/` -#[derive(Debug)] -pub struct Character { - pub span: Span, - pub value: char, // UTF-16 code point -} - -#[derive(Debug)] -pub enum BackreferenceRef { - Number(i32), - Atom(Atom), -} - -/// The backreference. -/// E.g. `\1`, `\k` -#[derive(Debug)] -pub struct Backreference<'a> { - pub span: Span, - pub reference: BackreferenceRef, - pub resolved: CapturingGroup<'a>, -} - -/// The flags. -#[derive(Debug)] -pub struct Flags { - pub span: Span, - pub dot_all: bool, - pub global: bool, - pub has_indices: bool, - pub ignore_case: bool, - pub multiline: bool, - pub sticky: bool, - pub unicode: bool, - pub unicode_sets: bool, -} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs deleted file mode 100644 index c94434cdf8a06..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/ast_builder.rs +++ /dev/null @@ -1,73 +0,0 @@ -use oxc_allocator::{Allocator, Box, String, Vec}; -use oxc_span::{Atom, GetSpan, SourceType, Span}; - -#[allow(clippy::wildcard_imports)] -use crate::ast::*; - -/// AST builder for creating AST nodes -pub struct AstBuilder<'a> { - pub allocator: &'a Allocator, -} - -impl<'a> AstBuilder<'a> { - pub fn new(allocator: &'a Allocator) -> Self { - Self { allocator } - } - - #[inline] - pub fn alloc(&self, value: T) -> Box<'a, T> { - Box(self.allocator.alloc(value)) - } - - #[inline] - pub fn new_vec(&self) -> Vec<'a, T> { - Vec::new_in(self.allocator) - } - - #[inline] - pub fn new_vec_with_capacity(&self, capacity: usize) -> Vec<'a, T> { - Vec::with_capacity_in(capacity, self.allocator) - } - - #[inline] - pub fn new_vec_single(&self, value: T) -> Vec<'a, T> { - let mut vec = self.new_vec_with_capacity(1); - vec.push(value); - vec - } - - #[inline] - pub fn new_str(&self, value: &str) -> &'a str { - String::from_str_in(value, self.allocator).into_bump_str() - } - - pub fn copy(&self, src: &T) -> T { - // SAFETY: - // This should be safe as long as `src` is an reference from the allocator. - // But honestly, I'm not really sure if this is safe. - unsafe { std::mem::transmute_copy(src) } - } - - pub fn alternative(&mut self, span: Span, elements: Vec<'a, Element<'a>>) -> Branch<'a> { - Branch::Alternative(self.alloc(Alternative { span, elements })) - } - - pub fn capturing_group( - &mut self, - span: Span, - name: Option, - alternatives: Vec<'a, Alternative<'a>>, - references: Vec<'a, Backreference<'a>>, - ) -> Branch<'a> { - Branch::CapturingGroup(self.alloc(CapturingGroup { span, name, alternatives, references })) - } - - pub fn reg_exp_literal( - &mut self, - span: Span, - flags: Flags, - pattern: Pattern<'a>, - ) -> RegExpLiteral<'a> { - RegExpLiteral { span, pattern, flags } - } -} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs deleted file mode 100644 index 97eb10619a408..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/ast_kind.rs +++ /dev/null @@ -1,25 +0,0 @@ -use super::ast::*; - -#[allow(unused)] -#[derive(Debug)] -pub enum AstKind<'a> { - Alternative(&'a Alternative<'a>), - CapturingGroup(&'a CapturingGroup<'a>), - CharacterClass(&'a CharacterClass<'a>), - CharacterClassRange(&'a CharacterClassRange), - ClassIntersection(&'a ClassIntersection<'a>), - ClassStringDisjunction(&'a ClassStringDisjunction<'a>), - ClassSubtraction(&'a ClassSubtraction<'a>), - ExpressionCharacterClass(&'a ExpressionCharacterClass<'a>), - Group(&'a Group<'a>), - LookaroundAssertion(&'a LookaroundAssertion<'a>), - Pattern(&'a Pattern<'a>), - Quantifier(&'a Quantifier<'a>), - RegExpLiteral(&'a RegExpLiteral<'a>), - StringAlternative(&'a StringAlternative<'a>), - Backreference(&'a Backreference<'a>), - BoundaryAssertion(&'a BoundaryAssertion<'a>), - Character(&'a Character), - CharacterSet(&'a CharacterSet<'a>), - Flags(&'a Flags), -} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs b/crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs deleted file mode 100644 index f71e61cd125d7..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/ecma_version.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[allow(unused)] -#[derive(Clone, Copy, PartialEq, PartialOrd, Default)] -pub enum EcmaVersion { - #[default] - V5, - V2015, - V2016, - V2017, - V2018, - V2019, - V2020, - V2021, - V2022, - V2023, - V2024, -} -#[allow(unused)] -impl EcmaVersion { - pub fn latest_ecma_version() -> Self { - Self::V2024 - } -} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/lib.rs b/crates/oxc_regexp_parser/_oxc_js_regex/lib.rs deleted file mode 100644 index d66fd1312c7da..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod ast; -mod ast_builder; -mod ast_kind; -mod ecma_version; -pub mod parser; -mod util; diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs b/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs deleted file mode 100644 index 05177acfe790e..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/parser.rs +++ /dev/null @@ -1,1604 +0,0 @@ -use std::collections::{HashSet, VecDeque}; -use std::iter::Peekable; -use std::ops::Range; -use std::os::unix::fs::OpenOptionsExt; -use std::panic; -use std::str::{CharIndices, Chars, Matches}; - -use oxc_diagnostics::Error; -use oxc_span::Span; -use oxc_syntax::identifier::is_identifier_part; -use oxc_syntax::unicode_id_start::is_id_continue; - -use crate::ast::{ - Alternative, Assertion, Backreference, BackreferenceRef, BoundaryAssertion, Branch, - CapturingGroup, Character, CharacterClass, ClassStringDisjunction, EdgeAssertion, - EdgeAssertionKind, Element, LookaheadAssertion, LookaroundAssertion, LookbehindAssertion, - Pattern, QuantifiableElement, Quantifier, RegExpLiteral, StringAlternative, - WordBoundaryAssertion, -}; -use crate::ast_builder::AstBuilder; -use crate::ecma_version::EcmaVersion; -use crate::util::{ - combine_surrogate_pair, is_class_set_reserved_double_punctuator_character, - is_class_set_reserved_punctuator, is_class_set_syntax_character, is_lead_surrogate, - is_syntax_character, is_trail_surrogate, -}; - -pub struct Lexer<'a> { - source: &'a str, - /// Regex usually, use a collected `Vec` could reduce lookahead and other util function implementation complexity - chars: Vec, - - pub(crate) errors: Vec, -} - -#[allow(clippy::unused_self)] -impl<'a> Lexer<'a> { - pub fn new(source: &'a str) -> Self { - Self { source, errors: vec![], chars: source.chars().collect::>() } - } -} - -pub struct Parser<'a> { - lexer: Lexer<'a>, - builder: AstBuilder<'a>, - - /// Source Code - source_text: &'a str, - - /// All syntax errors from parser and lexer - /// Note: favor adding to `Diagnostics` instead of raising Err - errors: Vec, - context: ParserContext, - index: usize, - group_names: HashSet, - num_capturing_parens: usize, - last_int_value: u32, - back_reference_names: HashSet, - last_assertion_is_quantifiable: bool, - last_range: Range, - last_str_value: String, -} - -#[derive(Default, Copy, Clone)] -struct ParserContext { - source_kind: SourceKind, - unicode_mode: bool, - nflag: bool, - unicode_sets_mode: bool, - ecma_version: EcmaVersion, - strict: bool, -} - -impl<'a> Parser<'a> { - /// Create a new parser - pub fn new(allocator: &'a oxc_allocator::Allocator, source_text: &'a str) -> Self { - Self { - lexer: Lexer::new(source_text), - source_text, - errors: vec![], - context: ParserContext::default(), - index: 0, - group_names: HashSet::new(), - num_capturing_parens: 0, - back_reference_names: HashSet::new(), - last_int_value: 0, - last_range: 0..0, - last_assertion_is_quantifiable: false, - builder: AstBuilder::new(allocator), - last_str_value: String::default(), - } - } - - pub fn is(&self, ch: char) -> bool { - self.lexer.chars.get(self.index) == Some(&ch) - } - - pub fn eat(&mut self, ch: char) -> bool { - if self.is(ch) { - self.index += 1; - true - } else { - false - } - } - pub fn span_with_start(&self, start: u32) -> Span { - Span::new(start, self.index as u32) - } - - pub fn eat2(&mut self, first: char, second: char) -> bool { - if self.is(first) && self.nth(1) == Some(&second) { - self.index += 2; - true - } else { - false - } - } - - pub fn eof(&self) -> bool { - self.index < self.lexer.chars.len() - } - - pub fn nth(&self, n: usize) -> Option<&char> { - self.lexer.chars.get(self.index + n) - } - - /// by default next means `nth(1)` - pub fn next(&self) -> Option<&char> { - self.lexer.chars.get(self.index + 1).copied() - } - - /// get a range chars relative from current cursor - pub fn nrange(&self, range: Range) -> Option<&[char]> { - self.lexer.chars.get(self.index + range.start..(self.index + range.end)) - } - - pub fn current(&self) -> Option { - self.lexer.chars.get(self.index).copied() - } - - pub fn advance(&mut self) -> bool { - if self.index < self.lexer.chars.len() { - self.index += 1; - return true; - } else { - false - } - } - - pub fn rewind<'a>(&mut self, start: usize) { - self.index = start; - } - - fn eat3(&self, first: char, second: char, third: char) -> bool { - if self.is(first) && self.nth(1) == Some(&second) && self.nth(2) == Some(&third) { - self.index += 3; - true - } else { - false - } - } -} - -#[derive(Default, Clone, Copy)] -pub enum SourceKind { - Flags, - #[default] - Literal, - Pattern, -} - -pub fn parse_literal<'a>(parser: &mut Parser<'a>) -> RegExpLiteral<'a> { - if parser.is('/') { - parser.advance(); - let pattern = parse_pattern(parser); - todo!() - } else if parser.source_text.is_empty() { - panic!("Empty") - } else { - match parser.current() { - Some(ch) => { - panic!("unexpected character {ch}") - } - None => { - panic!("unexpected eof") - } - }; - } -} - -fn parse_pattern<'a>(parser: &mut Parser<'a>) -> Pattern<'a> { - let start = parser.index; - if let Some(pattern) = parse_pattern_internal(parser) { - return pattern; - } else if !parser.context.nflag - && parser.context.ecma_version >= EcmaVersion::V2018 - && parser.group_names.len() > 0 - { - parser.rewind(start); - parser.context.nflag = true; - return parse_pattern_internal(parser).expect("should have pattern"); - } - panic!("Invalid pattern") -} - -fn parse_pattern_internal<'a>(parser: &mut Parser<'a>) -> Option> { - let start = parser.index; - parser.num_capturing_parens = count_capturing_parens(parser); - parser.group_names.clear(); - parser.back_reference_names.clear(); - todo!() -} - -fn parse_disjunction<'a>(parser: &mut Parser<'a>) -> oxc_allocator::Vec<'a, Alternative<'a>> { - let start = parser.index; - let mut alternatives = parser.builder.new_vec(); - loop { - alternatives.push(parse_alternative(parser)); - if !parser.eat('|') { - break; - } - } - // Only consume the ast when `no_consume` is false - if parse_quantifier(parser, Some(true)).0 { - panic!("Nothing to repeat"); - } - if parser.eat('{') { - panic!("Lone quantifier brackets") - } - alternatives -} - -/// Validate the next characters as a RegExp `Alternative` production. -/// ``` -/// Alternative[UnicodeMode, UnicodeSetsMode, N]:: -/// [empty] -/// Alternative[?UnicodeMode, ?UnicodeSetsMode, ?N] Term[?UnicodeMode, ?UnicodeSetsMode, ?N] -/// ``` -fn parse_alternative<'a>(parser: &mut Parser<'a>) -> Alternative<'a> { - let start = parser.index; - let mut elements = parser.builder.new_vec(); - while !parser.eof() { - let (flag, node) = parse_term(parser); - if let Some(node) = node { - elements.push(node); - } - if !flag { - break; - } - } - Alternative { span: Span::new(start as u32, parser.index as u32), elements } -} - -fn parse_term<'a>(parser: &mut Parser<'a>) -> (bool, Option>) { - if parser.context.unicode_mode || parser.context.strict {} - todo!() -} - -fn parse_optional_quantifier<'a>(parser: &mut Parser<'a>) -> (bool, Option>) { - let (_, node) = parse_quantifier(parser, None); - (true, node) -} - -fn parse_assertion<'a>(parser: &mut Parser<'a>) -> (bool, Option>) { - let start = parser.index; - parser.last_assertion_is_quantifiable = false; - - if parser.eat('^') { - return ( - true, - Some(Assertion::BoundaryAssertion(parser.builder.alloc( - BoundaryAssertion::EdgeAssertion(parser.builder.alloc(EdgeAssertion { - span: Span::new(start as u32, parser.index as u32), - kind: EdgeAssertionKind::Start, - })), - ))), - ); - } - - if parser.eat('$') { - return ( - true, - Some(Assertion::BoundaryAssertion(parser.builder.alloc( - BoundaryAssertion::EdgeAssertion(parser.builder.alloc(EdgeAssertion { - span: Span::new(start as u32, parser.index as u32), - kind: EdgeAssertionKind::End, - })), - ))), - ); - } - - if parser.eat2('\\', 'B') { - return ( - true, - Some(Assertion::BoundaryAssertion(parser.builder.alloc( - BoundaryAssertion::WordBoundaryAssertion(parser.builder.alloc( - WordBoundaryAssertion { - span: Span::new(start as u32, parser.index as u32), - negate: true, - }, - )), - ))), - ); - } - - if parser.eat2('\\', 'b') { - return ( - true, - Some(Assertion::BoundaryAssertion(parser.builder.alloc( - BoundaryAssertion::WordBoundaryAssertion(parser.builder.alloc( - WordBoundaryAssertion { - span: Span::new(start as u32, parser.index as u32), - negate: false, - }, - )), - ))), - ); - } - - // Lookahead / Lookbehind - if parser.eat2('(', '?') { - let lookbeind = parser.context.ecma_version >= EcmaVersion::V2018 && parser.eat('<'); - let mut eq_sign = parser.eat('='); - let mut negate = if eq_sign { false } else { parser.eat('!') }; - if eq_sign || negate { - let span = Span::new(start as u32, parser.index as u32); - let alternatives = parse_disjunction(parser); - let look_around_assertion = - if lookbeind { - LookaroundAssertion::LookbehindAssertion( - parser.builder.alloc(LookbehindAssertion { span, negate, alternatives }), - ) - } else { - LookaroundAssertion::LookaheadAssertion( - parser.builder.alloc(LookaheadAssertion { span, negate, alternatives }), - ) - }; - let node = Assertion::LookaroundAssertion(parser.builder.alloc(look_around_assertion)); - if !parser.eat(')') { - panic!("Unterminated group") - } - parser.last_assertion_is_quantifiable = !lookbeind && !parser.context.strict; - } - parser.rewind(start); - } - (false, None) -} - -/// Validate the next characters as a RegExp `Quantifier` production if possible. -/// ``` -/// Quantifier:: -/// QuantifierPrefix -/// QuantifierPrefix `?` -/// QuantifierPrefix:: -/// `*` -/// `+` -/// `?` -/// `{` DecimalDigits `}` -/// `{` DecimalDigits `,}` -/// `{` DecimalDigits `,` DecimalDigits `}` -/// ``` -/// returns `true` if it consumed the next characters successfully. -fn parse_quantifier<'a>( - parser: &mut Parser<'a>, - no_consume: Option, -) -> (bool, Option>) { - let mut no_consume = no_consume.unwrap_or_default(); - let start = parser.index; - let mut min = 0; - let mut max = 0; - let mut greedy = false; - let mut element = None; - match parser.current().cloned() { - Some('*') => { - min = 0; - max = usize::MAX; - parser.advance(); - } - Some('+') => { - min = 1; - max = usize::MAX; - parser.advance(); - } - Some('?') => { - min = 0; - max = 1; - parser.advance(); - } - Some(_) => { - if parse_braced_quantifier(parser, no_consume) { - min = parser.last_range.start; - max = parser.last_range.end; - } - } - None => return (false, None), - } - greedy = !parser.eat('?'); - - if !no_consume { - let quantifier = parser.builder.alloc(Quantifier { - span: Span { start: start as u32, end: parser.index as u32 }, - min, - max, - greedy, - // https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/parser.ts#L269-L275 - // it can't be null, or the program will panic, so we put a dummy element, and parent - // should replace it - element: QuantifiableElement::Character(Character { - span: Span::default(), - value: ' ', - }), - }); - - element = Some(Element::Quantifier(quantifier)) - } - (true, element) -} - -fn parse_braced_quantifier<'a>(parser: &mut Parser<'a>, no_error: bool) -> bool { - let start = parser.index; - if eat_decimal_digits(parser) { - let min = parser.last_int_value; - let mut max = min; - if parser.eat(',') { - max = if eat_decimal_digits(parser) { parser.last_int_value } else { usize::MAX }; - } - if parser.eat('}') { - if !no_error && max < min { - panic!("numbers out of order in {{}} quantifier"); - } - parser.last_range = min..max; - return true; - } - } - if !no_error && (parser.context.unicode_mode || parser.context.strict) { - panic!("Incomplete quantifier"); - } - parser.rewind(start); - false -} - -fn parse_atom<'a>(parser: &mut Parser<'a>) { - todo!() -} - -fn parse_dot<'a>(parser: &mut Parser<'a>) -> (bool, Option) { - let start = parser.index; - if parser.eat('.') { - (true, Some(Character { span: Span::new(start as u32, parser.index as u32), value: '.' })) - } else { - (false, None) - } -} - -fn parse_reverse_solidus_atom_escape<'a>(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - if parser.eat('\\') { - if parse_atom_escape(parser) { - return true; - } - parser.rewind(start); - } - false -} - -fn parse_atom_escape<'a>(parser: &mut Parser<'a>) -> bool { - if parse_backreference(parser) - || parser.consume_character_class_escape() - || parser.consume_character_escape() - || (parser.context.nflag && parser.consume_k_group_name()) - { - true - } else { - if parser.strict || parser._unicode_mode { - parser.raise("Invalid escape"); - } - false - } -} - -/// TODO: resolve when pattern leave -fn parse_backreference<'a>(parser: &mut Parser<'a>) -> Option> { - let start = parser.index; - if parser.eat_decimal_escape() { - let n = parser.last_int_value; - if n <= parser.num_capturing_parens { - Some(Backreference { - span: Span::new(start as u32, parser.index as u32), - reference: BackreferenceRef::Number(n as usize), - resolved: CapturingGroup::default(), - }) - } else { - if parser.context.strict || parser.context.unicode_mode { - panic!("Invalid escape"); - } - parser.rewind(start); - None - } - } else { - None - } -} - -struct UnicodeSetsConsumeResult { - may_contain_strings: Option, -} - -fn consume_character_class_escape<'a>(parser: &mut Parser<'a>) -> Option { - let start = parser.index; - - if parser.eat(LATIN_SMALL_LETTER_D) { - parser.last_int_value = -1; - parser.on_escape_character_set(start - 1, parser.index, "digit", false); - return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); - } - - if parser.eat(LATIN_CAPITAL_LETTER_D) { - parser.last_int_value = -1; - parser.on_escape_character_set(start - 1, parser.index, "digit", true); - return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); - } - - if parser.eat(LATIN_SMALL_LETTER_S) { - parser.last_int_value = -1; - parser.on_escape_character_set(start - 1, parser.index, "space", false); - return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); - } - - if parser.eat(LATIN_CAPITAL_LETTER_S) { - parser.last_int_value = -1; - parser.on_escape_character_set(start - 1, parser.index, "space", true); - return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); - } - - if parser.eat(LATIN_SMALL_LETTER_W) { - parser.last_int_value = -1; - parser.on_escape_character_set(start - 1, parser.index, "word", false); - return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); - } - - if parser.eat(LATIN_CAPITAL_LETTER_W) { - parser.last_int_value = -1; - parser.on_escape_character_set(start - 1, parser.index, "word", true); - return Some(UnicodeSetsConsumeResult { may_contain_strings: None }); - } - - let mut negate = false; - if parser._unicode_mode - && parser.ecma_version >= 2018 - && (parser.eat(LATIN_SMALL_LETTER_P) || (negate = parser.eat(LATIN_CAPITAL_LETTER_P))) - { - parser.last_int_value = -1; - if parser.eat(LEFT_CURLY_BRACKET) { - if let Some(result) = parser.eat_unicode_property_value_expression() { - if parser.eat(RIGHT_CURLY_BRACKET) { - if negate && result.strings.is_some() { - parser.raise("Invalid property name"); - } - - parser.on_unicode_property_character_set( - start - 1, - parser.index, - "property", - &result.key, - &result.value, - negate, - result.strings.unwrap_or(false), - ); - - return Some(UnicodeSetsConsumeResult { - may_contain_strings: result.strings.unwrap_or(false), - }); - } - } - } - panic!("Invalid property name"); - } - - None -} - -fn consume_k_group_name<'a>(parser: &mut Parser<'a>) -> Option> { - let start = parser.index; - - if parser.eat('k') { - if parser.eat_group_name() { - let group_name: String = parser.last_str_value.clone(); - parser.back_reference_names.insert(group_name.clone()); - return Some(Backreference { - span: parser.span_with_start(start), - reference: BackreferenceRef::Atom(group_name.as_str().into()), - // dummy resolved - resolved: CapturingGroup::default(), - }); - } - panic!("Invalid named reference"); - } - - None -} - -fn consume_character_class<'a>(parser: &mut Parser<'a>) -> Option { - let start = parser.index; - - if parser.eat(LEFT_SQUARE_BRACKET) { - let negate = parser.eat(CIRCUMFLEX_ACCENT); - parser.on_character_class_enter(start, negate, parser._unicode_sets_mode); - let result = consume_class_contents(parser); - if !parser.eat(RIGHT_SQUARE_BRACKET) { - if parser.current_code_point == -1 { - parser.raise("Unterminated character class"); - } - parser.raise("Invalid character in character class"); - } - if negate && result.may_contain_strings { - parser.raise("Negated character class may contain strings"); - } - - parser.on_character_class_leave(start, parser.index, negate); - - // * Static Semantics: MayContainStrings - // CharacterClass[UnicodeMode, UnicodeSetsMode] :: - // [ ^ ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] - // 1. Return false. - // CharacterClass :: [ ClassContents ] - // 1. Return MayContainStrings of the ClassContents. - Some(result) - } else { - None - } -} - -/// * Consume ClassContents in a character class. -/// * @returns `UnicodeSetsConsumeResult`. -fn consume_class_contents<'a>(parser: &mut Parser<'a>) -> UnicodeSetsConsumeResult { - if parser._unicode_sets_mode { - if parser.current_code_point == RIGHT_SQUARE_BRACKET { - // [empty] - - // * Static Semantics: MayContainStrings - // ClassContents[UnicodeMode, UnicodeSetsMode] :: - // [empty] - // 1. Return false. - return UnicodeSetsConsumeResult { may_contain_strings: None }; - } - let result = parser.consume_class_set_expression(); - - // * Static Semantics: MayContainStrings - // ClassContents :: ClassSetExpression - // 1. Return MayContainStrings of the ClassSetExpression. - return result; - } - - let strict = parser.strict || parser._unicode_mode; - loop { - // Consume the first ClassAtom - let range_start = parser.index; - if !parser.consume_class_atom() { - break; - } - let min = parser._last_int_value; - - // Consume `-` - if !parser.eat(HYPHEN_MINUS) { - continue; - } - parser.on_character(range_start - 1, parser.index, HYPHEN_MINUS); - - // Consume the second ClassAtom - if !parser.consume_class_atom() { - break; - } - let max = parser._last_int_value; - - // Validate - if min == -1 || max == -1 { - if strict { - parser.raise("Invalid character class"); - } - continue; - } - if min > max { - parser.raise("Range out of order in character class"); - } - - parser.on_character_class_range(range_start, self.index, min, max); - } - - // * Static Semantics: MayContainStrings - // ClassContents[UnicodeMode, UnicodeSetsMode] :: - // NonemptyClassRanges[?UnicodeMode] - // 1. Return false. - return UnicodeSetsConsumeResult { may_contain_strings: false }; -} - -/** - * Consume ClassAtom in a character class. - * @returns `true` if it consumed the next characters successfully. - */ -fn consume_class_atom<'a>(parser: &mut Parser<'a>) -> bool { - let start = self.index; - let cp = self.current_code_point; - - if cp != -1 && cp != REVERSE_SOLIDUS && cp != RIGHT_SQUARE_BRACKET { - self.advance(); - self._last_int_value = cp; - self.on_character(start, self.index, self._last_int_value); - return true; - } - - if self.eat(REVERSE_SOLIDUS) { - if consume_class_escape(parser) { - return true; - } - if !self.strict && self.current_code_point == LATIN_SMALL_LETTER_C { - self._last_int_value = REVERSE_SOLIDUS; - self.on_character(start, self.index, self._last_int_value); - return true; - } - if self.strict || self._unicode_mode { - self.raise("Invalid escape"); - } - self.rewind(start); - } - - return false; -} - -/** - * Consume ClassEscape in a character class. - * @returns `true` if it consumed the next characters successfully. - */ -fn consume_class_escape<'a>(parser: &mut Parser<'a>) -> bool { - let start = self.index; - - // `b` - if self.eat(LATIN_SMALL_LETTER_B) { - self._last_int_value = BACKSPACE; - self.on_character(start - 1, self.index, self._last_int_value); - return true; - } - - // [+UnicodeMode] `-` - if self._unicode_mode && self.eat(HYPHEN_MINUS) { - self._last_int_value = HYPHEN_MINUS; - self.on_character(start - 1, self.index, self._last_int_value); - return true; - } - - // [annexB][~UnicodeMode] `c` ClassControlLetter - let cp = 0; - if !self.strict - && !self._unicode_mode - && self.current_code_point == LATIN_SMALL_LETTER_C - && (is_decimal_digit((cp = self.next_code_point)) || cp == LOW_LINE) - { - self.advance(); - self.advance(); - self._last_int_value = cp % 0x20; - self.on_character(start - 1, self.index, self._last_int_value); - return true; - } - - return consume_character_class_escape(parser) || consume_character_escape(parser); -} - -/** - * Consume ClassSetExpression in a character class. - * @returns `UnicodeSetsConsumeResult`. - */ -fn consume_class_set_expression<'a>(parser: &mut Parser<'a>) -> UnicodeSetsConsumeResult { - let start = self.index; - let mut may_contain_strings: Option = None; - let mut result: Option = None; - - if self.consume_class_set_character() { - if self.consume_class_set_range_from_operator(start) { - // ClassUnion - self.consume_class_union_right(UnicodeSetsConsumeResult { may_contain_strings: None }); - return UnicodeSetsConsumeResult { may_contain_strings: false }; - } - // ClassSetOperand - - // * Static Semantics: MayContainStrings - // ClassSetOperand :: - // ClassSetCharacter - // 1. Return false. - may_contain_strings = Some(false); - } else if let Some(res) = self.consume_class_set_operand() { - may_contain_strings = Some(res.may_contain_strings); - } else { - let cp = self.current_code_point; - if cp == REVERSE_SOLIDUS { - self.advance(); - self.raise("Invalid escape"); - } - if cp == self.next_code_point && is_class_set_reserved_double_punctuator_character(cp) { - self.raise("Invalid set operation in character class"); - } - self.raise("Invalid character in character class"); - } - - if self.eat2(AMPERSAND, AMPERSAND) { - // ClassIntersection - while self.current_code_point != AMPERSAND - && (result = self.consume_class_set_operand()).is_some() - { - self.on_class_intersection(start, self.index); - if !result.as_ref().unwrap().may_contain_strings.unwrap_or(false) { - may_contain_strings = Some(false); - } - if self.eat2(AMPERSAND, AMPERSAND) { - continue; - } - - // * Static Semantics: MayContainStrings - // ClassSetExpression :: ClassIntersection - // 1. Return MayContainStrings of the ClassIntersection. - // ClassIntersection :: ClassSetOperand && ClassSetOperand - // 1. If MayContainStrings of the first ClassSetOperand is false, return false. - // 2. If MayContainStrings of the second ClassSetOperand is false, return false. - // 3. Return true. - // ClassIntersection :: ClassIntersection && ClassSetOperand - // 1. If MayContainStrings of the ClassIntersection is false, return false. - // 2. If MayContainStrings of the ClassSetOperand is false, return false. - // 3. Return true. - return UnicodeSetsConsumeResult { may_contain_strings }; - } - - self.raise("Invalid character in character class"); - } - if self.eat2(HYPHEN_MINUS, HYPHEN_MINUS) { - // ClassSubtraction - while self.consume_class_set_operand() { - self.on_class_subtraction(start, self.index); - if self.eat2(HYPHEN_MINUS, HYPHEN_MINUS) { - continue; - } - // * Static Semantics: MayContainStrings - // ClassSetExpression :: ClassSubtraction - // 1. Return MayContainStrings of the ClassSubtraction. - // ClassSubtraction :: ClassSetOperand -- ClassSetOperand - // 1. Return MayContainStrings of the first ClassSetOperand. - // ClassSubtraction :: ClassSubtraction -- ClassSetOperand - // 1. Return MayContainStrings of the ClassSubtraction. - return UnicodeSetsConsumeResult { may_contain_strings }; - } - - self.raise("Invalid character in character class"); - } - // ClassUnion - return self.consume_class_union_right(UnicodeSetsConsumeResult { may_contain_strings }); -} - -/** - * Consume the right operand of a ClassUnion in a character class. - * @param left_result The result information for the left ClassSetRange or ClassSetOperand. - * @returns `UnicodeSetsConsumeResult`. - */ -fn consume_class_union_right<'a>( - parser: &mut Parser<'a>, - left_result: UnicodeSetsConsumeResult, -) -> UnicodeSetsConsumeResult { - // ClassUnion - let mut may_contain_strings = left_result.may_contain_strings.unwrap_or(false); - loop { - let start = self.index; - if self.consume_class_set_character() { - self.consume_class_set_range_from_operator(start); - continue; - } - if let Some(result) = self.consume_class_set_operand() { - if result.may_contain_strings.unwrap_or(false) { - may_contain_strings = true; - } - continue; - } - break; - } - - // * Static Semantics: MayContainStrings - // ClassSetExpression :: ClassUnion - // 1. Return MayContainStrings of the ClassUnion. - // ClassUnion :: ClassSetRange ClassUnion(opt) - // 1. If the ClassUnion is present, return MayContainStrings of the ClassUnion. - // 2. Return false. - // ClassUnion :: ClassSetOperand ClassUnion(opt) - // 1. If MayContainStrings of the ClassSetOperand is true, return true. - // 2. If ClassUnion is present, return MayContainStrings of the ClassUnion. - // 3. Return false. - return UnicodeSetsConsumeResult { may_contain_strings: Some(may_contain_strings) }; -} - -fn eat_decimal_digits<'a>(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - parser.last_int_value = 0; - while let Some(ch) = parser.current() { - let Some(d) = ch.to_digit(10) else { - break; - }; - parser.last_int_value = 10 * parser.last_int_value + d; - parser.advance(); - } - parser.index != start -} - -fn eat_hex_digits(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - parser.last_int_value = 0; - - while let Some(ch) = parser.current() { - if !ch.is_ascii_hexdigit() { - break; - } - parser.last_int_value = - 16 * parser.last_int_value + ch.to_digit(16).expect("should convert successfully"); - parser.advance(); - } - - parser.index != start -} - -fn count_capturing_parens<'a>(parser: &mut Parser<'a>) -> usize { - let start = parser.index; - let mut in_class = false; - let mut escaped = false; - let mut count = 0; - while let Some(ch) = parser.current() { - if escaped { - escaped = false; - } - match ch { - '\\' => { - escaped = true; - } - '[' | ']' => { - in_class = false; - } - '(' if !in_class => { - if parser.nth(1) != Some(&'?') - || (parser.nth(2) == Some(&'<') - && !matches!(parser.nth(3), Some(&'=') | Some(&'!'))) - { - count += 1; - } - } - _ => {} - } - parser.advance(); - } - parser.rewind(start); - count -} - -/// * Consume NestedClass in a character class. -/// * @returns `UnicodeSetsConsumeResult`. -/// TODO: -fn consume_nested_class<'a>(parser: &mut Parser<'a>) -> Option { - let start = self.index; - if self.eat(LEFT_SQUARE_BRACKET) { - let negate = self.eat(CIRCUMFLEX_ACCENT); - self.on_character_class_enter(start, negate, true); - let result = consume_class_contents(parser); - if !self.eat(RIGHT_SQUARE_BRACKET) { - self.raise("Unterminated character class"); - } - if negate && result.may_contain_strings.unwrap_or(false) { - self.raise("Negated character class may contain strings"); - } - self.on_character_class_leave(start, self.index, negate); - - // * Static Semantics: MayContainStrings - // NestedClass :: - // [ ^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] - // 1. Return false. - // NestedClass :: [ ClassContents ] - // 1. Return MayContainStrings of the ClassContents. - return Some(result); - } - if self.eat(REVERSE_SOLIDUS) { - if let Some(result) = self.consume_character_class_escape() { - // * Static Semantics: MayContainStrings - // NestedClass :: \ CharacterClassEscape - // 1. Return MayContainStrings of the CharacterClassEscape. - return Some(result); - } - self.rewind(start); - } - None -} - -/** - * Consume ClassStringDisjunction in a character class. - * @returns `UnicodeSetsConsumeResult`. - */ -fn consume_class_string_disjunction<'a>( - parser: &mut Parser<'a>, -) -> (Option, Option>) { - let start = parser.index; - if parser.eat3('\\', 'q', '{') { - let mut i = 0; - let mut may_contain_strings = false; - let mut alternatives = parser.builder.new_vec(); - loop { - let (consume_res, node) = consume_class_string(parser, i); - if consume_res.may_contain_strings.unwrap_or_default() { - may_contain_strings = true; - } - if let Some(node) = node { - alternatives.push(node); - } - i += 1; - if !parser.eat('|') { - break; - } - } - - if parser.eat('}') { - // * Static Semantics: MayContainStrings - // ClassStringDisjunction :: \q{ ClassStringDisjunctionContents } - // 1. Return MayContainStrings of the ClassStringDisjunctionContents. - // ClassStringDisjunctionContents :: ClassString - // 1. Return MayContainStrings of the ClassString. - // ClassStringDisjunctionContents :: ClassString | ClassStringDisjunctionContents - // 1. If MayContainStrings of the ClassString is true, return true. - // 2. Return MayContainStrings of the ClassStringDisjunctionContents. - return ( - Some(UnicodeSetsConsumeResult { may_contain_strings: Some(may_contain_strings) }), - Some(ClassStringDisjunction { span: parser.span_with_start(start), alternatives }), - ); - } - panic!("Unterminated class string disjunction"); - } - None -} - -/** - * Consume ClassString in a character class. - * @param i - The index of the string alternative. - * @returns `UnicodeSetsConsumeResult`. - */ -fn consume_class_string<'a>( - parser: &mut Parser<'a>, - i: usize, -) -> (UnicodeSetsConsumeResult, Option>) { - let start = parser.index; - - let mut count = 0; - let mut arr = parser.builder.new_vec(); - while !parser.eof() { - if let Some(character) = consume_class_set_character(parser) { - arr.push(character); - count += 1; - } else { - break; - } - } - - // * Static Semantics: MayContainStrings - // ClassString :: [empty] - // 1. Return true. - // ClassString :: NonEmptyClassString - // 1. Return MayContainStrings of the NonEmptyClassString. - // NonEmptyClassString :: ClassSetCharacter NonEmptyClassString(opt) - // 1. If NonEmptyClassString is present, return true. - // 2. Return false. - ( - UnicodeSetsConsumeResult { may_contain_strings: Some(count != 1) }, - Some(StringAlternative { span: parser.span_with_start(start), elements: arr }), - ) -} - -/** - * Consume ClassSetCharacter in a character class. - * Set `self._last_int_value` if it consumed the next characters successfully. - * @returns `true` if it ate the next characters successfully. - */ -fn consume_class_set_character<'a>(parser: &mut Parser<'a>) -> Option { - let start = parser.index; - let cp = parser.current()?; - - if Some(cp) != parser.next() || !is_class_set_reserved_double_punctuator_character(cp) { - if !is_class_set_syntax_character(cp) { - parser.last_int_value = cp as u32; - parser.advance(); - Some(Character { span: parser.span_with_start(start), value: cp }) - } - } - - if parser.eat('\\') { - if consume_character_escape(parser) { - return true; - } - if let Some(ch) = parser.current() - && is_class_set_reserved_punctuator(ch) - { - parser.last_int_value = parser.current()? as u32; - parser.advance(); - - Some(Character { - span: parser.span_with_start(start), - value: parser.last_int_value as char, - }) - } - if parser.eat('b') { - parser.last_int_value = 8; - Some(Character { - span: parser.span_with_start(start), - value: parser.last_int_value as char, - }) - } - parser.rewind(start); - } - - None -} - -fn consume_character_escape<'a>(parser: &mut Parser<'a>) -> Option { - let start = parser.index; - if eat_control_escape(parser) - || eat_c_control_letter(parser) - || eat_zero(parser).is_some() - || eat_hex_escape_sequence(parser) - || eat_reg_exp_unicode_escape_sequence(parser, false) - || (!parser.context.strict - && !parser.context.unicode_mode - && eat_legacy_octal_escape_sequence(parser)) - || eat_identity_escape(parser).is_some() - { - Some(Character { - span: parser.span_with_start(start - 1), - value: parser.last_int_value as char, - }) - } - None -} - -fn eat_hex_escape_sequence<'a>(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - if parser.eat('x') { - if eat_fixed_hex_digits(parser, 2) { - return true; - } - if parser.context.unicode_mode || parser.context.strict { - panic!("Invalid escape"); - } - parser.rewind(start); - } - false -} - -fn eat_legacy_octal_escape_sequence<'a>(parser: &mut Parser<'a>) -> bool { - if eat_octal_digit(parser).is_some() { - let n1 = parser.last_int_value; - if eat_octal_digit(parser).is_some() { - let n2 = parser.last_int_value; - if n1 <= 3 && eat_octal_digit(parser).is_some() { - parser.last_int_value = n1 * 64 + n2 * 8 + parser.last_int_value; - } else { - parser.last_int_value = n1 * 8 + n2; - } - } else { - parser.last_int_value = n1; - } - return true; - } - false -} - -/** - * Eat the next characters as a RegExp `GroupName` production if possible. - * Set `self._last_str_value` if the group name existed. - * @returns `true` if it ate the next characters successfully. - */ -fn eat_group_name<'a>(parser: &mut Parser<'a>) -> bool { - if parser.eat('<') { - if eat_reg_exp_identifier_name(parser) && parser.eat('>') { - return true; - } - panic!("Invalid capture group name"); - } - false -} - -/** - * Eat the next characters as a RegExp `RegExpIdentifierName` production if - * possible. - * Set `self._last_str_value` if the identifier name existed. - * @returns `true` if it ate the next characters successfully. - */ -fn eat_reg_exp_identifier_name<'a>(parser: &mut Parser<'a>) -> bool { - if eat_reg_exp_identifier_start(parser).is_some() { - parser.last_str_value = (parser.last_int_value as char).to_string(); - - while eat_reg_exp_identifier_part(parser) { - parser.last_str_value.push(parser.last_int_value as char); - } - - return true; - } - false -} - -/** - * Eat the next characters as a RegExp `RegExpIdentifierStart` production if - * possible. - * Set `self._last_int_value` if the identifier start existed. - * @returns `true` if it ate the next characters successfully. - */ -fn eat_reg_exp_identifier_start<'a>(parser: &mut Parser<'a>) -> Option<()> { - let start = parser.index; - let force_u_flag = - !parser.context.unicode_mode && parser.context.ecma_version >= EcmaVersion::V2020; - let mut cp = parser.current()?; - parser.advance(); - - if cp == '\\' && eat_reg_exp_unicode_escape_sequence(parser, force_u_flag) { - cp = char::from_u32(parser.last_int_value).expect("should convert to char"); - } else if force_u_flag && is_lead_surrogate(cp) && is_trail_surrogate(parser.current()? as u32) - { - cp = combine_surrogate_pair(cp, parser.current().expect("should convert to u32") as u32); - parser.advance(); - } - - if is_identifier_start_char(cp) { - parser.last_int_value = cp as u32; - return Some(()); - } - - if parser.index != start { - parser.rewind(start); - } - false -} - -/** - * Eat the next characters as a RegExp `RegExpIdentifierPart` production if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * RegExpIdentifierPart[UnicodeMode]:: - * RegExpIdentifierStart[?UnicodeMode] - * DecimalDigit - * \ UnicodeEscapeSequence[+UnicodeMode] - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_reg_exp_identifier_part<'a>(parser: &mut Parser<'a>) -> Option<()> { - let start = parser.index; - let force_u_flag = - !parser.context.unicode_mode && parser.context.ecma_version >= EcmaVersion::V2020; - let mut cp = parser.current()?; - parser.advance(); - - if cp == '\\' && eat_reg_exp_unicode_escape_sequence(parser, force_u_flag) { - cp = char::from_u32(parser.last_int_value).expect("should convert to char"); - } else if force_u_flag - && is_lead_surrogate(cp as u32) - && is_trail_surrogate(parser.current()? as u32) - { - cp = combine_surrogate_pair(cp as u32, parser.current()? as u32); - parser.advance(); - } - - if is_identifier_part(cp) { - parser.last_int_value = cp as u32; - return Some(()); - } - - if parser.index != start { - parser.rewind(start); - } - None -} - -/** - * Eat the next characters as the following alternatives if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * `c` ControlLetter - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_c_control_letter<'a>(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - if parser.eat('c') { - if eat_control_letter(parser).is_some() { - return true; - } - parser.rewind(start); - } - false -} - -/** - * Eat the next characters as the following alternatives if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * `0` [lookahead ∉ DecimalDigit] - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_zero<'a>(parser: &mut Parser<'a>) -> Option<()> { - if parser.current()? == '0' && parser.nth(1).map(|ch| ch.is_ascii_digit()) == Some(false) { - parser.last_int_value = 0; - parser.advance(); - return Some(()); - } - None -} - -/** - * Eat the next characters as a RegExp `ControlEscape` production if - * possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * ControlEscape:: one of - * f n r t v - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_control_escape<'a>(parser: &mut Parser<'a>) -> bool { - if parser.eat('f') { - parser.last_int_value = 12; - return true; - } - if parser.eat('n') { - parser.last_int_value = 10; - return true; - } - if parser.eat('r') { - parser.last_int_value = 13; - return true; - } - if parser.eat('t') { - parser.last_int_value = 9; - return true; - } - if parser.eat('v') { - parser.last_int_value = 11; - return true; - } - false -} - -/** - * Eat the next characters as the following alternatives if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * `{` CodePoint `}` - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_reg_exp_unicode_code_point_escape<'a>(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - - if parser.eat('{') - && eat_hex_digits(parser) - && parser.eat('}') - && is_valid_unicode(parser.last_int_value as u32) - { - return true; - } - - parser.rewind(start); - false -} - -/** - * Eat the next characters as a RegExp `DecimalEscape` production if - * possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * DecimalEscape:: - * NonZeroDigit DecimalDigits(opt) [lookahead ∉ DecimalDigit] - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_decimal_escape<'a>(parser: &mut Parser<'a>) -> Option<()> { - parser.last_int_value = 0; - let mut cp = parser.current()?; - if cp >= '1' && cp <= '9' { - while cp >= '1' && cp <= '9' { - parser.last_int_value = - 10 * parser.last_int_value + cp.to_digit(10).expect("should convert successfully"); - parser.advance(); - cp = match parser.current() { - Some(ch) => ch, - None => break, - }; - } - return Some(()); - } - None -} - -/** - * Eat the next characters as a RegExp `ControlLetter` production if - * possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * ControlLetter:: one of - * a b c d e f g h i j k l m n o p q r s t u v w x y z - * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_control_letter<'a>(parser: &mut Parser<'a>) -> Option<()> { - let cp = parser.current()?; - if cp.is_ascii_alphabetic() { - parser.advance(); - parser.last_int_value = (cp as u32) % 0x20; - return Some(()); - } - None -} - -/** - * Eat the next characters as a RegExp `RegExpUnicodeEscapeSequence` - * production if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * RegExpUnicodeEscapeSequence[UnicodeMode]:: - * [+UnicodeMode] `u` HexLeadSurrogate `\u` HexTrailSurrogate - * [+UnicodeMode] `u` HexLeadSurrogate - * [+UnicodeMode] `u` HexTrailSurrogate - * [+UnicodeMode] `u` HexNonSurrogate - * [~UnicodeMode] `u` Hex4Digits - * [+UnicodeMode] `u{` CodePoint `}` - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_reg_exp_unicode_escape_sequence<'a>(parser: &mut Parser<'a>, force_u_flag: bool) -> bool { - let start = parser.index; - let u_flag = force_u_flag || parser.context.unicode_mode; - - if parser.eat('u') { - if (u_flag && eat_reg_exp_unicode_surrogate_pair_escape(parser)) - || eat_fixed_hex_digits(parser, 4).is_some() - || (u_flag && eat_reg_exp_unicode_code_point_escape(parser)) - { - return true; - } - if parser.context.strict || u_flag { - panic!("Invalid unicode escape"); - } - parser.rewind(start); - } - - false -} - -/** - * Eat the next characters as the following alternatives if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * HexLeadSurrogate `\u` HexTrailSurrogate - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_reg_exp_unicode_surrogate_pair_escape<'a>(parser: &mut Parser<'a>) -> bool { - let start = parser.index; - - if eat_fixed_hex_digits(parser, 4).is_some() { - let lead = parser.last_int_value; - if is_lead_surrogate(lead) - && parser.eat('\\') - && parser.eat('u') - && eat_fixed_hex_digits(parser, 4).is_some() - { - let trail = parser.last_int_value; - if is_trail_surrogate(trail) { - parser.last_int_value = combine_surrogate_pair(lead, trail); - return true; - } - } - - parser.rewind(start); - } - - false -} - -/** - * Eat the next characters as a RegExp `IdentityEscape` production if - * possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * IdentityEscape[UnicodeMode, N]:: - * [+UnicodeMode] SyntaxCharacter - * [+UnicodeMode] `/` - * [strict][~UnicodeMode] SourceCharacter but not UnicodeIDContinue - * [annexB][~UnicodeMode] SourceCharacterIdentityEscape[?N] - * SourceCharacterIdentityEscape[N]:: - * [~N] SourceCharacter but not c - * [+N] SourceCharacter but not one of c k - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_identity_escape<'a>(parser: &mut Parser<'a>) -> Option<()> { - let cp = parser.current(); - if is_valid_identity_escape(parser, cp) { - parser.last_int_value = cp.unwrap() as u32; - parser.advance(); - return Some(()); - } - None -} - -fn is_valid_identity_escape(parser: &mut Parser<'a>, cp: Option) -> bool { - if cp.is_none() { - return false; - } - let cp = cp.unwrap(); - if parser.context.unicode_mode { - return is_syntax_character(cp) || cp == '/'; - } - if parser.context.strict { - return !is_id_continue(cp); - } - if parser.context.nflag { - return !(cp == 'c' || cp == 'k'); - } - cp != 'c' -} - -/** - * Eat the next characters as a RegExp `DecimalEscape` production if - * possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * DecimalEscape:: - * NonZeroDigit DecimalDigits(opt) [lookahead ∉ DecimalDigit] - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_decimal_escape<'a>(parser: &mut Parser<'a>) -> Option<()> { - parser.last_int_value = 0; - let mut cp = parser.current()?; - if cp.is_ascii_digit() { - while cp.is_ascii_digit() { - parser.last_int_value = 10 * parser.last_int_value + cp.to_digit(10)?; - parser.advance(); - cp = match parser.current() { - Some(char) => char, - None => break, - }; - } - return Some(()); - } - None -} - -/** - * Eat the next characters as a `OctalDigit` production if possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * OctalDigit:: one of - * 0 1 2 3 4 5 6 7 - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_octal_digit<'a>(parser: &mut Parser<'a>) -> Option<()> { - let cp = parser.current()?; - if cp.is_digit(8) { - parser.advance(); - parser.last_int_value = cp.to_digit(8)?; - Some(()) - } else { - parser.last_int_value = 0; - None - } -} - -/** - * Eat the next characters as the given number of `HexDigit` productions if - * possible. - * Set `self._last_int_value` if it ate the next characters successfully. - * ``` - * HexDigit:: one of - * 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F - * ``` - * @returns `true` if it ate the next characters successfully. - */ -fn eat_fixed_hex_digits<'a>(parser: &mut Parser<'a>, length: usize) -> Option<()> { - let start = parser.index; - parser.last_int_value = 0; - for _ in 0..length { - let cp = parser.current()?; - if !cp.is_ascii_hexdigit() { - parser.rewind(start); - return None; - } - parser.last_int_value = 16 * parser.last_int_value + cp.to_digit(16)?; - parser.advance(); - } - Some(()) -} - -const MIN_CODE_POINT: u32 = 0; -const MAX_CODE_POINT: u32 = 0x10FFFF; - -fn is_valid_unicode(code: u32) -> bool { - code >= MIN_CODE_POINT && code <= MAX_CODE_POINT -} diff --git a/crates/oxc_regexp_parser/_oxc_js_regex/util.rs b/crates/oxc_regexp_parser/_oxc_js_regex/util.rs deleted file mode 100644 index 454ea5fb88bc9..0000000000000 --- a/crates/oxc_regexp_parser/_oxc_js_regex/util.rs +++ /dev/null @@ -1,84 +0,0 @@ -use phf::phf_set; - -const SYNTAX_CHARACTERS: phf::Set = phf_set!['(', ')', '[', ']', '{', '}', '|', '-']; - -const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER: phf::Set = phf_set! { - '&' => AMPERSAND, - '!' => EXCLAMATION_MARK, - '#' => NUMBER_SIGN, - '$' => DOLLAR_SIGN, - '%' => PERCENT_SIGN, - '*' => ASTERISK, - '+' => PLUS_SIGN, - ',' => COMMA, - '.' => FULL_STOP, - ':' => COLON, - ';' => SEMICOLON, - '<' => LESS_THAN_SIGN, - '=' => EQUALS_SIGN, - '>' => GREATER_THAN_SIGN, - '?' => QUESTION_MARK, - '@' => COMMERCIAL_AT, - '^' => CIRCUMFLEX_ACCENT, - '`' => GRAVE_ACCENT, - '~' => TILDE, -}; - -const CLASS_SET_SYNTAX_CHARACTER: phf::Set = phf_set! { - '(' => LEFT_PARENTHESIS, - ')' => RIGHT_PARENTHESIS, - '[' => LEFT_SQUARE_BRACKET, - ']' => RIGHT_SQUARE_BRACKET, - '{' => LEFT_CURLY_BRACKET, - '}' => RIGHT_CURLY_BRACKET, - '/' => SOLIDUS, - '-' => HYPHEN_MINUS, - '\\' => REVERSE_SOLIDUS, - '|' => VERTICAL_LINE, -}; - -const CLASS_SET_RESERVED_PUNCTUATOR: phf::Set = phf_set! { - '&' => AMPERSAND, - '-' => HYPHEN_MINUS, - '!' => EXCLAMATION_MARK, - '#' => NUMBER_SIGN, - '%' => PERCENT_SIGN, - ',' => COMMA, - ':' => COLON, - ';' => SEMICOLON, - '<' => LESS_THAN_SIGN, - '=' => EQUALS_SIGN, - '>' => GREATER_THAN_SIGN, - '@' => COMMERCIAL_AT, - '`' => GRAVE_ACCENT, - '~' => TILDE, -}; - -#[inline] -pub fn is_syntax_character(cp: char) -> bool { - SYNTAX_CHARACTERS.contains(&cp) -} - -pub fn is_lead_surrogate(code: u32) -> bool { - code >= 0xd800 && code <= 0xdbff -} - -pub fn is_trail_surrogate(code: u32) -> bool { - code >= 0xdc00 && code <= 0xdfff -} - -pub fn combine_surrogate_pair(lead: u32, trail: u32) -> u32 { - (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000 -} - -pub fn is_class_set_reserved_double_punctuator_character(cp: char) -> bool { - CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.contains(&cp) -} - -pub fn is_class_set_syntax_character(cp: char) -> bool { - CLASS_SET_SYNTAX_CHARACTER.contains(&cp) -} - -pub fn is_class_set_reserved_punctuator(cp: char) -> bool { - CLASS_SET_RESERVED_PUNCTUATOR.contains(&cp) -} From 761490f6dd06a0280936a09aeb007796ef8147c4 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 13:44:09 +0900 Subject: [PATCH 025/143] Update tests --- crates/oxc_regexp_parser/examples/parser.rs | 1 + .../src/parser/body_parser/parser.rs | 47 +++++++++++++++++++ .../src/parser/body_parser/reader.rs | 8 ++-- .../src/parser/literal_parser.rs | 7 ++- 4 files changed, 58 insertions(+), 5 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 46bd461ee2ef1..8631ba4d35317 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -11,6 +11,7 @@ fn main() { ("/abc/i", ParserOptions::default()), ("/abcd/igv", ParserOptions::default()), ("/emo👈🏻ji/u", ParserOptions::default()), + ("/ab|c/i", ParserOptions::default()), ("//", ParserOptions::default()), ("/duplicated-flags/ii", ParserOptions::default()), ("/invalid-flags/x", ParserOptions::default()), diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 378669055c7b7..913f271956b0d 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -291,3 +291,50 @@ impl<'a> PatternParser<'a> { None } } + +#[cfg(test)] +mod test { + use super::*; + use oxc_allocator::Allocator; + + // NOTE: These may be useless when integlation tests are added + #[test] + fn should_pass() { + let allocator = Allocator::default(); + + let pattern = + PatternParser::new(&allocator, "abc", ParserOptions::default()).parse().unwrap(); + assert_eq!(pattern.alternatives.len(), 1); + assert_eq!(pattern.alternatives[0].elements.len(), 3); + + let pattern = + PatternParser::new(&allocator, "a|b|c", ParserOptions::default()).parse().unwrap(); + assert_eq!(pattern.alternatives.len(), 3); + + let pattern = + PatternParser::new(&allocator, "Emoji🥹", ParserOptions::default()).parse().unwrap(); + assert_eq!(pattern.alternatives[0].elements.len(), 6); + let pattern = PatternParser::new( + &allocator, + "Emoji🥹", + ParserOptions::default().with_modes(false, false), + ) + .parse() + .unwrap(); + assert_eq!(pattern.alternatives[0].elements.len(), 7); + } + + #[test] + fn should_fail() { + let allocator = Allocator::default(); + + assert!(PatternParser::new(&allocator, "", ParserOptions::default()).parse().is_err()); + assert!(PatternParser::new(&allocator, "a)", ParserOptions::default()).parse().is_err()); + assert!(PatternParser::new(&allocator, "b\\", ParserOptions::default()).parse().is_err()); + assert!(PatternParser::new(&allocator, "c]", ParserOptions::default()).parse().is_err()); + assert!(PatternParser::new(&allocator, "d}", ParserOptions::default()).parse().is_err()); + assert!(PatternParser::new(&allocator, "e|ee|{", ParserOptions::default()) + .parse() + .is_err()); + } +} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 47a0e7aac7269..8c4e24f18be22 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -65,6 +65,8 @@ impl<'a> Reader<'a> { self.peek_nth(2) } + // NOTE: Consider `peek(ch: char): bool` style API? + pub fn eat(&mut self, ch: char) -> bool { if self.peek() == Some(ch as u32) { self.advance(); @@ -99,7 +101,7 @@ mod test { use super::*; #[test] - fn test_index_basic() { + fn index_basic() { let source_text = "/RegExp✨/i"; let unicode_reader = Reader::new(source_text, true); let legacy_reader = Reader::new(source_text, false); @@ -139,7 +141,7 @@ mod test { } #[test] - fn test_index_unicode() { + fn index_unicode() { let source_text = "𠮷野家は👈🏻あっち"; let mut unicode_reader = Reader::new(source_text, true); @@ -188,7 +190,7 @@ mod test { } #[test] - fn test_position() { + fn span_position() { let source_text = "^ Catch😎 @ symbols🇺🇳 $"; let unicode_reader = Reader::new(source_text, true); diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index c1bfa03010b7d..1a83e176801b6 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -84,6 +84,7 @@ fn parse_reg_exp_literal(source_text: &str) -> Result<(usize, usize, usize)> { let mut in_character_class = false; loop { match chars.peek() { + // Line terminators are not allowed Some('\u{a}' | '\u{d}' | '\u{2028}' | '\u{2029}') | None => { let kind = if in_character_class { "character class" } else { "regular expression" }; @@ -136,7 +137,7 @@ mod test { "/abc/", "/abcd/igsmv", r"/\w+/u", - r"/foo\/bar/i", + r"/foo\/bar|baz/i", "/[a-z]/", "/正規表現/u", "/あっち👈🏻/i", @@ -154,7 +155,9 @@ mod test { #[test] fn parse_invalid_reg_exp_literal() { - for literal_text in ["", "foo", ":(", "a\nb", "/", "//", "///", "/*abc/", "/\\/"] { + for literal_text in + ["", "foo", ":(", "a\nb", "/", "/x", "/y\nz/", "/1[\n]/", "//", "///", "/*abc/", "/\\/"] + { assert!(parse_reg_exp_literal(literal_text).is_err()); } } From 49cb7f5e10c6d9419e019773c54406fd84bc260c Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 13:48:59 +0900 Subject: [PATCH 026/143] Fix test --- crates/oxc_regexp_parser/src/parser/body_parser/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 913f271956b0d..1b52ce9599400 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -313,15 +313,15 @@ mod test { let pattern = PatternParser::new(&allocator, "Emoji🥹", ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 6); + assert_eq!(pattern.alternatives[0].elements.len(), 7); let pattern = PatternParser::new( &allocator, "Emoji🥹", - ParserOptions::default().with_modes(false, false), + ParserOptions::default().with_modes(true, false), ) .parse() .unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 7); + assert_eq!(pattern.alternatives[0].elements.len(), 6); } #[test] From e81c6f1f7d652741f272cd3c466e8b64de1a90f9 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 14:23:25 +0900 Subject: [PATCH 027/143] Refactors --- .../src/parser/body_parser/parser.rs | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 1b52ce9599400..7af02c371d78e 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -85,7 +85,7 @@ impl<'a> PatternParser<'a> { alternatives, }; - // TODO: Implement + // TODO: Implement fix up for back references // this.onPatternLeave(start, this.index); Ok(pattern) @@ -134,10 +134,11 @@ impl<'a> PatternParser<'a> { // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] // ``` // - fn consume_alternative(&mut self, _i: usize) -> Result> { + fn consume_alternative(&mut self, i: usize) -> Result> { let start = self.reader.position(); // TODO: Implement + let _ = i; // this._groupSpecifiers.enterAlternative(i); let mut elements = Vec::new_in(self.allocator); @@ -277,18 +278,16 @@ impl<'a> PatternParser<'a> { fn consume_pattern_character(&mut self) -> Option { let start = self.reader.position(); - if let Some(cp) = self.reader.peek() { - if !unicode::is_syntax_character(cp) { - self.reader.advance(); - - return Some(ast::Character { - span: self.span_factory.create(start, self.reader.position()), - value: cp, - }); - } + let cp = self.reader.peek()?; + if unicode::is_syntax_character(cp) { + return None; } - None + self.reader.advance(); + Some(ast::Character { + span: self.span_factory.create(start, self.reader.position()), + value: cp, + }) } } @@ -307,6 +306,9 @@ mod test { assert_eq!(pattern.alternatives.len(), 1); assert_eq!(pattern.alternatives[0].elements.len(), 3); + let pattern = + PatternParser::new(&allocator, "a|b|", ParserOptions::default()).parse().unwrap(); + assert_eq!(pattern.alternatives.len(), 3); let pattern = PatternParser::new(&allocator, "a|b|c", ParserOptions::default()).parse().unwrap(); assert_eq!(pattern.alternatives.len(), 3); From 644cd104d68bd166fe2287a5c865f4530ee50599 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 16:42:58 +0900 Subject: [PATCH 028/143] Wip quantifier --- .../src/parser/body_parser/parser.rs | 134 ++++++++++-------- 1 file changed, 78 insertions(+), 56 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 7af02c371d78e..0b7c4d336a0c8 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -114,10 +114,6 @@ impl<'a> PatternParser<'a> { i += 1; } - // TODO: Implement - // if (this.consumeQuantifier(true)) { - // this.raise("Nothing to repeat"); - // } if self.reader.eat('{') { return Err(OxcDiagnostic::error("Lone quantifier brackets")); } @@ -170,23 +166,25 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Element::Assertion(Box::new_in(assertion, self.allocator)))); } - match (self.consume_atom()?, self.consume_quantifier()) { + let start = self.reader.position(); + match (self.consume_atom()?, self.consume_quantifier()?) { (Some(atom), None) => { Ok(Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator)))) } (Some(atom), Some(quantifier)) => { return Ok(Some(ast::Element::Quantifier(Box::new_in( ast::Quantifier { - span: self.span_factory.create(0, 0), // TODO: Merge atom.start, quantifier.end - min: quantifier.min, - max: quantifier.max, - greedy: quantifier.greedy, + span: self.span_factory.create(start, self.reader.position()), + min: quantifier.0 .0, + max: quantifier.0 .1, + greedy: quantifier.1, element: atom, }, self.allocator, )))); } - _ => Ok(None), + (None, Some(_)) => Err(OxcDiagnostic::error("Nothing to repeat")), + (None, None) => Ok(None), } } @@ -210,15 +208,6 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_atom(&mut self) -> Result>> { - // TODO: Implement - // return ( - // this.consumePatternCharacter() || - // this.consumeDot() || - // this.consumeReverseSolidusAtomEscape() || - // Boolean(this.consumeCharacterClass()) || - // this.consumeUncapturingGroup() || - // this.consumeCapturingGroup() - // ); if let Some(character) = self.consume_pattern_character() { return Ok(Some(ast::QuantifiableElement::Character(Box::new_in( character, @@ -226,48 +215,77 @@ impl<'a> PatternParser<'a> { )))); } - // 🧊: dot, or circular - + // TODO: Implement if self.reader.eat('👻') { return Err(OxcDiagnostic::error("TODO")); } + // if self.consume_dot() {} + // if self.consume_reverse_solidus_atom_escape() {} + // if self.consume_character_class() {} + // if self.consume_uncapturing_group() {} + // if self.consume_capturing_group() {} Ok(None) } - // TODO: Not a `Quantifier` itself, I want `(min, max, greedy, span)` - fn consume_quantifier(&mut self) -> Option> { - // TODO: Implement - let _start = self.reader.position(); - // let min = 0; - // let max = 0; - // let greedy = false; - - // // QuantifierPrefix - // if (this.eat(ASTERISK)) { - // min = 0; - // max = Number.POSITIVE_INFINITY; - // } else if (this.eat(PLUS_SIGN)) { - // min = 1; - // max = Number.POSITIVE_INFINITY; - // } else if (this.eat(QUESTION_MARK)) { - // min = 0; - // max = 1; - // } else if (this.eatBracedQuantifier(noConsume)) { - // ({ min, max } = this._lastRange); - // } else { - // return false; - // } - - // // `?` - // greedy = !this.eat(QUESTION_MARK); + // ``` + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // ``` + // + // ``` + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits } + // { DecimalDigits ,} + // { DecimalDigits , DecimalDigits } + // ``` + // + fn consume_quantifier(&mut self) -> Result> { + let is_greedy = |reader: &mut Reader| !reader.eat('?'); + + if self.reader.eat('*') { + return Ok(Some(( + (0, usize::MAX), // TODO: POSITIVE_INFINITY? + is_greedy(&mut self.reader), + ))); + } + if self.reader.eat('+') { + return Ok(Some(( + (1, usize::MAX), // TODO: POSITIVE_INFINITY? + is_greedy(&mut self.reader), + ))); + } + if self.reader.eat('?') { + return Ok(Some(((0, 1), is_greedy(&mut self.reader)))); + } - // if (!noConsume) { - // this.onQuantifier(start, this.index, min, max, greedy); - // } - // return true; + // TODO: Implement + if self.reader.eat('{') { + // if (this.eatDecimalDigits()) { + // const min = this._lastIntValue; + // let max = min; + // if (this.eat(COMMA)) { + // max = this.eatDecimalDigits() + // ? this._lastIntValue + // : Number.POSITIVE_INFINITY; + // } + // if (this.eat(RIGHT_CURLY_BRACKET)) { + // if (!noError && max < min) { + // this.raise("numbers out of order in {} quantifier"); + // } + // return { min, max } + greedy; + // return true; + // } + // } + + return Err(OxcDiagnostic::error("Incomplete quantifier")); + } - None + Ok(None) } // ``` @@ -275,6 +293,11 @@ impl<'a> PatternParser<'a> { // SourceCharacter but not SyntaxCharacter // ``` // + // ``` + // SyntaxCharacter :: one of + // ^ $ \ . * + ? ( ) [ ] { } | + // ``` + // fn consume_pattern_character(&mut self) -> Option { let start = self.reader.position(); @@ -310,7 +333,7 @@ mod test { PatternParser::new(&allocator, "a|b|", ParserOptions::default()).parse().unwrap(); assert_eq!(pattern.alternatives.len(), 3); let pattern = - PatternParser::new(&allocator, "a|b|c", ParserOptions::default()).parse().unwrap(); + PatternParser::new(&allocator, "a|b+?|c", ParserOptions::default()).parse().unwrap(); assert_eq!(pattern.alternatives.len(), 3); let pattern = @@ -335,8 +358,7 @@ mod test { assert!(PatternParser::new(&allocator, "b\\", ParserOptions::default()).parse().is_err()); assert!(PatternParser::new(&allocator, "c]", ParserOptions::default()).parse().is_err()); assert!(PatternParser::new(&allocator, "d}", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "e|ee|{", ParserOptions::default()) - .parse() - .is_err()); + assert!(PatternParser::new(&allocator, "e|+", ParserOptions::default()).parse().is_err()); + assert!(PatternParser::new(&allocator, "e|{", ParserOptions::default()).parse().is_err()); } } From b91f4fa88e6221f03fe8542ad62babce16669886 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 1 Jul 2024 17:15:19 +0900 Subject: [PATCH 029/143] Handle range max Infinity --- crates/oxc_regexp_parser/src/ast.rs | 2 +- .../src/parser/body_parser/parser.rs | 23 ++++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index d4b7c90d3fef3..5d0e591ef7ec7 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -339,7 +339,7 @@ pub struct Group<'a> { pub struct Quantifier<'a> { pub span: Span, pub min: usize, - pub max: usize, + pub max: Option, // `None` means `Infinity` pub greedy: bool, pub element: QuantifiableElement<'a>, } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 0b7c4d336a0c8..574d38b448d81 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -171,13 +171,13 @@ impl<'a> PatternParser<'a> { (Some(atom), None) => { Ok(Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator)))) } - (Some(atom), Some(quantifier)) => { + (Some(atom), Some(((min, max), greedy))) => { return Ok(Some(ast::Element::Quantifier(Box::new_in( ast::Quantifier { span: self.span_factory.create(start, self.reader.position()), - min: quantifier.0 .0, - max: quantifier.0 .1, - greedy: quantifier.1, + min, + max, + greedy, element: atom, }, self.allocator, @@ -244,23 +244,18 @@ impl<'a> PatternParser<'a> { // { DecimalDigits , DecimalDigits } // ``` // - fn consume_quantifier(&mut self) -> Result> { + #[allow(clippy::type_complexity)] + fn consume_quantifier(&mut self) -> Result), bool)>> { let is_greedy = |reader: &mut Reader| !reader.eat('?'); if self.reader.eat('*') { - return Ok(Some(( - (0, usize::MAX), // TODO: POSITIVE_INFINITY? - is_greedy(&mut self.reader), - ))); + return Ok(Some(((0, None), is_greedy(&mut self.reader)))); } if self.reader.eat('+') { - return Ok(Some(( - (1, usize::MAX), // TODO: POSITIVE_INFINITY? - is_greedy(&mut self.reader), - ))); + return Ok(Some(((1, None), is_greedy(&mut self.reader)))); } if self.reader.eat('?') { - return Ok(Some(((0, 1), is_greedy(&mut self.reader)))); + return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); } // TODO: Implement From bcdd6fcf3528a1abd292ddb3f62642cb6c552c9a Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 2 Jul 2024 11:05:00 +0900 Subject: [PATCH 030/143] Complete quantifier --- .../src/parser/body_parser/parser.rs | 135 ++++++++++++------ .../src/parser/body_parser/unicode.rs | 5 + .../oxc_regexp_parser/src/parser/options.rs | 21 ++- 3 files changed, 114 insertions(+), 47 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 574d38b448d81..7a3c27c3b8ef7 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -24,7 +24,7 @@ impl<'a> PatternParser<'a> { allocator, source_text, span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(source_text, options.unicode_mode), + reader: Reader::new(source_text, options.is_unicode_mode()), _state: ParserState, } } @@ -258,24 +258,30 @@ impl<'a> PatternParser<'a> { return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); } - // TODO: Implement if self.reader.eat('{') { - // if (this.eatDecimalDigits()) { - // const min = this._lastIntValue; - // let max = min; - // if (this.eat(COMMA)) { - // max = this.eatDecimalDigits() - // ? this._lastIntValue - // : Number.POSITIVE_INFINITY; - // } - // if (this.eat(RIGHT_CURLY_BRACKET)) { - // if (!noError && max < min) { - // this.raise("numbers out of order in {} quantifier"); - // } - // return { min, max } + greedy; - // return true; - // } - // } + if let Some(min) = self.consume_decimal_digits() { + if self.reader.eat('}') { + return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat(',') { + if self.reader.eat('}') { + return Ok(Some(((min, None), is_greedy(&mut self.reader)))); + } + + if let Some(max) = self.consume_decimal_digits() { + if self.reader.eat('}') { + if max < min { + return Err(OxcDiagnostic::error( + "Numbers out of order in {} quantifier", + )); + } + + return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); + } + } + } + } return Err(OxcDiagnostic::error("Incomplete quantifier")); } @@ -307,6 +313,27 @@ impl<'a> PatternParser<'a> { value: cp, }) } + + fn consume_decimal_digits(&mut self) -> Option { + let start = self.reader.position(); + + let mut value = 0; + while let Some(cp) = self.reader.peek() { + if !unicode::is_decimal_digits(cp) { + break; + } + + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + if self.reader.position() != start { + return Some(value); + } + + None + } } #[cfg(test)] @@ -314,46 +341,72 @@ mod test { use super::*; use oxc_allocator::Allocator; - // NOTE: These may be useless when integlation tests are added #[test] - fn should_pass() { + fn should_handle_unicode() { let allocator = Allocator::default(); + let source_text = "Emoji🥹"; let pattern = - PatternParser::new(&allocator, "abc", ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives.len(), 1); - assert_eq!(pattern.alternatives[0].elements.len(), 3); - - let pattern = - PatternParser::new(&allocator, "a|b|", ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives.len(), 3); - let pattern = - PatternParser::new(&allocator, "a|b+?|c", ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives.len(), 3); - - let pattern = - PatternParser::new(&allocator, "Emoji🥹", ParserOptions::default()).parse().unwrap(); + PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); assert_eq!(pattern.alternatives[0].elements.len(), 7); + let pattern = PatternParser::new( &allocator, - "Emoji🥹", + source_text, ParserOptions::default().with_modes(true, false), ) .parse() .unwrap(); assert_eq!(pattern.alternatives[0].elements.len(), 6); + let pattern = PatternParser::new( + &allocator, + source_text, + ParserOptions::default().with_modes(false, true), + ) + .parse() + .unwrap(); + assert_eq!(pattern.alternatives[0].elements.len(), 6); + } + + // NOTE: These may be useless when integlation tests are added + #[test] + fn should_pass() { + let allocator = Allocator::default(); + + for source_text in &[ + "a", + "a+", + "a*", + "a?", + "a{1}", + "a{1,}", + "a{1,2}", + "a|b", + "a|b|c", + "a|b+?|c", + "a+b*?c{1}d{2,}e{3,4}", + ] { + assert!( + PatternParser::new(&allocator, source_text, ParserOptions::default()) + .parse() + .is_ok(), + "{source_text} should be parsed!" + ); + } } #[test] fn should_fail() { let allocator = Allocator::default(); - assert!(PatternParser::new(&allocator, "", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "a)", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "b\\", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "c]", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "d}", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "e|+", ParserOptions::default()).parse().is_err()); - assert!(PatternParser::new(&allocator, "e|{", ParserOptions::default()).parse().is_err()); + for source_text in &["", "a)", "b\\", "c]", "d}", "e|+", "f|{", "g{", "g{1", "g{1,", "g{,"] + { + assert!( + PatternParser::new(&allocator, source_text, ParserOptions::default()) + .parse() + .is_err(), + "{source_text} should fail to parse!" + ); + } } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index 657a6befdc8a3..25da8e640e5ef 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -6,3 +6,8 @@ pub fn is_syntax_character(c: u32) -> bool { ) }) } + +pub fn is_decimal_digits(c: u32) -> bool { + char::from_u32(c) + .map_or(false, |c| matches!(c, '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')) +} diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/parser/options.rs index c2a0225257d96..9c998d25622f3 100644 --- a/crates/oxc_regexp_parser/src/parser/options.rs +++ b/crates/oxc_regexp_parser/src/parser/options.rs @@ -1,12 +1,14 @@ #[derive(Clone, Copy, Debug, Default)] pub struct ParserOptions { + /// Used to adjust Span pos to the global source code. + pub span_offset: u32, + /// The same as `u` flag. + unicode_flag: bool, + /// The same as `v` flag, it extends `u` flag behavior. + unicode_sets_flag: bool, // Not planning to implement // pub strict: bool, // pub ecma_version: u32, // or Enum? - /// Used to adjust Span pos to the global source code. - pub span_offset: u32, - pub unicode_mode: bool, - pub unicode_sets_mode: bool, } impl ParserOptions { @@ -16,7 +18,14 @@ impl ParserOptions { } #[must_use] - pub fn with_modes(self, unicode_mode: bool, unicode_sets_mode: bool) -> ParserOptions { - ParserOptions { unicode_mode, unicode_sets_mode, ..self } + pub fn with_modes(self, unicode_flag: bool, unicode_sets_flag: bool) -> ParserOptions { + ParserOptions { unicode_flag, unicode_sets_flag, ..self } + } + + pub fn is_unicode_mode(&self) -> bool { + self.unicode_flag || self.unicode_sets_flag + } + pub fn is_unicode_sets_mode(&self) -> bool { + self.unicode_sets_flag } } From 524a8756170b07035540dad4b99e97a392512e00 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 2 Jul 2024 13:12:15 +0900 Subject: [PATCH 031/143] Update comments, todos --- .../src/parser/body_parser/parser.rs | 20 ++++++++--------- .../src/parser/body_parser/reader.rs | 22 ++++++++++--------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 7a3c27c3b8ef7..8534493da570a 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -48,7 +48,7 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_pattern(&mut self) -> Result> { - let start = self.reader.position(); + let start = self.reader.span_position(); // TODO: Read only constants // this._numCapturingParens = this.countCapturingParens(); // TODO: Define state, use later somewhere @@ -81,7 +81,7 @@ impl<'a> PatternParser<'a> { // } let pattern = ast::Pattern { - span: self.span_factory.create(start, self.reader.position()), + span: self.span_factory.create(start, self.reader.span_position()), alternatives, }; @@ -131,7 +131,7 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_alternative(&mut self, i: usize) -> Result> { - let start = self.reader.position(); + let start = self.reader.span_position(); // TODO: Implement let _ = i; @@ -149,7 +149,7 @@ impl<'a> PatternParser<'a> { } Ok(ast::Alternative { - span: self.span_factory.create(start, self.reader.position()), + span: self.span_factory.create(start, self.reader.span_position()), elements, }) } @@ -166,7 +166,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Element::Assertion(Box::new_in(assertion, self.allocator)))); } - let start = self.reader.position(); + let start = self.reader.span_position(); match (self.consume_atom()?, self.consume_quantifier()?) { (Some(atom), None) => { Ok(Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator)))) @@ -174,7 +174,7 @@ impl<'a> PatternParser<'a> { (Some(atom), Some(((min, max), greedy))) => { return Ok(Some(ast::Element::Quantifier(Box::new_in( ast::Quantifier { - span: self.span_factory.create(start, self.reader.position()), + span: self.span_factory.create(start, self.reader.span_position()), min, max, greedy, @@ -300,7 +300,7 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_pattern_character(&mut self) -> Option { - let start = self.reader.position(); + let start = self.reader.span_position(); let cp = self.reader.peek()?; if unicode::is_syntax_character(cp) { @@ -309,13 +309,13 @@ impl<'a> PatternParser<'a> { self.reader.advance(); Some(ast::Character { - span: self.span_factory.create(start, self.reader.position()), + span: self.span_factory.create(start, self.reader.span_position()), value: cp, }) } fn consume_decimal_digits(&mut self) -> Option { - let start = self.reader.position(); + let start = self.reader.span_position(); let mut value = 0; while let Some(cp) = self.reader.peek() { @@ -328,7 +328,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); } - if self.reader.position() != start { + if self.reader.span_position() != start { return Some(value); } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 8c4e24f18be22..efc3822ab75d4 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -1,5 +1,6 @@ pub struct Reader<'a> { source: &'a str, + // NOTE: For now, this exists only for `span_position()` method. char_indices: std::str::CharIndices<'a>, unicode_mode: bool, index: usize, @@ -12,10 +13,10 @@ impl<'a> Reader<'a> { // NOTE: Should be decoupled from the reader...? // ``` - // let pos = Position::new(source, unicode_mode); - // pos.get(reader.index); + // let reader_idx = reader.index; + // SpanPosition::new(source, unicode_mode).get(reader_idx); // ```` - pub fn position(&self) -> usize { + pub fn span_position(&self) -> usize { let mut char_indices = self.char_indices.clone(); if self.unicode_mode { @@ -46,7 +47,8 @@ impl<'a> Reader<'a> { fn peek_nth(&self, n: usize) -> Option { let nth = self.index + n; - // NOTE: This may affect performance? + // TODO: This is not efficient. + // Refs oxc_parser/src/lexer/mod.rs using `VecDeque` for this? if self.unicode_mode { self.source.chars().nth(nth).map(|c| c as u32) } else { @@ -200,23 +202,23 @@ mod test { while reader.peek() != Some('^' as u32) { reader.advance(); } - let s1 = reader.position(); + let s1 = reader.span_position(); assert!(reader.eat('^')); - let e1 = reader.position(); + let e1 = reader.span_position(); while reader.peek() != Some('@' as u32) { reader.advance(); } - let s2 = reader.position(); + let s2 = reader.span_position(); assert!(reader.eat('@')); - let e2 = reader.position(); + let e2 = reader.span_position(); while reader.peek() != Some('$' as u32) { reader.advance(); } - let s3 = reader.position(); + let s3 = reader.span_position(); assert!(reader.eat('$')); - let e3 = reader.position(); + let e3 = reader.span_position(); assert_eq!(&source_text[s1..e1], "^"); assert_eq!(&source_text[s2..e2], "@"); From 3e8722e9cf574eff266128c227016b90ffbd1a15 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 2 Jul 2024 16:39:04 +0900 Subject: [PATCH 032/143] Implement assertion --- .../src/parser/body_parser/parser.rs | 171 ++++++++++++++---- .../src/parser/body_parser/reader.rs | 3 + 2 files changed, 140 insertions(+), 34 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 8534493da570a..fd95edba800ee 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -188,10 +188,109 @@ impl<'a> PatternParser<'a> { } } - // TODO: Implement + // Assertion[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // ^ + // $ + // \b + // \B + // (?= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?! Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?<= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (? fn consume_assertion(&mut self) -> Result>> { - if self.reader.eat('👻') { - return Err(OxcDiagnostic::error("TODO")); + let start = self.reader.span_position(); + + if self.reader.eat('^') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::EdgeAssertion(Box::new_in( + ast::EdgeAssertion { + span: self.span_factory.create(start, self.reader.span_position()), + kind: ast::EdgeAssertionKind::Start, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.reader.eat('$') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::EdgeAssertion(Box::new_in( + ast::EdgeAssertion { + span: self.span_factory.create(start, self.reader.span_position()), + kind: ast::EdgeAssertionKind::End, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.reader.eat2('\\', 'B') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( + ast::WordBoundaryAssertion { + span: self.span_factory.create(start, self.reader.span_position()), + negate: false, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.reader.eat2('\\', 'b') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( + ast::WordBoundaryAssertion { + span: self.span_factory.create(start, self.reader.span_position()), + negate: true, + }, + self.allocator, + )), + self.allocator, + )))); + } + + // Lookaround + let rewind_start = self.reader.checkpoint(); + if self.reader.eat2('(', '?') { + let lookaround = { + let is_lookbehind = self.reader.eat('<'); + + if self.reader.eat('=') { + Some((false, is_lookbehind)) + } else if self.reader.eat('!') { + Some((true, is_lookbehind)) + } else { + None + } + }; + + if let Some((negate, is_lookbehind)) = lookaround { + let alternatives = self.consume_disjunction()?; + if !self.reader.eat(')') { + return Err(OxcDiagnostic::error("Unterminated group")); + } + + let span = self.span_factory.create(start, self.reader.span_position()); + let lookaround_assertion = if is_lookbehind { + ast::LookaroundAssertion::LookbehindAssertion(Box::new_in( + ast::LookbehindAssertion { span, negate, alternatives }, + self.allocator, + )) + } else { + ast::LookaroundAssertion::LookaheadAssertion(Box::new_in( + ast::LookaheadAssertion { span, negate, alternatives }, + self.allocator, + )) + }; + + return Ok(Some(ast::Assertion::LookaroundAssertion(Box::new_in( + lookaround_assertion, + self.allocator, + )))); + } + + self.reader.rewind(rewind_start); } Ok(None) @@ -273,7 +372,7 @@ impl<'a> PatternParser<'a> { if self.reader.eat('}') { if max < min { return Err(OxcDiagnostic::error( - "Numbers out of order in {} quantifier", + "Numbers out of order in braced quantifier", )); } @@ -341,33 +440,6 @@ mod test { use super::*; use oxc_allocator::Allocator; - #[test] - fn should_handle_unicode() { - let allocator = Allocator::default(); - let source_text = "Emoji🥹"; - - let pattern = - PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 7); - - let pattern = PatternParser::new( - &allocator, - source_text, - ParserOptions::default().with_modes(true, false), - ) - .parse() - .unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 6); - let pattern = PatternParser::new( - &allocator, - source_text, - ParserOptions::default().with_modes(false, true), - ) - .parse() - .unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 6); - } - // NOTE: These may be useless when integlation tests are added #[test] fn should_pass() { @@ -384,7 +456,8 @@ mod test { "a|b", "a|b|c", "a|b+?|c", - "a+b*?c{1}d{2,}e{3,4}", + "a+b*?c{1}d{2,}e{3,4}?", + r"^(?=ab)\b(?!cd)(?<=ef)\B(? Reader<'a> { } } + pub fn checkpoint(&self) -> usize { + self.index + } pub fn rewind(&mut self, index: usize) { self.index = index; } From fd208e509f1fe52d7e102abeed7e5b1f7238423a Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 2 Jul 2024 16:39:58 +0900 Subject: [PATCH 033/143] Apply fmt --- crates/oxc_regexp_parser/src/parser/body_parser/parser.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index fd95edba800ee..16fa2bdf380c8 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -511,5 +511,4 @@ mod test { .unwrap(); assert_eq!(pattern.alternatives[0].elements.len(), 6); } - } From e75d7f05a21e96d252b0b2659eb75c204cb02275 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 2 Jul 2024 16:40:19 +0900 Subject: [PATCH 034/143] Update example --- crates/oxc_regexp_parser/examples/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 8631ba4d35317..ffc19b1daf7a0 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -12,9 +12,9 @@ fn main() { ("/abcd/igv", ParserOptions::default()), ("/emo👈🏻ji/u", ParserOptions::default()), ("/ab|c/i", ParserOptions::default()), - ("//", ParserOptions::default()), - ("/duplicated-flags/ii", ParserOptions::default()), - ("/invalid-flags/x", ParserOptions::default()), + ("/a|b+|c/i", ParserOptions::default()), + ("/a{0}|b{1,2}|c{3,}/i", ParserOptions::default()), + ("/(?=a)|(?<=b)|(?!c)|(? Date: Tue, 2 Jul 2024 17:12:12 +0900 Subject: [PATCH 035/143] Consume dot --- crates/oxc_regexp_parser/src/ast.rs | 7 +++++- .../src/parser/body_parser/parser.rs | 25 ++++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 5d0e591ef7ec7..92e18ed224271 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -234,11 +234,16 @@ pub enum UnicodeSetsCharacterClassElement<'a> { #[derive(Debug)] #[allow(clippy::enum_variant_names)] pub enum CharacterSet<'a> { - AnyCharacterSet, + AnyCharacterSet(Box<'a, AnyCharacterSet>), EscapeCharacterSet(Box<'a, EscapeCharacterSet>), UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), } +#[derive(Debug)] +pub struct AnyCharacterSet { + pub span: Span, +} + /// The character class escape. /// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` #[derive(Debug)] diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 16fa2bdf380c8..f2f040fafff54 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -35,9 +35,7 @@ impl<'a> PatternParser<'a> { } // TODO: Remove later, just for clippy unused - self.reader.eat2('a', 'b'); self.reader.eat3('a', 'b', 'c'); - self.reader.rewind(0); self.consume_pattern() } @@ -313,16 +311,22 @@ impl<'a> PatternParser<'a> { self.allocator, )))); } + if let Some(any_character_set) = self.consume_dot() { + return Ok(Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + ast::CharacterSet::AnyCharacterSet(Box::new_in(any_character_set, self.allocator)), + self.allocator, + )))); + } // TODO: Implement if self.reader.eat('👻') { return Err(OxcDiagnostic::error("TODO")); } - // if self.consume_dot() {} + // if self.consume_reverse_solidus_atom_escape() {} // if self.consume_character_class() {} - // if self.consume_uncapturing_group() {} // if self.consume_capturing_group() {} + // if self.consume_uncapturing_group() {} Ok(None) } @@ -413,6 +417,18 @@ impl<'a> PatternParser<'a> { }) } + fn consume_dot(&mut self) -> Option { + let start = self.reader.span_position(); + + if !self.reader.eat('.') { + return None; + } + + Some(ast::AnyCharacterSet { + span: self.span_factory.create(start, self.reader.span_position()), + }) + } + fn consume_decimal_digits(&mut self) -> Option { let start = self.reader.span_position(); @@ -458,6 +474,7 @@ mod test { "a|b+?|c", "a+b*?c{1}d{2,}e{3,4}?", r"^(?=ab)\b(?!cd)(?<=ef)\B(? Date: Tue, 2 Jul 2024 17:17:18 +0900 Subject: [PATCH 036/143] Fix CI --- crates/oxc_regexp_parser/src/parser/body_parser/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index f2f040fafff54..1923fe185857b 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -474,7 +474,7 @@ mod test { "a|b+?|c", "a+b*?c{1}d{2,}e{3,4}?", r"^(?=ab)\b(?!cd)(?<=ef)\B(? Date: Wed, 3 Jul 2024 10:03:04 +0900 Subject: [PATCH 037/143] Use explicit names --- .../src/parser/body_parser/parser.rs | 40 +++++++++---------- .../src/parser/body_parser/reader.rs | 14 +++---- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs index 1923fe185857b..f273b61316253 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs @@ -46,7 +46,7 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_pattern(&mut self) -> Result> { - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); // TODO: Read only constants // this._numCapturingParens = this.countCapturingParens(); // TODO: Define state, use later somewhere @@ -79,7 +79,7 @@ impl<'a> PatternParser<'a> { // } let pattern = ast::Pattern { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), alternatives, }; @@ -129,7 +129,7 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_alternative(&mut self, i: usize) -> Result> { - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); // TODO: Implement let _ = i; @@ -147,7 +147,7 @@ impl<'a> PatternParser<'a> { } Ok(ast::Alternative { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), elements, }) } @@ -164,7 +164,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Element::Assertion(Box::new_in(assertion, self.allocator)))); } - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); match (self.consume_atom()?, self.consume_quantifier()?) { (Some(atom), None) => { Ok(Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator)))) @@ -172,7 +172,7 @@ impl<'a> PatternParser<'a> { (Some(atom), Some(((min, max), greedy))) => { return Ok(Some(ast::Element::Quantifier(Box::new_in( ast::Quantifier { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), min, max, greedy, @@ -197,13 +197,13 @@ impl<'a> PatternParser<'a> { // (? fn consume_assertion(&mut self) -> Result>> { - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); if self.reader.eat('^') { return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( ast::BoundaryAssertion::EdgeAssertion(Box::new_in( ast::EdgeAssertion { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::EdgeAssertionKind::Start, }, self.allocator, @@ -215,7 +215,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( ast::BoundaryAssertion::EdgeAssertion(Box::new_in( ast::EdgeAssertion { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::EdgeAssertionKind::End, }, self.allocator, @@ -227,7 +227,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( ast::WordBoundaryAssertion { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), negate: false, }, self.allocator, @@ -239,7 +239,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( ast::WordBoundaryAssertion { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), negate: true, }, self.allocator, @@ -249,7 +249,7 @@ impl<'a> PatternParser<'a> { } // Lookaround - let rewind_start = self.reader.checkpoint(); + let checkpoint = self.reader.checkpoint(); if self.reader.eat2('(', '?') { let lookaround = { let is_lookbehind = self.reader.eat('<'); @@ -269,7 +269,7 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Unterminated group")); } - let span = self.span_factory.create(start, self.reader.span_position()); + let span = self.span_factory.create(span_start, self.reader.span_position()); let lookaround_assertion = if is_lookbehind { ast::LookaroundAssertion::LookbehindAssertion(Box::new_in( ast::LookbehindAssertion { span, negate, alternatives }, @@ -288,7 +288,7 @@ impl<'a> PatternParser<'a> { )))); } - self.reader.rewind(rewind_start); + self.reader.rewind(checkpoint); } Ok(None) @@ -403,7 +403,7 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_pattern_character(&mut self) -> Option { - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); let cp = self.reader.peek()?; if unicode::is_syntax_character(cp) { @@ -412,25 +412,25 @@ impl<'a> PatternParser<'a> { self.reader.advance(); Some(ast::Character { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), value: cp, }) } fn consume_dot(&mut self) -> Option { - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); if !self.reader.eat('.') { return None; } Some(ast::AnyCharacterSet { - span: self.span_factory.create(start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.span_position()), }) } fn consume_decimal_digits(&mut self) -> Option { - let start = self.reader.span_position(); + let span_start = self.reader.span_position(); let mut value = 0; while let Some(cp) = self.reader.peek() { @@ -443,7 +443,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); } - if self.reader.span_position() != start { + if self.reader.span_position() != span_start { return Some(value); } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 2e33960157f3b..0471d70af7939 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -129,8 +129,8 @@ mod test { assert!(!reader.eat3('E', 'x', 'p')); assert!(reader.eat2('x', 'p')); - let start = reader.index; - assert_eq!(start, 7); + let checkpoint = reader.checkpoint(); + assert_eq!(checkpoint, 7); assert_eq!(reader.peek(), Some('✨' as u32)); reader.advance(); @@ -140,7 +140,7 @@ mod test { reader.advance(); assert_eq!(reader.peek(), None); - reader.rewind(start); + reader.rewind(checkpoint); assert_eq!(reader.peek(), Some('✨' as u32)); } } @@ -153,7 +153,7 @@ mod test { assert!(unicode_reader.eat('𠮷')); // Can eat assert!(unicode_reader.eat2('野', '家')); - let start = unicode_reader.index; + let checkpoint = unicode_reader.checkpoint(); assert!(unicode_reader.eat('は')); // Emoji + Skin tone @@ -165,7 +165,7 @@ mod test { assert_eq!(unicode_reader.peek2(), Some('ち' as u32)); assert_eq!(unicode_reader.peek3(), None); - unicode_reader.rewind(start); + unicode_reader.rewind(checkpoint); assert!(unicode_reader.eat('は')); let mut legacy_reader = Reader::new(source_text, false); @@ -177,7 +177,7 @@ mod test { assert!(legacy_reader.eat('野')); assert!(legacy_reader.eat('家')); - let start = unicode_reader.index; + let checkpoint = unicode_reader.checkpoint(); assert!(legacy_reader.eat('は')); legacy_reader.advance(); @@ -190,7 +190,7 @@ mod test { assert_eq!(legacy_reader.peek3(), Some('ち' as u32)); assert!(legacy_reader.eat3('あ', 'っ', 'ち')); - legacy_reader.rewind(start); + legacy_reader.rewind(checkpoint); assert!(legacy_reader.eat('は')); } From d98e61bd5518a86cbe4f57c75cc47cec7ff6b173 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 3 Jul 2024 13:34:23 +0900 Subject: [PATCH 038/143] Split module files --- .../src/parser/body_parser/parser/atom.rs | 40 ++++++++++++ .../src/parser/body_parser/parser/misc.rs | 24 +++++++ .../src/parser/body_parser/parser/mod.rs | 5 ++ .../{parser.rs => parser/parse.rs} | 64 +------------------ 4 files changed, 72 insertions(+), 61 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs rename crates/oxc_regexp_parser/src/parser/body_parser/{parser.rs => parser/parse.rs} (90%) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs new file mode 100644 index 0000000000000..18640b30bf2f9 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -0,0 +1,40 @@ +use crate::{ast, parser::body_parser::unicode}; + +impl<'a> super::parse::PatternParser<'a> { + // ``` + // PatternCharacter :: + // SourceCharacter but not SyntaxCharacter + // ``` + // + // ``` + // SyntaxCharacter :: one of + // ^ $ \ . * + ? ( ) [ ] { } | + // ``` + // + pub(super) fn consume_pattern_character(&mut self) -> Option { + let span_start = self.reader.span_position(); + + let cp = self.reader.peek()?; + if unicode::is_syntax_character(cp) { + return None; + } + + self.reader.advance(); + Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }) + } + + pub(super) fn consume_dot(&mut self) -> Option { + let span_start = self.reader.span_position(); + + if !self.reader.eat('.') { + return None; + } + + Some(ast::AnyCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + }) + } +} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs new file mode 100644 index 0000000000000..61a5ecc10b2c9 --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -0,0 +1,24 @@ +use crate::parser::body_parser::unicode; + +impl<'a> super::parse::PatternParser<'a> { + pub(super) fn consume_decimal_digits(&mut self) -> Option { + let span_start = self.reader.span_position(); + + let mut value = 0; + while let Some(cp) = self.reader.peek() { + if !unicode::is_decimal_digits(cp) { + break; + } + + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + if self.reader.span_position() != span_start { + return Some(value); + } + + None + } +} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs new file mode 100644 index 0000000000000..ad529b8fd776f --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -0,0 +1,5 @@ +mod atom; +mod misc; +mod parse; + +pub use parse::PatternParser; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs similarity index 90% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser.rs rename to crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index f273b61316253..f40bf5f7e24f3 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -4,7 +4,7 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, parser::{ - body_parser::{reader::Reader, state::ParserState, unicode}, + body_parser::{reader::Reader, state::ParserState}, options::ParserOptions, span::SpanFactory, }, @@ -13,8 +13,8 @@ use crate::{ pub struct PatternParser<'a> { allocator: &'a Allocator, source_text: &'a str, - span_factory: SpanFactory, - reader: Reader<'a>, + pub(super) span_factory: SpanFactory, + pub(super) reader: Reader<'a>, _state: ParserState, } @@ -391,64 +391,6 @@ impl<'a> PatternParser<'a> { Ok(None) } - - // ``` - // PatternCharacter :: - // SourceCharacter but not SyntaxCharacter - // ``` - // - // ``` - // SyntaxCharacter :: one of - // ^ $ \ . * + ? ( ) [ ] { } | - // ``` - // - fn consume_pattern_character(&mut self) -> Option { - let span_start = self.reader.span_position(); - - let cp = self.reader.peek()?; - if unicode::is_syntax_character(cp) { - return None; - } - - self.reader.advance(); - Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }) - } - - fn consume_dot(&mut self) -> Option { - let span_start = self.reader.span_position(); - - if !self.reader.eat('.') { - return None; - } - - Some(ast::AnyCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - }) - } - - fn consume_decimal_digits(&mut self) -> Option { - let span_start = self.reader.span_position(); - - let mut value = 0; - while let Some(cp) = self.reader.peek() { - if !unicode::is_decimal_digits(cp) { - break; - } - - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - if self.reader.span_position() != span_start { - return Some(value); - } - - None - } } #[cfg(test)] From b991a81bb732789ae4625501ebe3cf3554f513b5 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 3 Jul 2024 17:09:28 +0900 Subject: [PATCH 039/143] Wip \atom_escape --- crates/oxc_regexp_parser/src/ast.rs | 15 +++- .../src/parser/body_parser/parser/atom.rs | 81 +++++++++++++++---- .../src/parser/body_parser/parser/misc.rs | 24 ++++++ .../src/parser/body_parser/parser/parse.rs | 44 +++------- .../src/parser/body_parser/reader.rs | 4 +- .../src/parser/body_parser/unicode.rs | 5 ++ 6 files changed, 119 insertions(+), 54 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 92e18ed224271..8832a11745199 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -99,13 +99,14 @@ pub struct LookbehindAssertion<'a> { /// The type which includes all atom nodes that Quantifier node can have as children. #[derive(Debug)] pub enum QuantifiableElement<'a> { - Backreference(Box<'a, Backreference<'a>>), - CapturingGroup(Box<'a, CapturingGroup<'a>>), Character(Box<'a, Character>), - CharacterClass(Box<'a, CharacterClass<'a>>), CharacterSet(Box<'a, CharacterSet<'a>>), + CharacterClass(Box<'a, CharacterClass<'a>>), ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + Backreference(Box<'a, Backreference<'a>>), + CapturingGroup(Box<'a, CapturingGroup<'a>>), Group(Box<'a, Group<'a>>), + // NOTE: Is this really necessary? LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), } @@ -115,6 +116,7 @@ pub enum QuantifiableElement<'a> { pub enum Backreference<'a> { AmbiguousBackreference(Box<'a, AmbiguousBackreference<'a>>), UnambiguousBackreference(Box<'a, UnambiguousBackreference<'a>>), + TemporaryBackreference(Box<'a, TemporaryBackreference<'a>>), } #[derive(Debug)] @@ -131,6 +133,13 @@ pub struct UnambiguousBackreference<'a> { pub resolved: CapturingGroup<'a>, } +/// Not yet resolved backreference. +#[derive(Debug)] +pub struct TemporaryBackreference<'a> { + pub span: Span, + pub r#ref: Atom<'a>, // `\k` +} + /// The capturing group. /// E.g. `(ab)`, `(?ab)` #[derive(Debug)] diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 18640b30bf2f9..879d810ed9e5e 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -1,3 +1,7 @@ +use oxc_allocator::Box; +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Atom; + use crate::{ast, parser::body_parser::unicode}; impl<'a> super::parse::PatternParser<'a> { @@ -6,35 +10,78 @@ impl<'a> super::parse::PatternParser<'a> { // SourceCharacter but not SyntaxCharacter // ``` // - // ``` - // SyntaxCharacter :: one of - // ^ $ \ . * + ? ( ) [ ] { } | - // ``` - // - pub(super) fn consume_pattern_character(&mut self) -> Option { - let span_start = self.reader.span_position(); - + pub(super) fn consume_pattern_character(&mut self) -> Option> { let cp = self.reader.peek()?; if unicode::is_syntax_character(cp) { return None; } + let span_start = self.reader.span_position(); self.reader.advance(); - Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }) + + Some(ast::QuantifiableElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }, + self.allocator, + ))) } - pub(super) fn consume_dot(&mut self) -> Option { + pub(super) fn consume_dot(&mut self) -> Option> { let span_start = self.reader.span_position(); - if !self.reader.eat('.') { return None; } - Some(ast::AnyCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - }) + Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + ast::CharacterSet::AnyCharacterSet(Box::new_in( + ast::AnyCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + }, + self.allocator, + )), + self.allocator, + ))) + } + + // ``` + // AtomEscape[UnicodeMode, NamedCaptureGroups] :: + // DecimalEscape + // CharacterClassEscape[?UnicodeMode] + // CharacterEscape[?UnicodeMode] + // [+NamedCaptureGroups] k GroupName[?UnicodeMode] + // ``` + // + pub(super) fn consume_reverse_solidus_atom_escape( + &mut self, + ) -> Result>> { + let span_start = self.reader.span_position(); + if !self.reader.eat('\\') { + return Ok(None); + } + + // `DecimalEscape`: `\1` means Backreference + if self.consume_decimal_escape().is_some() { + let span_end = self.reader.span_position(); + + return Ok(Some(ast::QuantifiableElement::Backreference(Box::new_in( + ast::Backreference::TemporaryBackreference(Box::new_in( + ast::TemporaryBackreference { + span: self.span_factory.create(span_start, span_end), + r#ref: Atom::from(&self.source_text[span_start..span_end]), + }, + self.allocator, + )), + self.allocator, + )))); + } + + // TODO: Implement + // if let Some(_) = self.consume_character_class_escape() {} + // if let Some(_) = self.consume_character_escape() {} + // if let Some(_) = self.consume_k_group_name() {} + + Err(OxcDiagnostic::error("Invalid escape")) } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs index 61a5ecc10b2c9..3fffc377b9045 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -21,4 +21,28 @@ impl<'a> super::parse::PatternParser<'a> { None } + + // ``` + // DecimalEscape :: + // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] + // ``` + pub(super) fn consume_decimal_escape(&mut self) -> Option { + if unicode::is_non_zero_digit(self.reader.peek()?) { + let mut value = 0; + + while let Some(cp) = self.reader.peek() { + if !unicode::is_decimal_digits(cp) { + break; + } + + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + return Some(value); + } + + None + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index f40bf5f7e24f3..988493f54f751 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -11,8 +11,8 @@ use crate::{ }; pub struct PatternParser<'a> { - allocator: &'a Allocator, - source_text: &'a str, + pub(super) allocator: &'a Allocator, + pub(super) source_text: &'a str, pub(super) span_factory: SpanFactory, pub(super) reader: Reader<'a>, _state: ParserState, @@ -47,15 +47,11 @@ impl<'a> PatternParser<'a> { // fn consume_pattern(&mut self) -> Result> { let span_start = self.reader.span_position(); - // TODO: Read only constants - // this._numCapturingParens = this.countCapturingParens(); // TODO: Define state, use later somewhere // this._groupSpecifiers.clear(); // TODO: Define state, use later here // this._backreferenceNames.clear(); - // TODO: Maybe useless? - // this.onPatternEnter(start); let alternatives = self.consume_disjunction()?; if self.reader.peek().is_some() { @@ -70,7 +66,6 @@ impl<'a> PatternParser<'a> { } return Err(OxcDiagnostic::error("Unexpected character")); } - // TODO: Implement // for (const name of this._backreferenceNames) { // if (!this._groupSpecifiers.hasInPattern(name)) { @@ -83,7 +78,7 @@ impl<'a> PatternParser<'a> { alternatives, }; - // TODO: Implement fix up for back references + // TODO: Implement, finalize backreferences with captured groups // this.onPatternLeave(start, this.index); Ok(pattern) @@ -305,30 +300,15 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_atom(&mut self) -> Result>> { - if let Some(character) = self.consume_pattern_character() { - return Ok(Some(ast::QuantifiableElement::Character(Box::new_in( - character, - self.allocator, - )))); - } - if let Some(any_character_set) = self.consume_dot() { - return Ok(Some(ast::QuantifiableElement::CharacterSet(Box::new_in( - ast::CharacterSet::AnyCharacterSet(Box::new_in(any_character_set, self.allocator)), - self.allocator, - )))); - } - - // TODO: Implement - if self.reader.eat('👻') { - return Err(OxcDiagnostic::error("TODO")); - } - - // if self.consume_reverse_solidus_atom_escape() {} - // if self.consume_character_class() {} - // if self.consume_capturing_group() {} - // if self.consume_uncapturing_group() {} - - Ok(None) + Ok(self + .consume_pattern_character() + .or(self.consume_dot()) + .or(self.consume_reverse_solidus_atom_escape()?) + // TODO: Implement + // self.consume_character_class() + // self.consume_capturing_group() + // self.consume_uncapturing_group() + .or(None)) } // ``` diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs index 0471d70af7939..916406d4e0982 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs @@ -39,8 +39,8 @@ impl<'a> Reader<'a> { pub fn checkpoint(&self) -> usize { self.index } - pub fn rewind(&mut self, index: usize) { - self.index = index; + pub fn rewind(&mut self, checkpoint: usize) { + self.index = checkpoint; } pub fn advance(&mut self) { diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index 25da8e640e5ef..73e82360eef11 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -11,3 +11,8 @@ pub fn is_decimal_digits(c: u32) -> bool { char::from_u32(c) .map_or(false, |c| matches!(c, '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')) } + +pub fn is_non_zero_digit(c: u32) -> bool { + char::from_u32(c) + .map_or(false, |c| matches!(c, '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')) +} From 7e4cbc9c61d28f8c6808424894474043249c9daf Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 4 Jul 2024 13:24:44 +0900 Subject: [PATCH 040/143] Wip AtomEscape/CharacterEscape --- Cargo.lock | 1 + crates/oxc_regexp_parser/Cargo.toml | 3 +- crates/oxc_regexp_parser/examples/parser.rs | 2 + .../src/parser/body_parser/parser/atom.rs | 93 ++++++++++++++++++- .../src/parser/body_parser/parser/misc.rs | 25 +++++ .../src/parser/body_parser/parser/parse.rs | 21 +++-- .../src/parser/body_parser/state.rs | 19 +++- .../src/parser/body_parser/unicode.rs | 37 ++++++-- .../src/parser/literal_parser.rs | 5 +- .../oxc_regexp_parser/src/parser/options.rs | 15 +-- 10 files changed, 185 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c59cb67f4f2f1..d0daec18e6bcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1676,6 +1676,7 @@ dependencies = [ "oxc_diagnostics", "oxc_span", "rustc-hash", + "unicode-id-start", ] [[package]] diff --git a/crates/oxc_regexp_parser/Cargo.toml b/crates/oxc_regexp_parser/Cargo.toml index e3f28cde517a5..3e3704d3e9e04 100644 --- a/crates/oxc_regexp_parser/Cargo.toml +++ b/crates/oxc_regexp_parser/Cargo.toml @@ -24,4 +24,5 @@ oxc_allocator = { workspace = true } oxc_diagnostics = { workspace = true } oxc_span = { workspace = true } -rustc-hash = { workspace = true } +rustc-hash = { workspace = true } +unicode-id-start = { workspace = true } diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index ffc19b1daf7a0..05de6f93e0b14 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -15,6 +15,8 @@ fn main() { ("/a|b+|c/i", ParserOptions::default()), ("/a{0}|b{1,2}|c{3,}/i", ParserOptions::default()), ("/(?=a)|(?<=b)|(?!c)|(? super::parse::PatternParser<'a> { return Ok(None); } - // `DecimalEscape`: `\1` means Backreference + // `DecimalEscape`: \1 means Backreference if self.consume_decimal_escape().is_some() { let span_end = self.reader.span_position(); @@ -79,9 +79,98 @@ impl<'a> super::parse::PatternParser<'a> { // TODO: Implement // if let Some(_) = self.consume_character_class_escape() {} - // if let Some(_) = self.consume_character_escape() {} + + if let Some(cp) = self.consume_character_escape()? { + return Ok(Some(ast::QuantifiableElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }, + self.allocator, + )))); + } + + // TODO: Implement // if let Some(_) = self.consume_k_group_name() {} Err(OxcDiagnostic::error("Invalid escape")) } + + // ``` + // CharacterEscape[UnicodeMode] :: + // ControlEscape + // c AsciiLetter + // 0 [lookahead ∉ DecimalDigit] + // HexEscapeSequence + // RegExpUnicodeEscapeSequence[?UnicodeMode] + // IdentityEscape[?UnicodeMode] + // ``` + // + fn consume_character_escape(&mut self) -> Result> { + // e.g. \n + if let Some(control_escape) = self.reader.peek().and_then(unicode::map_control_escape) { + self.reader.advance(); + return Ok(Some(control_escape)); + } + + // e.g. \cM + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('c') { + if let Some(c_ascii_letter) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { + self.reader.advance(); + return Ok(Some(c_ascii_letter)); + } + self.reader.rewind(checkpoint); + } + + // e.g. \0 + if self.reader.peek().map_or(false, |cp| cp == '0' as u32) + && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) + { + self.reader.advance(); + return Ok(Some(0x00)); + } + + // e.g. \x41 + if self.reader.eat('x') { + if let Some(hex) = self.consume_fixed_hex_digits(2) { + return Ok(Some(hex)); + } + return Err(OxcDiagnostic::error("Invalid escape")); + } + + // e.g. \u{1f600} + // TODO: Implement + // this.eatRegExpUnicodeEscapeSequence(false) + + // e.g. \. + if let Some(identity_escape) = self.consume_identity_escape() { + return Ok(Some(identity_escape)); + } + + Ok(None) + } + + // ``` + // IdentityEscape[UnicodeMode] :: + // [+UnicodeMode] SyntaxCharacter + // [+UnicodeMode] / + // [~UnicodeMode] SourceCharacter but not UnicodeIDContinue + // ``` + // + fn consume_identity_escape(&mut self) -> Option { + let cp = self.reader.peek()?; + + if self.state.is_unicode_mode() && (unicode::is_syntax_character(cp) || cp == '/' as u32) { + self.reader.advance(); + return Some(cp); + } + + if !unicode::is_id_continue(cp) { + self.reader.advance(); + return Some(cp); + } + + None + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs index 3fffc377b9045..474a56ff600df 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -1,6 +1,13 @@ use crate::parser::body_parser::unicode; impl<'a> super::parse::PatternParser<'a> { + // ``` + // DecimalDigits[Sep] :: + // DecimalDigit + // DecimalDigits[?Sep] DecimalDigit + // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit + // ``` + // pub(super) fn consume_decimal_digits(&mut self) -> Option { let span_start = self.reader.span_position(); @@ -26,6 +33,7 @@ impl<'a> super::parse::PatternParser<'a> { // DecimalEscape :: // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] // ``` + // pub(super) fn consume_decimal_escape(&mut self) -> Option { if unicode::is_non_zero_digit(self.reader.peek()?) { let mut value = 0; @@ -45,4 +53,21 @@ impl<'a> super::parse::PatternParser<'a> { None } + + pub(super) fn consume_fixed_hex_digits(&mut self, len: usize) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + for _ in 0..len { + let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) else { + self.reader.rewind(checkpoint); + return None; + }; + + value = (16 * value) + hex; + self.reader.advance(); + } + + Some(value) + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 988493f54f751..4920328e69dba 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -4,7 +4,7 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, parser::{ - body_parser::{reader::Reader, state::ParserState}, + body_parser::{reader::Reader, state::State}, options::ParserOptions, span::SpanFactory, }, @@ -15,17 +15,20 @@ pub struct PatternParser<'a> { pub(super) source_text: &'a str, pub(super) span_factory: SpanFactory, pub(super) reader: Reader<'a>, - _state: ParserState, + pub(super) state: State, } impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + let unicode_mode = options.unicode_flag || options.unicode_sets_flag; + let unicode_sets_mode = options.unicode_sets_flag; + Self { allocator, source_text, span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(source_text, options.is_unicode_mode()), - _state: ParserState, + reader: Reader::new(source_text, unicode_mode), + state: State::new(unicode_mode, unicode_sets_mode), } } @@ -36,6 +39,7 @@ impl<'a> PatternParser<'a> { // TODO: Remove later, just for clippy unused self.reader.eat3('a', 'b', 'c'); + self.state.is_unicode_sets_mode(); self.consume_pattern() } @@ -397,12 +401,13 @@ mod test { "a+b*?c{1}d{2,}e{3,4}?", r"^(?=ab)\b(?!cd)(?<=ef)\B(? Self { + Self { unicode_mode, unicode_sets_mode } + } + + pub fn is_unicode_mode(&self) -> bool { + self.unicode_mode + } + pub fn is_unicode_sets_mode(&self) -> bool { + self.unicode_sets_mode + } +} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index 73e82360eef11..e4ad58b3b0810 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -1,5 +1,5 @@ -pub fn is_syntax_character(c: u32) -> bool { - char::from_u32(c).map_or(false, |c| { +pub fn is_syntax_character(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| { matches!( c, '^' | '$' | '\\' | '.' | '*' | '+' | '?' | '(' | ')' | '[' | ']' | '{' | '}' | '|' @@ -7,12 +7,33 @@ pub fn is_syntax_character(c: u32) -> bool { }) } -pub fn is_decimal_digits(c: u32) -> bool { - char::from_u32(c) - .map_or(false, |c| matches!(c, '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')) +pub fn is_decimal_digits(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c.is_ascii_digit()) } -pub fn is_non_zero_digit(c: u32) -> bool { - char::from_u32(c) - .map_or(false, |c| matches!(c, '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')) +pub fn is_non_zero_digit(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c != '0' && c.is_ascii_digit()) +} + +pub fn is_id_continue(cp: u32) -> bool { + char::from_u32(cp).map_or(false, unicode_id_start::is_id_continue_unicode) +} + +pub fn map_control_escape(cp: u32) -> Option { + match char::from_u32(cp) { + Some('f') => Some(0x0c), + Some('n') => Some(0x0a), + Some('r') => Some(0x0d), + Some('t') => Some(0x09), + Some('v') => Some(0x0b), + _ => None, + } +} + +pub fn map_c_ascii_letter(cp: u32) -> Option { + char::from_u32(cp).and_then(|c| c.is_ascii_alphabetic().then_some(cp % 0x20)) +} + +pub fn map_hex_digit(cp: u32) -> Option { + char::from_u32(cp).filter(char::is_ascii_hexdigit).and_then(|c| c.to_digit(16)) } diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/parser/literal_parser.rs index 1a83e176801b6..4f2be9dae227f 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/parser/literal_parser.rs @@ -42,16 +42,13 @@ impl<'a> Parser<'a> { .parse()?; // Then parse the pattern with the flags - let unicode_mode = flags.unicode || flags.unicode_sets; - let unicode_sets_mode = flags.unicode_sets; - let pattern = PatternParser::new( self.allocator, &self.source_text[body_start_offset..body_end_offset], #[allow(clippy::cast_possible_truncation)] self.options .with_span_offset(self.options.span_offset + body_start_offset as u32) - .with_modes(unicode_mode, unicode_sets_mode), + .with_unicode_flags(flags.unicode, flags.unicode_sets), ) .parse()?; diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/parser/options.rs index 9c998d25622f3..aff5ad02c4fa7 100644 --- a/crates/oxc_regexp_parser/src/parser/options.rs +++ b/crates/oxc_regexp_parser/src/parser/options.rs @@ -3,9 +3,9 @@ pub struct ParserOptions { /// Used to adjust Span pos to the global source code. pub span_offset: u32, /// The same as `u` flag. - unicode_flag: bool, + pub unicode_flag: bool, /// The same as `v` flag, it extends `u` flag behavior. - unicode_sets_flag: bool, + pub unicode_sets_flag: bool, // Not planning to implement // pub strict: bool, // pub ecma_version: u32, // or Enum? @@ -18,14 +18,9 @@ impl ParserOptions { } #[must_use] - pub fn with_modes(self, unicode_flag: bool, unicode_sets_flag: bool) -> ParserOptions { + /// Only for using `PattenrParser` alone usage. + /// `FlagParser` does not use, (Literal)`Parser` internally updates these value with parsed flags. + pub fn with_unicode_flags(self, unicode_flag: bool, unicode_sets_flag: bool) -> ParserOptions { ParserOptions { unicode_flag, unicode_sets_flag, ..self } } - - pub fn is_unicode_mode(&self) -> bool { - self.unicode_flag || self.unicode_sets_flag - } - pub fn is_unicode_sets_mode(&self) -> bool { - self.unicode_sets_flag - } } From dcdb934cd4bfd42a16ec7c6d78bcf64d81580c7c Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 4 Jul 2024 14:08:26 +0900 Subject: [PATCH 041/143] Add notes --- crates/oxc_regexp_parser/src/ast.rs | 1 + crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 8832a11745199..8c6d9f83bbbf1 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -21,6 +21,7 @@ pub struct Pattern<'a> { #[derive(Debug)] pub struct Alternative<'a> { pub span: Span, + // NOTE: `terms: Vec<'a, Term<'a>>` ? pub elements: Vec<'a, Element<'a>>, } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 4920328e69dba..25958614ae9ee 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -107,7 +107,6 @@ impl<'a> PatternParser<'a> { if !self.reader.eat('|') { break; } - i += 1; } From 1d05ed71948cb22ae4ce5a4c6ae9fb9a10ab07a9 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 4 Jul 2024 16:48:26 +0900 Subject: [PATCH 042/143] Complete \AtomEscape/CharacterEscape --- crates/oxc_regexp_parser/examples/parser.rs | 2 +- .../src/parser/body_parser/parser/atom.rs | 90 ++++++++++++++++++- .../src/parser/body_parser/parser/misc.rs | 20 ++++- .../src/parser/body_parser/parser/parse.rs | 21 ++++- .../src/parser/body_parser/unicode.rs | 16 ++++ 5 files changed, 139 insertions(+), 10 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 05de6f93e0b14..3a6fdd693f332 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -16,7 +16,7 @@ fn main() { ("/a{0}|b{1,2}|c{3,}/i", ParserOptions::default()), ("/(?=a)|(?<=b)|(?!c)|(? super::parse::PatternParser<'a> { // e.g. \x41 if self.reader.eat('x') { - if let Some(hex) = self.consume_fixed_hex_digits(2) { - return Ok(Some(hex)); + if let Some(hex_digits) = self.consume_fixed_hex_digits(2) { + return Ok(Some(hex_digits)); } return Err(OxcDiagnostic::error("Invalid escape")); } // e.g. \u{1f600} - // TODO: Implement - // this.eatRegExpUnicodeEscapeSequence(false) + if let Some(reg_exp_unicode_escape_sequence) = + self.consume_reg_exp_unicode_escape_sequence()? + { + return Ok(Some(reg_exp_unicode_escape_sequence)); + } // e.g. \. if let Some(identity_escape) = self.consume_identity_escape() { @@ -151,6 +154,85 @@ impl<'a> super::parse::PatternParser<'a> { Ok(None) } + // ``` + // RegExpUnicodeEscapeSequence[UnicodeMode] :: + // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate + // [+UnicodeMode] u HexLeadSurrogate + // [+UnicodeMode] u HexTrailSurrogate + // [+UnicodeMode] u HexNonSurrogate + // [~UnicodeMode] u Hex4Digits + // [+UnicodeMode] u{ CodePoint } + // ``` + // + fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { + if !self.reader.eat('u') { + return Ok(None); + } + + if self.state.is_unicode_mode() { + let checkpoint = self.reader.checkpoint(); + + // HexLeadSurrogate + HexTrailSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if self.reader.eat2('\\', 'u') { + if let Some(trail_surrogate) = self + .consume_fixed_hex_digits(4) + .filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + self.reader.rewind(checkpoint); + + // NOTE: `regexpp` seems not to support these 2 cases, why...? + + // HexLeadSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + return Ok(Some(lead_surrogate)); + } + self.reader.rewind(checkpoint); + + // HexTrailSurrogate + if let Some(trail_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(trail_surrogate)); + } + self.reader.rewind(checkpoint); + } + + // HexNonSurrogate and Hex4Digits are the same + if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { + return Ok(Some(hex_digits)); + } + + // {CodePoint} + if self.state.is_unicode_mode() { + let checkpoint = self.reader.checkpoint(); + + if self.reader.eat('{') { + if let Some(hex_digits) = + self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) + { + if self.reader.eat('}') { + return Ok(Some(hex_digits)); + } + } + } + self.reader.rewind(checkpoint); + } + + Err(OxcDiagnostic::error("Invalid unicode escape")) + } + // ``` // IdentityEscape[UnicodeMode] :: // [+UnicodeMode] SyntaxCharacter diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs index 474a56ff600df..9eae24605b571 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -9,7 +9,7 @@ impl<'a> super::parse::PatternParser<'a> { // ``` // pub(super) fn consume_decimal_digits(&mut self) -> Option { - let span_start = self.reader.span_position(); + let checkpoint = self.reader.checkpoint(); let mut value = 0; while let Some(cp) = self.reader.peek() { @@ -22,7 +22,7 @@ impl<'a> super::parse::PatternParser<'a> { self.reader.advance(); } - if self.reader.span_position() != span_start { + if self.reader.checkpoint() != checkpoint { return Some(value); } @@ -54,6 +54,22 @@ impl<'a> super::parse::PatternParser<'a> { None } + pub(super) fn consume_hex_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { + value = (16 * value) + hex; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } + pub(super) fn consume_fixed_hex_digits(&mut self, len: usize) -> Option { let checkpoint = self.reader.checkpoint(); diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 25958614ae9ee..19add1da2f966 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -400,7 +400,7 @@ mod test { "a+b*?c{1}d{2,}e{3,4}?", r"^(?=ab)\b(?!cd)(?<=ef)\B(? bool { char::from_u32(cp).map_or(false, unicode_id_start::is_id_continue_unicode) } +pub fn is_valid_unicode(cp: u32) -> bool { + (0..=0x0010_ffff).contains(&cp) +} + +pub fn is_lead_surrogate(cp: u32) -> bool { + (0xd800..=0xdbff).contains(&cp) +} + +pub fn is_trail_surrogate(cp: u32) -> bool { + (0xdc00..=0xdfff).contains(&cp) +} + +pub fn combine_surrogate_pair(lead: u32, trail: u32) -> u32 { + (lead - 0xd800) * 0x400 + trail - 0xdc00 + 0x10000 +} + pub fn map_control_escape(cp: u32) -> Option { match char::from_u32(cp) { Some('f') => Some(0x0c), From 37765c9672a9111154814e422edd836bf8e0b306 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 5 Jul 2024 10:57:13 +0900 Subject: [PATCH 043/143] Small fixes --- crates/oxc_regexp_parser/examples/parser.rs | 1 + .../src/parser/body_parser/parser/atom.rs | 20 +++- .../src/parser/body_parser/parser/mod.rs | 92 ++++++++++++++++++ .../src/parser/body_parser/parser/parse.rs | 96 +------------------ .../oxc_regexp_parser/src/parser/options.rs | 4 +- 5 files changed, 114 insertions(+), 99 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 3a6fdd693f332..39069605976a5 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -16,6 +16,7 @@ fn main() { ("/a{0}|b{1,2}|c{3,}/i", ParserOptions::default()), ("/(?=a)|(?<=b)|(?!c)|(? super::parse::PatternParser<'a> { // ``` // pub(super) fn consume_pattern_character(&mut self) -> Option> { + let span_start = self.reader.span_position(); + let cp = self.reader.peek()?; if unicode::is_syntax_character(cp) { return None; } - - let span_start = self.reader.span_position(); self.reader.advance(); Some(ast::QuantifiableElement::Character(Box::new_in( @@ -96,6 +96,22 @@ impl<'a> super::parse::PatternParser<'a> { Err(OxcDiagnostic::error("Invalid escape")) } + // ``` + // CharacterClassEscape[UnicodeMode] :: + // d + // D + // s + // S + // w + // W + // [+UnicodeMode] p{ UnicodePropertyValueExpression } + // [+UnicodeMode] P{ UnicodePropertyValueExpression } + // ``` + // + // fn consume_character_class_escape(&mut self) -> Option { + // None + // } + // ``` // CharacterEscape[UnicodeMode] :: // ControlEscape diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index ad529b8fd776f..4f59000078769 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -3,3 +3,95 @@ mod misc; mod parse; pub use parse::PatternParser; + +#[cfg(test)] +mod test { + use crate::{ParserOptions, PatternParser}; + use oxc_allocator::Allocator; + + // NOTE: These may be useless when integlation tests are added + #[test] + fn should_pass() { + let allocator = Allocator::default(); + + for (source_text, options) in &[ + ("a", ParserOptions::default()), + ("a+", ParserOptions::default()), + ("a*", ParserOptions::default()), + ("a?", ParserOptions::default()), + ("a{1}", ParserOptions::default()), + ("a{1,}", ParserOptions::default()), + ("a{1,2}", ParserOptions::default()), + ("a|b", ParserOptions::default()), + ("a|b|c", ParserOptions::default()), + ("a|b+?|c", ParserOptions::default()), + ("a+b*?c{1}d{2,}e{3,4}?", ParserOptions::default()), + (r"^(?=ab)\b(?!cd)(?<=ef)\B(? PatternParser<'a> { // { DecimalDigits , DecimalDigits } // ``` // + /// Returns: `((min, max?), greedy)` #[allow(clippy::type_complexity)] fn consume_quantifier(&mut self) -> Result), bool)>> { let is_greedy = |reader: &mut Reader| !reader.eat('?'); @@ -375,98 +376,3 @@ impl<'a> PatternParser<'a> { Ok(None) } } - -#[cfg(test)] -mod test { - use super::*; - use oxc_allocator::Allocator; - - // NOTE: These may be useless when integlation tests are added - #[test] - fn should_pass() { - let allocator = Allocator::default(); - - for source_text in &[ - "a", - "a+", - "a*", - "a?", - "a{1}", - "a{1,}", - "a{1,2}", - "a|b", - "a|b|c", - "a|b+?|c", - "a+b*?c{1}d{2,}e{3,4}?", - r"^(?=ab)\b(?!cd)(?<=ef)\B(? ParserOptions { ParserOptions { unicode_flag, unicode_sets_flag, ..self } } From d17d1b0c50030431029960bb015ff785ed009bfe Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 5 Jul 2024 12:49:45 +0900 Subject: [PATCH 044/143] Fix bug --- .../src/parser/body_parser/parser/atom.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 2f04b00d7c419..6254dd3cc33bc 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -259,9 +259,13 @@ impl<'a> super::parse::PatternParser<'a> { fn consume_identity_escape(&mut self) -> Option { let cp = self.reader.peek()?; - if self.state.is_unicode_mode() && (unicode::is_syntax_character(cp) || cp == '/' as u32) { - self.reader.advance(); - return Some(cp); + if self.state.is_unicode_mode() { + if (unicode::is_syntax_character(cp) || cp == '/' as u32) { + self.reader.advance(); + return Some(cp); + } + + return None; } if !unicode::is_id_continue(cp) { From f1699a8e98b6c5a99c1d84df4353f4ea442e629f Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 5 Jul 2024 19:34:43 +0900 Subject: [PATCH 045/143] Wip unicode property escape --- .../src/parser/body_parser/mod.rs | 1 + .../src/parser/body_parser/parser/atom.rs | 195 +++++++++++++++++- .../parser/body_parser/unicode_property.rs | 35 ++++ 3 files changed, 224 insertions(+), 7 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs index 2a63480bd746d..98e6044b44acc 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs @@ -2,5 +2,6 @@ mod parser; mod reader; mod state; mod unicode; +mod unicode_property; pub use parser::PatternParser; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 6254dd3cc33bc..bb13f556085a7 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -2,7 +2,10 @@ use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom; -use crate::{ast, parser::body_parser::unicode}; +use crate::{ + ast, + parser::body_parser::{unicode, unicode_property}, +}; impl<'a> super::parse::PatternParser<'a> { // ``` @@ -77,8 +80,52 @@ impl<'a> super::parse::PatternParser<'a> { )))); } - // TODO: Implement - // if let Some(_) = self.consume_character_class_escape() {} + if let Some((kind, negate)) = self.consume_character_class_escape() { + return Ok(Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + ast::CharacterSet::EscapeCharacterSet(Box::new_in( + ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind, + negate, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.state.is_unicode_mode() { + if let Some(((name, value, negate), is_strings_related)) = + self.consume_character_class_escape_unicode()? + { + let span = self.span_factory.create(span_start, self.reader.span_position()); + return Ok(Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + ast::CharacterSet::UnicodePropertyCharacterSet(Box::new_in( + if is_strings_related { + ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet( + Box::new_in( + ast::StringsUnicodePropertyCharacterSet { span, key: name }, + self.allocator, + ), + ) + } else { + ast::UnicodePropertyCharacterSet::CharacterUnicodePropertyCharacterSet( + Box::new_in( + ast::CharacterUnicodePropertyCharacterSet { + span, + key: name, + value, + negate, + }, + self.allocator, + ), + ) + }, + self.allocator, + )), + self.allocator, + )))); + } + } if let Some(cp) = self.consume_character_escape()? { return Ok(Some(ast::QuantifiableElement::Character(Box::new_in( @@ -108,9 +155,143 @@ impl<'a> super::parse::PatternParser<'a> { // [+UnicodeMode] P{ UnicodePropertyValueExpression } // ``` // - // fn consume_character_class_escape(&mut self) -> Option { - // None - // } + /// Returns: `(kind, negate)` + fn consume_character_class_escape(&mut self) -> Option<(ast::EscapeCharacterSetKind, bool)> { + // NOTE: `mayContainStrings`? + if self.reader.eat('d') { + return Some((ast::EscapeCharacterSetKind::Digit, false)); + } + if self.reader.eat('D') { + return Some((ast::EscapeCharacterSetKind::Digit, true)); + } + if self.reader.eat('s') { + return Some((ast::EscapeCharacterSetKind::Space, false)); + } + if self.reader.eat('S') { + return Some((ast::EscapeCharacterSetKind::Space, true)); + } + if self.reader.eat('w') { + return Some((ast::EscapeCharacterSetKind::Word, false)); + } + if self.reader.eat('W') { + return Some((ast::EscapeCharacterSetKind::Word, true)); + } + + None + } + /// Returns: `((name, value, is_strings_related_unicode_property), negate)` + #[allow(clippy::type_complexity)] + fn consume_character_class_escape_unicode( + &mut self, + ) -> Result, Option>, bool), bool)>> { + let negate = if self.reader.eat('p') { + Some(false) + } else if self.reader.eat('P') { + Some(true) + } else { + None + }; + + if let Some(negate) = negate { + if self.reader.eat('{') { + if let Some((name, value, is_strings_related)) = + self.consume_unicode_property_value_expression()? + { + if negate && is_strings_related { + return Err(OxcDiagnostic::error("Invalid property name")); + } + if self.reader.eat('}') { + // NOTE: `mayContainStrings`? + return Ok(Some(((name, value, is_strings_related), negate))); + } + } + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + + Ok(None) + } + + // ``` + // UnicodePropertyValueExpression :: + // UnicodePropertyName = UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + // ``` + // + /// Returns: `(name, value, is_strings_related_unicode_property)` + fn consume_unicode_property_value_expression( + &mut self, + ) -> Result, Option>, bool)>> { + let checkpoint = self.reader.checkpoint(); + + // UnicodePropertyName=UnicodePropertyValue + if let Some(name) = self.consume_unicode_property_name() { + if self.reader.eat('=') { + if let Some(value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property(&name, &value) { + return Ok(Some((name, Some(value), false))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + } + } + self.reader.rewind(checkpoint); + + // LoneUnicodePropertyNameOrValue(=UnicodePropertyValueCharacters) + if let Some(name_or_value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { + return Ok(Some(("General_Category".into(), Some(name_or_value), false))); + } + + if unicode_property::is_valid_lone_unicode_property(&name_or_value) { + return Ok(Some((name_or_value, None, false))); + } + + // Extra checks to express explicit AST type for strings related Unicode property + // These properies are introduced with `unicode_sets_mode` + if self.state.is_unicode_sets_mode() + && unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) + { + return Ok(Some((name_or_value, None, true))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + + Ok(None) + } + + fn consume_unicode_property_name(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode_property::is_unicode_property_name_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(Atom::from(&self.source_text[span_start..self.reader.span_position()])) + } + + fn consume_unicode_property_value(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode_property::is_unicode_property_value_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(Atom::from(&self.source_text[span_start..self.reader.span_position()])) + } // ``` // CharacterEscape[UnicodeMode] :: @@ -260,7 +441,7 @@ impl<'a> super::parse::PatternParser<'a> { let cp = self.reader.peek()?; if self.state.is_unicode_mode() { - if (unicode::is_syntax_character(cp) || cp == '/' as u32) { + if unicode::is_syntax_character(cp) || cp == '/' as u32 { self.reader.advance(); return Some(cp); } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs new file mode 100644 index 0000000000000..cc2ec04135a7c --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs @@ -0,0 +1,35 @@ +// ``` +// UnicodePropertyNameCharacter :: +// AsciiLetter +// _ +// ``` +// +pub fn is_unicode_property_name_character(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c.is_ascii_alphabetic() || c == '_') +} + +// ``` +// UnicodePropertyValueCharacter :: +// UnicodePropertyNameCharacter +// DecimalDigit +// ``` +// +pub fn is_unicode_property_value_character(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c.is_ascii_alphanumeric() || c == '_') +} + +pub fn is_valid_unicode_property(name: &str, value: &str) -> bool { + // TODO: Implement + true +} + +pub fn is_valid_lone_unicode_property(name_or_value: &str) -> bool { + // TODO: Implement + true +} + +/// This should be used with `unicode_sets_mode` +pub fn is_valid_lone_unicode_property_of_strings(name_or_value: &str) -> bool { + // TODO: Implement + true +} From d1c0b3974102a9401b6d431bc8bbd084b144a276 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 5 Jul 2024 19:39:00 +0900 Subject: [PATCH 046/143] Fix typo --- crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index bb13f556085a7..0635f4439bf5b 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -250,7 +250,7 @@ impl<'a> super::parse::PatternParser<'a> { } // Extra checks to express explicit AST type for strings related Unicode property - // These properies are introduced with `unicode_sets_mode` + // These properties are introduced with `unicode_sets_mode` if self.state.is_unicode_sets_mode() && unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { From a14dfed4627b387d70120cb27dfc2c29ee4c4344 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 09:41:59 +0900 Subject: [PATCH 047/143] Add early errors as todos --- .../src/parser/body_parser/parser/atom.rs | 23 +++++++++------- .../src/parser/body_parser/parser/parse.rs | 1 - .../src/parser/body_parser/unicode.rs | 20 ++++++++++++++ .../parser/body_parser/unicode_property.rs | 26 +++---------------- 4 files changed, 37 insertions(+), 33 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 0635f4439bf5b..68b1766123327 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -202,7 +202,7 @@ impl<'a> super::parse::PatternParser<'a> { } if self.reader.eat('}') { // NOTE: `mayContainStrings`? - return Ok(Some(((name, value, is_strings_related), negate))); + return Ok(Some(((name, value, negate), is_strings_related))); } } } @@ -239,7 +239,7 @@ impl<'a> super::parse::PatternParser<'a> { } self.reader.rewind(checkpoint); - // LoneUnicodePropertyNameOrValue(=UnicodePropertyValueCharacters) + // LoneUnicodePropertyNameOrValue if let Some(name_or_value) = self.consume_unicode_property_value() { if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { return Ok(Some(("General_Category".into(), Some(name_or_value), false))); @@ -249,11 +249,16 @@ impl<'a> super::parse::PatternParser<'a> { return Ok(Some((name_or_value, None, false))); } - // Extra checks to express explicit AST type for strings related Unicode property - // These properties are introduced with `unicode_sets_mode` - if self.state.is_unicode_sets_mode() - && unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) - { + if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { + // Early errors: + // It is a Syntax Error + // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter + // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings + // - listed in the “Property name” column of Table 68. + if !self.state.is_unicode_sets_mode() { + return Err(OxcDiagnostic::error("Syntax Error")); + } + return Ok(Some((name_or_value, None, true))); } @@ -267,7 +272,7 @@ impl<'a> super::parse::PatternParser<'a> { let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); - while unicode_property::is_unicode_property_name_character(self.reader.peek()?) { + while unicode::is_unicode_property_name_character(self.reader.peek()?) { self.reader.advance(); } @@ -282,7 +287,7 @@ impl<'a> super::parse::PatternParser<'a> { let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); - while unicode_property::is_unicode_property_value_character(self.reader.peek()?) { + while unicode::is_unicode_property_value_character(self.reader.peek()?) { self.reader.advance(); } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 41017e3b2c717..46bba55a2fe2a 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -39,7 +39,6 @@ impl<'a> PatternParser<'a> { // TODO: Remove later, just for clippy unused self.reader.eat3('a', 'b', 'c'); - self.state.is_unicode_sets_mode(); self.consume_pattern() } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index 3ee15fda7e70d..386ba37d17d07 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -23,6 +23,26 @@ pub fn is_valid_unicode(cp: u32) -> bool { (0..=0x0010_ffff).contains(&cp) } +// ``` +// UnicodePropertyNameCharacter :: +// AsciiLetter +// _ +// ``` +// +pub fn is_unicode_property_name_character(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c.is_ascii_alphabetic() || c == '_') +} + +// ``` +// UnicodePropertyValueCharacter :: +// UnicodePropertyNameCharacter +// DecimalDigit +// ``` +// +pub fn is_unicode_property_value_character(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c.is_ascii_alphanumeric() || c == '_') +} + pub fn is_lead_surrogate(cp: u32) -> bool { (0xd800..=0xdbff).contains(&cp) } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs index cc2ec04135a7c..dccea49d889b8 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs @@ -1,35 +1,15 @@ -// ``` -// UnicodePropertyNameCharacter :: -// AsciiLetter -// _ -// ``` -// -pub fn is_unicode_property_name_character(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c.is_ascii_alphabetic() || c == '_') -} - -// ``` -// UnicodePropertyValueCharacter :: -// UnicodePropertyNameCharacter -// DecimalDigit -// ``` -// -pub fn is_unicode_property_value_character(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c.is_ascii_alphanumeric() || c == '_') -} - -pub fn is_valid_unicode_property(name: &str, value: &str) -> bool { +pub fn is_valid_unicode_property(_name: &str, _value: &str) -> bool { // TODO: Implement true } -pub fn is_valid_lone_unicode_property(name_or_value: &str) -> bool { +pub fn is_valid_lone_unicode_property(_name_or_value: &str) -> bool { // TODO: Implement true } /// This should be used with `unicode_sets_mode` -pub fn is_valid_lone_unicode_property_of_strings(name_or_value: &str) -> bool { +pub fn is_valid_lone_unicode_property_of_strings(_name_or_value: &str) -> bool { // TODO: Implement true } From ecb72bbcfacb7790d1af8417dc4ec292013977bb Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 09:59:06 +0900 Subject: [PATCH 048/143] Add tests --- .../src/parser/body_parser/parser/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index 4f59000078769..b1b902d740b31 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -28,6 +28,11 @@ mod test { ("a+b*?c{1}d{2,}e{3,4}?", ParserOptions::default()), (r"^(?=ab)\b(?!cd)(?<=ef)\B(? Date: Mon, 8 Jul 2024 10:32:45 +0900 Subject: [PATCH 049/143] Align AST names to spec --- crates/oxc_regexp_parser/src/ast.rs | 31 +++++++++---------- .../src/parser/body_parser/parser/atom.rs | 18 +++++------ .../src/parser/body_parser/parser/mod.rs | 6 ++-- .../src/parser/body_parser/parser/parse.rs | 14 ++++----- 4 files changed, 34 insertions(+), 35 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 8c6d9f83bbbf1..013a48de28da5 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -1,5 +1,5 @@ use oxc_allocator::{Box, Vec}; -use oxc_span::{Atom, Span}; +use oxc_span::{Atom as SpanAtom, Span}; /// The root node. #[derive(Debug)] @@ -21,17 +21,16 @@ pub struct Pattern<'a> { #[derive(Debug)] pub struct Alternative<'a> { pub span: Span, - // NOTE: `terms: Vec<'a, Term<'a>>` ? - pub elements: Vec<'a, Element<'a>>, + pub terms: Vec<'a, Term<'a>>, } /// The type which includes all atom nodes. #[derive(Debug)] -pub enum Element<'a> { +pub enum Term<'a> { Assertion(Box<'a, Assertion<'a>>), #[allow(clippy::enum_variant_names)] - QuantifiableElement(Box<'a, QuantifiableElement<'a>>), - Quantifier(Box<'a, Quantifier<'a>>), + Atom(Box<'a, Atom<'a>>), + AtomWithQuantifier(Box<'a, Quantifier<'a>>), } /// The assertion. @@ -99,7 +98,7 @@ pub struct LookbehindAssertion<'a> { /// The type which includes all atom nodes that Quantifier node can have as children. #[derive(Debug)] -pub enum QuantifiableElement<'a> { +pub enum Atom<'a> { Character(Box<'a, Character>), CharacterSet(Box<'a, CharacterSet<'a>>), CharacterClass(Box<'a, CharacterClass<'a>>), @@ -108,7 +107,7 @@ pub enum QuantifiableElement<'a> { CapturingGroup(Box<'a, CapturingGroup<'a>>), Group(Box<'a, Group<'a>>), // NOTE: Is this really necessary? - LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), + // LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), } /// The backreference. @@ -123,14 +122,14 @@ pub enum Backreference<'a> { #[derive(Debug)] pub struct AmbiguousBackreference<'a> { pub span: Span, - pub r#ref: Atom<'a>, // `\1` + pub r#ref: SpanAtom<'a>, // `\1` pub resolved: Vec<'a, CapturingGroup<'a>>, } #[derive(Debug)] pub struct UnambiguousBackreference<'a> { pub span: Span, - pub r#ref: Atom<'a>, // `\k` + pub r#ref: SpanAtom<'a>, // `\k` pub resolved: CapturingGroup<'a>, } @@ -138,7 +137,7 @@ pub struct UnambiguousBackreference<'a> { #[derive(Debug)] pub struct TemporaryBackreference<'a> { pub span: Span, - pub r#ref: Atom<'a>, // `\k` + pub r#ref: SpanAtom<'a>, // `\k` } /// The capturing group. @@ -146,7 +145,7 @@ pub struct TemporaryBackreference<'a> { #[derive(Debug)] pub struct CapturingGroup<'a> { pub span: Span, - pub name: Option>, + pub name: Option>, pub alternatives: Vec<'a, Alternative<'a>>, pub references: Vec<'a, Backreference<'a>>, } @@ -214,8 +213,8 @@ pub struct StringAlternative<'a> { #[derive(Debug)] pub struct CharacterUnicodePropertyCharacterSet<'a> { pub span: Span, - pub key: Atom<'a>, - pub value: Option>, + pub key: SpanAtom<'a>, + pub value: Option>, pub negate: bool, } @@ -282,7 +281,7 @@ pub enum UnicodePropertyCharacterSet<'a> { #[derive(Debug)] pub struct StringsUnicodePropertyCharacterSet<'a> { pub span: Span, - pub key: Atom<'a>, + pub key: SpanAtom<'a>, } /// The expression character class. @@ -356,7 +355,7 @@ pub struct Quantifier<'a> { pub min: usize, pub max: Option, // `None` means `Infinity` pub greedy: bool, - pub element: QuantifiableElement<'a>, + pub atom: Atom<'a>, } /// The flags. diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 68b1766123327..bc560acfb65d6 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -13,7 +13,7 @@ impl<'a> super::parse::PatternParser<'a> { // SourceCharacter but not SyntaxCharacter // ``` // - pub(super) fn consume_pattern_character(&mut self) -> Option> { + pub(super) fn consume_pattern_character(&mut self) -> Option> { let span_start = self.reader.span_position(); let cp = self.reader.peek()?; @@ -22,7 +22,7 @@ impl<'a> super::parse::PatternParser<'a> { } self.reader.advance(); - Some(ast::QuantifiableElement::Character(Box::new_in( + Some(ast::Atom::Character(Box::new_in( ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), value: cp, @@ -31,13 +31,13 @@ impl<'a> super::parse::PatternParser<'a> { ))) } - pub(super) fn consume_dot(&mut self) -> Option> { + pub(super) fn consume_dot(&mut self) -> Option> { let span_start = self.reader.span_position(); if !self.reader.eat('.') { return None; } - Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + Some(ast::Atom::CharacterSet(Box::new_in( ast::CharacterSet::AnyCharacterSet(Box::new_in( ast::AnyCharacterSet { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -58,7 +58,7 @@ impl<'a> super::parse::PatternParser<'a> { // pub(super) fn consume_reverse_solidus_atom_escape( &mut self, - ) -> Result>> { + ) -> Result>> { let span_start = self.reader.span_position(); if !self.reader.eat('\\') { return Ok(None); @@ -68,7 +68,7 @@ impl<'a> super::parse::PatternParser<'a> { if self.consume_decimal_escape().is_some() { let span_end = self.reader.span_position(); - return Ok(Some(ast::QuantifiableElement::Backreference(Box::new_in( + return Ok(Some(ast::Atom::Backreference(Box::new_in( ast::Backreference::TemporaryBackreference(Box::new_in( ast::TemporaryBackreference { span: self.span_factory.create(span_start, span_end), @@ -81,7 +81,7 @@ impl<'a> super::parse::PatternParser<'a> { } if let Some((kind, negate)) = self.consume_character_class_escape() { - return Ok(Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + return Ok(Some(ast::Atom::CharacterSet(Box::new_in( ast::CharacterSet::EscapeCharacterSet(Box::new_in( ast::EscapeCharacterSet { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -98,7 +98,7 @@ impl<'a> super::parse::PatternParser<'a> { self.consume_character_class_escape_unicode()? { let span = self.span_factory.create(span_start, self.reader.span_position()); - return Ok(Some(ast::QuantifiableElement::CharacterSet(Box::new_in( + return Ok(Some(ast::Atom::CharacterSet(Box::new_in( ast::CharacterSet::UnicodePropertyCharacterSet(Box::new_in( if is_strings_related { ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet( @@ -128,7 +128,7 @@ impl<'a> super::parse::PatternParser<'a> { } if let Some(cp) = self.consume_character_escape()? { - return Ok(Some(ast::QuantifiableElement::Character(Box::new_in( + return Ok(Some(ast::Atom::Character(Box::new_in( ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), value: cp, diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index b1b902d740b31..15cf99dbd8ec9 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -86,7 +86,7 @@ mod test { let pattern = PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 15); + assert_eq!(pattern.alternatives[0].terms.len(), 15); let pattern = PatternParser::new( &allocator, @@ -95,7 +95,7 @@ mod test { ) .parse() .unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 14); + assert_eq!(pattern.alternatives[0].terms.len(), 14); let pattern = PatternParser::new( &allocator, source_text, @@ -103,6 +103,6 @@ mod test { ) .parse() .unwrap(); - assert_eq!(pattern.alternatives[0].elements.len(), 14); + assert_eq!(pattern.alternatives[0].terms.len(), 14); } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 46bba55a2fe2a..5ac4dd39b1e8f 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -145,7 +145,7 @@ impl<'a> PatternParser<'a> { Ok(ast::Alternative { span: self.span_factory.create(span_start, self.reader.span_position()), - elements, + terms: elements, }) } @@ -156,24 +156,24 @@ impl<'a> PatternParser<'a> { // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier // ``` // - fn consume_term(&mut self) -> Result>> { + fn consume_term(&mut self) -> Result>> { if let Some(assertion) = self.consume_assertion()? { - return Ok(Some(ast::Element::Assertion(Box::new_in(assertion, self.allocator)))); + return Ok(Some(ast::Term::Assertion(Box::new_in(assertion, self.allocator)))); } let span_start = self.reader.span_position(); match (self.consume_atom()?, self.consume_quantifier()?) { (Some(atom), None) => { - Ok(Some(ast::Element::QuantifiableElement(Box::new_in(atom, self.allocator)))) + Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))) } (Some(atom), Some(((min, max), greedy))) => { - return Ok(Some(ast::Element::Quantifier(Box::new_in( + return Ok(Some(ast::Term::AtomWithQuantifier(Box::new_in( ast::Quantifier { span: self.span_factory.create(span_start, self.reader.span_position()), min, max, greedy, - element: atom, + atom, }, self.allocator, )))); @@ -301,7 +301,7 @@ impl<'a> PatternParser<'a> { // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` // - fn consume_atom(&mut self) -> Result>> { + fn consume_atom(&mut self) -> Result>> { Ok(self .consume_pattern_character() .or(self.consume_dot()) From 709d2673e12f7ce3da75fa23c47417684128b411 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 10:37:22 +0900 Subject: [PATCH 050/143] Fix fmt --- .../oxc_regexp_parser/src/parser/body_parser/parser/atom.rs | 4 +--- .../oxc_regexp_parser/src/parser/body_parser/parser/parse.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index bc560acfb65d6..6991d5e41792f 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -56,9 +56,7 @@ impl<'a> super::parse::PatternParser<'a> { // [+NamedCaptureGroups] k GroupName[?UnicodeMode] // ``` // - pub(super) fn consume_reverse_solidus_atom_escape( - &mut self, - ) -> Result>> { + pub(super) fn consume_reverse_solidus_atom_escape(&mut self) -> Result>> { let span_start = self.reader.span_position(); if !self.reader.eat('\\') { return Ok(None); diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 5ac4dd39b1e8f..ba79a7f848d7a 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -163,9 +163,7 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); match (self.consume_atom()?, self.consume_quantifier()?) { - (Some(atom), None) => { - Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))) - } + (Some(atom), None) => Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))), (Some(atom), Some(((min, max), greedy))) => { return Ok(Some(ast::Term::AtomWithQuantifier(Box::new_in( ast::Quantifier { From 2e6d9f6e27a0065ac0607b80d59f34f67d85103b Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 10:59:53 +0900 Subject: [PATCH 051/143] Use SpanAtom for oxc_span::Atom --- .../src/parser/body_parser/parser/atom.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 6991d5e41792f..4fee26deba7cd 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -1,6 +1,6 @@ use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Atom; +use oxc_span::Atom as SpanAtom; use crate::{ ast, @@ -70,7 +70,7 @@ impl<'a> super::parse::PatternParser<'a> { ast::Backreference::TemporaryBackreference(Box::new_in( ast::TemporaryBackreference { span: self.span_factory.create(span_start, span_end), - r#ref: Atom::from(&self.source_text[span_start..span_end]), + r#ref: SpanAtom::from(&self.source_text[span_start..span_end]), }, self.allocator, )), @@ -181,7 +181,7 @@ impl<'a> super::parse::PatternParser<'a> { #[allow(clippy::type_complexity)] fn consume_character_class_escape_unicode( &mut self, - ) -> Result, Option>, bool), bool)>> { + ) -> Result, Option>, bool), bool)>> { let negate = if self.reader.eat('p') { Some(false) } else if self.reader.eat('P') { @@ -220,7 +220,7 @@ impl<'a> super::parse::PatternParser<'a> { /// Returns: `(name, value, is_strings_related_unicode_property)` fn consume_unicode_property_value_expression( &mut self, - ) -> Result, Option>, bool)>> { + ) -> Result, Option>, bool)>> { let checkpoint = self.reader.checkpoint(); // UnicodePropertyName=UnicodePropertyValue @@ -266,7 +266,7 @@ impl<'a> super::parse::PatternParser<'a> { Ok(None) } - fn consume_unicode_property_name(&mut self) -> Option> { + fn consume_unicode_property_name(&mut self) -> Option> { let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); @@ -278,10 +278,10 @@ impl<'a> super::parse::PatternParser<'a> { return None; } - Some(Atom::from(&self.source_text[span_start..self.reader.span_position()])) + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) } - fn consume_unicode_property_value(&mut self) -> Option> { + fn consume_unicode_property_value(&mut self) -> Option> { let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); @@ -293,7 +293,7 @@ impl<'a> super::parse::PatternParser<'a> { return None; } - Some(Atom::from(&self.source_text[span_start..self.reader.span_position()])) + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) } // ``` From 56c12b5e9ffc7bfa7dbcc4f8fbeef0333c40e03e Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 12:58:07 +0900 Subject: [PATCH 052/143] Split impls --- .../src/parser/body_parser/parser/atom.rs | 324 +--------------- .../parser/body_parser/parser/atom_escape.rs | 355 ++++++++++++++++++ .../src/parser/body_parser/parser/misc.rs | 31 +- .../src/parser/body_parser/parser/mod.rs | 3 + 4 files changed, 360 insertions(+), 353 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 4fee26deba7cd..b865ffd003ec7 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -2,10 +2,7 @@ use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; -use crate::{ - ast, - parser::body_parser::{unicode, unicode_property}, -}; +use crate::{ast, parser::body_parser::unicode}; impl<'a> super::parse::PatternParser<'a> { // ``` @@ -140,323 +137,4 @@ impl<'a> super::parse::PatternParser<'a> { Err(OxcDiagnostic::error("Invalid escape")) } - - // ``` - // CharacterClassEscape[UnicodeMode] :: - // d - // D - // s - // S - // w - // W - // [+UnicodeMode] p{ UnicodePropertyValueExpression } - // [+UnicodeMode] P{ UnicodePropertyValueExpression } - // ``` - // - /// Returns: `(kind, negate)` - fn consume_character_class_escape(&mut self) -> Option<(ast::EscapeCharacterSetKind, bool)> { - // NOTE: `mayContainStrings`? - if self.reader.eat('d') { - return Some((ast::EscapeCharacterSetKind::Digit, false)); - } - if self.reader.eat('D') { - return Some((ast::EscapeCharacterSetKind::Digit, true)); - } - if self.reader.eat('s') { - return Some((ast::EscapeCharacterSetKind::Space, false)); - } - if self.reader.eat('S') { - return Some((ast::EscapeCharacterSetKind::Space, true)); - } - if self.reader.eat('w') { - return Some((ast::EscapeCharacterSetKind::Word, false)); - } - if self.reader.eat('W') { - return Some((ast::EscapeCharacterSetKind::Word, true)); - } - - None - } - /// Returns: `((name, value, is_strings_related_unicode_property), negate)` - #[allow(clippy::type_complexity)] - fn consume_character_class_escape_unicode( - &mut self, - ) -> Result, Option>, bool), bool)>> { - let negate = if self.reader.eat('p') { - Some(false) - } else if self.reader.eat('P') { - Some(true) - } else { - None - }; - - if let Some(negate) = negate { - if self.reader.eat('{') { - if let Some((name, value, is_strings_related)) = - self.consume_unicode_property_value_expression()? - { - if negate && is_strings_related { - return Err(OxcDiagnostic::error("Invalid property name")); - } - if self.reader.eat('}') { - // NOTE: `mayContainStrings`? - return Ok(Some(((name, value, negate), is_strings_related))); - } - } - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - - Ok(None) - } - - // ``` - // UnicodePropertyValueExpression :: - // UnicodePropertyName = UnicodePropertyValue - // LoneUnicodePropertyNameOrValue - // ``` - // - /// Returns: `(name, value, is_strings_related_unicode_property)` - fn consume_unicode_property_value_expression( - &mut self, - ) -> Result, Option>, bool)>> { - let checkpoint = self.reader.checkpoint(); - - // UnicodePropertyName=UnicodePropertyValue - if let Some(name) = self.consume_unicode_property_name() { - if self.reader.eat('=') { - if let Some(value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property(&name, &value) { - return Ok(Some((name, Some(value), false))); - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - } - } - self.reader.rewind(checkpoint); - - // LoneUnicodePropertyNameOrValue - if let Some(name_or_value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { - return Ok(Some(("General_Category".into(), Some(name_or_value), false))); - } - - if unicode_property::is_valid_lone_unicode_property(&name_or_value) { - return Ok(Some((name_or_value, None, false))); - } - - if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { - // Early errors: - // It is a Syntax Error - // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter - // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings - // - listed in the “Property name” column of Table 68. - if !self.state.is_unicode_sets_mode() { - return Err(OxcDiagnostic::error("Syntax Error")); - } - - return Ok(Some((name_or_value, None, true))); - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - - Ok(None) - } - - fn consume_unicode_property_name(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let checkpoint = self.reader.checkpoint(); - while unicode::is_unicode_property_name_character(self.reader.peek()?) { - self.reader.advance(); - } - - if checkpoint == self.reader.checkpoint() { - return None; - } - - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) - } - - fn consume_unicode_property_value(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let checkpoint = self.reader.checkpoint(); - while unicode::is_unicode_property_value_character(self.reader.peek()?) { - self.reader.advance(); - } - - if checkpoint == self.reader.checkpoint() { - return None; - } - - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) - } - - // ``` - // CharacterEscape[UnicodeMode] :: - // ControlEscape - // c AsciiLetter - // 0 [lookahead ∉ DecimalDigit] - // HexEscapeSequence - // RegExpUnicodeEscapeSequence[?UnicodeMode] - // IdentityEscape[?UnicodeMode] - // ``` - // - fn consume_character_escape(&mut self) -> Result> { - // e.g. \n - if let Some(control_escape) = self.reader.peek().and_then(unicode::map_control_escape) { - self.reader.advance(); - return Ok(Some(control_escape)); - } - - // e.g. \cM - let checkpoint = self.reader.checkpoint(); - if self.reader.eat('c') { - if let Some(c_ascii_letter) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { - self.reader.advance(); - return Ok(Some(c_ascii_letter)); - } - self.reader.rewind(checkpoint); - } - - // e.g. \0 - if self.reader.peek().map_or(false, |cp| cp == '0' as u32) - && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) - { - self.reader.advance(); - return Ok(Some(0x00)); - } - - // e.g. \x41 - if self.reader.eat('x') { - if let Some(hex_digits) = self.consume_fixed_hex_digits(2) { - return Ok(Some(hex_digits)); - } - return Err(OxcDiagnostic::error("Invalid escape")); - } - - // e.g. \u{1f600} - if let Some(reg_exp_unicode_escape_sequence) = - self.consume_reg_exp_unicode_escape_sequence()? - { - return Ok(Some(reg_exp_unicode_escape_sequence)); - } - - // e.g. \. - if let Some(identity_escape) = self.consume_identity_escape() { - return Ok(Some(identity_escape)); - } - - Ok(None) - } - - // ``` - // RegExpUnicodeEscapeSequence[UnicodeMode] :: - // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate - // [+UnicodeMode] u HexLeadSurrogate - // [+UnicodeMode] u HexTrailSurrogate - // [+UnicodeMode] u HexNonSurrogate - // [~UnicodeMode] u Hex4Digits - // [+UnicodeMode] u{ CodePoint } - // ``` - // - fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { - if !self.reader.eat('u') { - return Ok(None); - } - - if self.state.is_unicode_mode() { - let checkpoint = self.reader.checkpoint(); - - // HexLeadSurrogate + HexTrailSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if self.reader.eat2('\\', 'u') { - if let Some(trail_surrogate) = self - .consume_fixed_hex_digits(4) - .filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); - } - } - } - self.reader.rewind(checkpoint); - - // NOTE: `regexpp` seems not to support these 2 cases, why...? - - // HexLeadSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - return Ok(Some(lead_surrogate)); - } - self.reader.rewind(checkpoint); - - // HexTrailSurrogate - if let Some(trail_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(trail_surrogate)); - } - self.reader.rewind(checkpoint); - } - - // HexNonSurrogate and Hex4Digits are the same - if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { - return Ok(Some(hex_digits)); - } - - // {CodePoint} - if self.state.is_unicode_mode() { - let checkpoint = self.reader.checkpoint(); - - if self.reader.eat('{') { - if let Some(hex_digits) = - self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) - { - if self.reader.eat('}') { - return Ok(Some(hex_digits)); - } - } - } - self.reader.rewind(checkpoint); - } - - Err(OxcDiagnostic::error("Invalid unicode escape")) - } - - // ``` - // IdentityEscape[UnicodeMode] :: - // [+UnicodeMode] SyntaxCharacter - // [+UnicodeMode] / - // [~UnicodeMode] SourceCharacter but not UnicodeIDContinue - // ``` - // - fn consume_identity_escape(&mut self) -> Option { - let cp = self.reader.peek()?; - - if self.state.is_unicode_mode() { - if unicode::is_syntax_character(cp) || cp == '/' as u32 { - self.reader.advance(); - return Some(cp); - } - - return None; - } - - if !unicode::is_id_continue(cp) { - self.reader.advance(); - return Some(cp); - } - - None - } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs new file mode 100644 index 0000000000000..b9f2ce4fa036c --- /dev/null +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs @@ -0,0 +1,355 @@ +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Atom as SpanAtom; + +use crate::{ + ast, + parser::body_parser::{unicode, unicode_property}, +}; + +impl<'a> super::parse::PatternParser<'a> { + // ``` + // DecimalEscape :: + // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] + // ``` + // + pub(super) fn consume_decimal_escape(&mut self) -> Option { + if unicode::is_non_zero_digit(self.reader.peek()?) { + let mut value = 0; + + while let Some(cp) = self.reader.peek() { + if !unicode::is_decimal_digits(cp) { + break; + } + + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + return Some(value); + } + + None + } + + // ``` + // CharacterClassEscape[UnicodeMode] :: + // d + // D + // s + // S + // w + // W + // [+UnicodeMode] p{ UnicodePropertyValueExpression } + // [+UnicodeMode] P{ UnicodePropertyValueExpression } + // ``` + // + /// Returns: `(kind, negate)` + pub(super) fn consume_character_class_escape( + &mut self, + ) -> Option<(ast::EscapeCharacterSetKind, bool)> { + // NOTE: `mayContainStrings`? + if self.reader.eat('d') { + return Some((ast::EscapeCharacterSetKind::Digit, false)); + } + if self.reader.eat('D') { + return Some((ast::EscapeCharacterSetKind::Digit, true)); + } + if self.reader.eat('s') { + return Some((ast::EscapeCharacterSetKind::Space, false)); + } + if self.reader.eat('S') { + return Some((ast::EscapeCharacterSetKind::Space, true)); + } + if self.reader.eat('w') { + return Some((ast::EscapeCharacterSetKind::Word, false)); + } + if self.reader.eat('W') { + return Some((ast::EscapeCharacterSetKind::Word, true)); + } + + None + } + /// Returns: `((name, value, is_strings_related_unicode_property), negate)` + #[allow(clippy::type_complexity)] + pub(super) fn consume_character_class_escape_unicode( + &mut self, + ) -> Result, Option>, bool), bool)>> { + let negate = if self.reader.eat('p') { + Some(false) + } else if self.reader.eat('P') { + Some(true) + } else { + None + }; + + if let Some(negate) = negate { + if self.reader.eat('{') { + if let Some((name, value, is_strings_related)) = + self.consume_unicode_property_value_expression()? + { + if negate && is_strings_related { + return Err(OxcDiagnostic::error("Invalid property name")); + } + if self.reader.eat('}') { + // NOTE: `mayContainStrings`? + return Ok(Some(((name, value, negate), is_strings_related))); + } + } + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + + Ok(None) + } + + // ``` + // UnicodePropertyValueExpression :: + // UnicodePropertyName = UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + // ``` + // + /// Returns: `(name, value, is_strings_related_unicode_property)` + fn consume_unicode_property_value_expression( + &mut self, + ) -> Result, Option>, bool)>> { + let checkpoint = self.reader.checkpoint(); + + // UnicodePropertyName=UnicodePropertyValue + if let Some(name) = self.consume_unicode_property_name() { + if self.reader.eat('=') { + if let Some(value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property(&name, &value) { + return Ok(Some((name, Some(value), false))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + } + } + self.reader.rewind(checkpoint); + + // LoneUnicodePropertyNameOrValue + if let Some(name_or_value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { + return Ok(Some(("General_Category".into(), Some(name_or_value), false))); + } + + if unicode_property::is_valid_lone_unicode_property(&name_or_value) { + return Ok(Some((name_or_value, None, false))); + } + + if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { + // Early errors: + // It is a Syntax Error + // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter + // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings + // - listed in the “Property name” column of Table 68. + if !self.state.is_unicode_sets_mode() { + return Err(OxcDiagnostic::error("Syntax Error")); + } + + return Ok(Some((name_or_value, None, true))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + + Ok(None) + } + + fn consume_unicode_property_name(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode::is_unicode_property_name_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + } + + fn consume_unicode_property_value(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode::is_unicode_property_value_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + } + + // ``` + // CharacterEscape[UnicodeMode] :: + // ControlEscape + // c AsciiLetter + // 0 [lookahead ∉ DecimalDigit] + // HexEscapeSequence + // RegExpUnicodeEscapeSequence[?UnicodeMode] + // IdentityEscape[?UnicodeMode] + // ``` + // + pub(super) fn consume_character_escape(&mut self) -> Result> { + // e.g. \n + if let Some(control_escape) = self.reader.peek().and_then(unicode::map_control_escape) { + self.reader.advance(); + return Ok(Some(control_escape)); + } + + // e.g. \cM + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('c') { + if let Some(c_ascii_letter) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { + self.reader.advance(); + return Ok(Some(c_ascii_letter)); + } + self.reader.rewind(checkpoint); + } + + // e.g. \0 + if self.reader.peek().map_or(false, |cp| cp == '0' as u32) + && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) + { + self.reader.advance(); + return Ok(Some(0x00)); + } + + // e.g. \x41 + if self.reader.eat('x') { + if let Some(hex_digits) = self.consume_fixed_hex_digits(2) { + return Ok(Some(hex_digits)); + } + return Err(OxcDiagnostic::error("Invalid escape")); + } + + // e.g. \u{1f600} + if let Some(reg_exp_unicode_escape_sequence) = + self.consume_reg_exp_unicode_escape_sequence()? + { + return Ok(Some(reg_exp_unicode_escape_sequence)); + } + + // e.g. \. + if let Some(identity_escape) = self.consume_identity_escape() { + return Ok(Some(identity_escape)); + } + + Ok(None) + } + + // ``` + // RegExpUnicodeEscapeSequence[UnicodeMode] :: + // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate + // [+UnicodeMode] u HexLeadSurrogate + // [+UnicodeMode] u HexTrailSurrogate + // [+UnicodeMode] u HexNonSurrogate + // [~UnicodeMode] u Hex4Digits + // [+UnicodeMode] u{ CodePoint } + // ``` + // + fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { + if !self.reader.eat('u') { + return Ok(None); + } + + if self.state.is_unicode_mode() { + let checkpoint = self.reader.checkpoint(); + + // HexLeadSurrogate + HexTrailSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if self.reader.eat2('\\', 'u') { + if let Some(trail_surrogate) = self + .consume_fixed_hex_digits(4) + .filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + self.reader.rewind(checkpoint); + + // NOTE: `regexpp` seems not to support these 2 cases, why...? + + // HexLeadSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + return Ok(Some(lead_surrogate)); + } + self.reader.rewind(checkpoint); + + // HexTrailSurrogate + if let Some(trail_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(trail_surrogate)); + } + self.reader.rewind(checkpoint); + } + + // HexNonSurrogate and Hex4Digits are the same + if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { + return Ok(Some(hex_digits)); + } + + // {CodePoint} + if self.state.is_unicode_mode() { + let checkpoint = self.reader.checkpoint(); + + if self.reader.eat('{') { + if let Some(hex_digits) = + self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) + { + if self.reader.eat('}') { + return Ok(Some(hex_digits)); + } + } + } + self.reader.rewind(checkpoint); + } + + Err(OxcDiagnostic::error("Invalid unicode escape")) + } + + // ``` + // IdentityEscape[UnicodeMode] :: + // [+UnicodeMode] SyntaxCharacter + // [+UnicodeMode] / + // [~UnicodeMode] SourceCharacter but not UnicodeIDContinue + // ``` + // + fn consume_identity_escape(&mut self) -> Option { + let cp = self.reader.peek()?; + + if self.state.is_unicode_mode() { + if unicode::is_syntax_character(cp) || cp == '/' as u32 { + self.reader.advance(); + return Some(cp); + } + + return None; + } + + if !unicode::is_id_continue(cp) { + self.reader.advance(); + return Some(cp); + } + + None + } +} diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs index 9eae24605b571..43d1c1c0a4c1c 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -12,11 +12,7 @@ impl<'a> super::parse::PatternParser<'a> { let checkpoint = self.reader.checkpoint(); let mut value = 0; - while let Some(cp) = self.reader.peek() { - if !unicode::is_decimal_digits(cp) { - break; - } - + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { // `- '0' as u32`: convert code point to digit value = (10 * value) + (cp - '0' as u32) as usize; self.reader.advance(); @@ -29,31 +25,6 @@ impl<'a> super::parse::PatternParser<'a> { None } - // ``` - // DecimalEscape :: - // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] - // ``` - // - pub(super) fn consume_decimal_escape(&mut self) -> Option { - if unicode::is_non_zero_digit(self.reader.peek()?) { - let mut value = 0; - - while let Some(cp) = self.reader.peek() { - if !unicode::is_decimal_digits(cp) { - break; - } - - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - return Some(value); - } - - None - } - pub(super) fn consume_hex_digits(&mut self) -> Option { let checkpoint = self.reader.checkpoint(); diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index 15cf99dbd8ec9..b7c8518ca98ad 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -1,5 +1,8 @@ +/// impl `PatternParser` mod atom; +mod atom_escape; mod misc; +/// Main entry point for `PatternParser` mod parse; pub use parse::PatternParser; From 2b07202defeebfe65bcedc50f7d04d196f809aaf Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 13:14:02 +0900 Subject: [PATCH 053/143] Clean up --- .../parser/body_parser/parser/atom_escape.rs | 16 ++++++++ .../src/parser/body_parser/parser/misc.rs | 40 ------------------- .../src/parser/body_parser/parser/parse.rs | 26 +++++++++++- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs index b9f2ce4fa036c..0c5f8338c5d54 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs @@ -326,6 +326,22 @@ impl<'a> super::parse::PatternParser<'a> { Err(OxcDiagnostic::error("Invalid unicode escape")) } + fn consume_hex_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { + value = (16 * value) + hex; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } + // ``` // IdentityEscape[UnicodeMode] :: // [+UnicodeMode] SyntaxCharacter diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs index 43d1c1c0a4c1c..8f054196c357c 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -1,46 +1,6 @@ use crate::parser::body_parser::unicode; impl<'a> super::parse::PatternParser<'a> { - // ``` - // DecimalDigits[Sep] :: - // DecimalDigit - // DecimalDigits[?Sep] DecimalDigit - // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit - // ``` - // - pub(super) fn consume_decimal_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } - - pub(super) fn consume_hex_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { - value = (16 * value) + hex; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } - pub(super) fn consume_fixed_hex_digits(&mut self, len: usize) -> Option { let checkpoint = self.reader.checkpoint(); diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index ba79a7f848d7a..446c91243a261 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -4,7 +4,7 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, parser::{ - body_parser::{reader::Reader, state::State}, + body_parser::{reader::Reader, state::State, unicode}, options::ParserOptions, span::SpanFactory, }, @@ -372,4 +372,28 @@ impl<'a> PatternParser<'a> { Ok(None) } + + // ``` + // DecimalDigits[Sep] :: + // DecimalDigit + // DecimalDigits[?Sep] DecimalDigit + // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit + // ``` + // + fn consume_decimal_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } } From 188aae81be0c81ff33569b25ee63f189c382c35e Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 15:08:32 +0900 Subject: [PATCH 054/143] Implement \AtomEscape > kGroupName --- .../src/parser/body_parser/parser/atom.rs | 17 +- .../parser/body_parser/parser/atom_escape.rs | 110 ++------- .../src/parser/body_parser/parser/misc.rs | 220 ++++++++++++++++++ .../src/parser/body_parser/unicode.rs | 9 + 4 files changed, 259 insertions(+), 97 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index b865ffd003ec7..3a32ece96067d 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -63,6 +63,7 @@ impl<'a> super::parse::PatternParser<'a> { if self.consume_decimal_escape().is_some() { let span_end = self.reader.span_position(); + // NOTE: Should be distinguished from `k`? return Ok(Some(ast::Atom::Backreference(Box::new_in( ast::Backreference::TemporaryBackreference(Box::new_in( ast::TemporaryBackreference { @@ -132,8 +133,20 @@ impl<'a> super::parse::PatternParser<'a> { )))); } - // TODO: Implement - // if let Some(_) = self.consume_k_group_name() {} + // `k`: \k means Backreference + if let Some(r#ref) = self.consume_k_group_name()? { + // NOTE: Should be distinguished from `DecimalEscape`? + return Ok(Some(ast::Atom::Backreference(Box::new_in( + ast::Backreference::TemporaryBackreference(Box::new_in( + ast::TemporaryBackreference { + span: self.span_factory.create(span_start, self.reader.span_position()), + r#ref, + }, + self.allocator, + )), + self.allocator, + )))); + } Err(OxcDiagnostic::error("Invalid escape")) } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs index 0c5f8338c5d54..a4f149bb97962 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs @@ -247,101 +247,6 @@ impl<'a> super::parse::PatternParser<'a> { Ok(None) } - // ``` - // RegExpUnicodeEscapeSequence[UnicodeMode] :: - // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate - // [+UnicodeMode] u HexLeadSurrogate - // [+UnicodeMode] u HexTrailSurrogate - // [+UnicodeMode] u HexNonSurrogate - // [~UnicodeMode] u Hex4Digits - // [+UnicodeMode] u{ CodePoint } - // ``` - // - fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { - if !self.reader.eat('u') { - return Ok(None); - } - - if self.state.is_unicode_mode() { - let checkpoint = self.reader.checkpoint(); - - // HexLeadSurrogate + HexTrailSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if self.reader.eat2('\\', 'u') { - if let Some(trail_surrogate) = self - .consume_fixed_hex_digits(4) - .filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); - } - } - } - self.reader.rewind(checkpoint); - - // NOTE: `regexpp` seems not to support these 2 cases, why...? - - // HexLeadSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - return Ok(Some(lead_surrogate)); - } - self.reader.rewind(checkpoint); - - // HexTrailSurrogate - if let Some(trail_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(trail_surrogate)); - } - self.reader.rewind(checkpoint); - } - - // HexNonSurrogate and Hex4Digits are the same - if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { - return Ok(Some(hex_digits)); - } - - // {CodePoint} - if self.state.is_unicode_mode() { - let checkpoint = self.reader.checkpoint(); - - if self.reader.eat('{') { - if let Some(hex_digits) = - self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) - { - if self.reader.eat('}') { - return Ok(Some(hex_digits)); - } - } - } - self.reader.rewind(checkpoint); - } - - Err(OxcDiagnostic::error("Invalid unicode escape")) - } - - fn consume_hex_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { - value = (16 * value) + hex; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } - // ``` // IdentityEscape[UnicodeMode] :: // [+UnicodeMode] SyntaxCharacter @@ -368,4 +273,19 @@ impl<'a> super::parse::PatternParser<'a> { None } + + pub(super) fn consume_k_group_name(&mut self) -> Result>> { + if self.reader.eat('k') { + if let Some(group_name) = self.consume_group_name()? { + // TODO: Implement + // this._backreferenceNames.add(groupName); + + return Ok(Some(group_name)); + } + + return Err(OxcDiagnostic::error("Invalid named reference")); + } + + Ok(None) + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs index 8f054196c357c..35af9b6fbcf09 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs @@ -1,3 +1,6 @@ +use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Atom as SpanAtom; + use crate::parser::body_parser::unicode; impl<'a> super::parse::PatternParser<'a> { @@ -17,4 +20,221 @@ impl<'a> super::parse::PatternParser<'a> { Some(value) } + + // ``` + // RegExpUnicodeEscapeSequence[UnicodeMode] :: + // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate + // [+UnicodeMode] u HexLeadSurrogate + // [+UnicodeMode] u HexTrailSurrogate + // [+UnicodeMode] u HexNonSurrogate + // [~UnicodeMode] u Hex4Digits + // [+UnicodeMode] u{ CodePoint } + // ``` + // + pub(super) fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { + if !self.reader.eat('u') { + return Ok(None); + } + + if self.state.is_unicode_mode() { + let checkpoint = self.reader.checkpoint(); + + // HexLeadSurrogate + HexTrailSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if self.reader.eat2('\\', 'u') { + if let Some(trail_surrogate) = self + .consume_fixed_hex_digits(4) + .filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + self.reader.rewind(checkpoint); + + // NOTE: `regexpp` seems not to support these 2 cases, why...? + + // HexLeadSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + return Ok(Some(lead_surrogate)); + } + self.reader.rewind(checkpoint); + + // HexTrailSurrogate + if let Some(trail_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(trail_surrogate)); + } + self.reader.rewind(checkpoint); + } + + // HexNonSurrogate and Hex4Digits are the same + if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { + return Ok(Some(hex_digits)); + } + + // {CodePoint} + if self.state.is_unicode_mode() { + let checkpoint = self.reader.checkpoint(); + + if self.reader.eat('{') { + if let Some(hex_digits) = + self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) + { + if self.reader.eat('}') { + return Ok(Some(hex_digits)); + } + } + } + self.reader.rewind(checkpoint); + } + + Err(OxcDiagnostic::error("Invalid unicode escape")) + } + + fn consume_hex_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { + value = (16 * value) + hex; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } + + // ``` + // GroupName[UnicodeMode] :: + // < RegExpIdentifierName[?UnicodeMode] > + // ``` + // + pub(super) fn consume_group_name(&mut self) -> Result>> { + if !self.reader.eat('<') { + return Ok(None); + } + + if let Some(group_name) = self.consume_reg_exp_idenfigier_name()? { + if self.reader.eat('>') { + return Ok(Some(group_name)); + } + } + + Err(OxcDiagnostic::error("Invalid capture group name")) + } + + // ``` + // RegExpIdentifierName[UnicodeMode] :: + // RegExpIdentifierStart[?UnicodeMode] + // RegExpIdentifierName[?UnicodeMode] RegExpIdentifierPart[?UnicodeMode] + // ``` + // + fn consume_reg_exp_idenfigier_name(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.consume_reg_exp_idenfigier_start()?.is_some() { + while self.consume_reg_exp_idenfigier_part()?.is_some() {} + + let span_end = self.reader.span_position(); + return Ok(Some(SpanAtom::from(&self.source_text[span_start..span_end]))); + } + + Ok(None) + } + + // ``` + // RegExpIdentifierStart[UnicodeMode] :: + // IdentifierStartChar + // \ RegExpUnicodeEscapeSequence[+UnicodeMode] + // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate + // ``` + // + fn consume_reg_exp_idenfigier_start(&mut self) -> Result> { + if let Some(cp) = self.reader.peek() { + if unicode::is_identifier_start_char(cp) { + self.reader.advance(); + return Ok(Some(cp)); + } + } + + if self.reader.eat('\\') { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + return Ok(Some(cp)); + } + } + + if !self.state.is_unicode_mode() { + if let Some(lead_surrogate) = + self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if let Some(trail_surrogate) = + self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) + { + self.reader.advance(); + self.reader.advance(); + + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + + Ok(None) + } + + // ``` + // RegExpIdentifierPart[UnicodeMode] :: + // IdentifierPartChar + // \ RegExpUnicodeEscapeSequence[+UnicodeMode] + // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate + // ``` + // + fn consume_reg_exp_idenfigier_part(&mut self) -> Result> { + if let Some(cp) = self.reader.peek() { + if unicode::is_identifier_part_char(cp) { + self.reader.advance(); + return Ok(Some(cp)); + } + } + + if self.reader.eat('\\') { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + return Ok(Some(cp)); + } + } + + if !self.state.is_unicode_mode() { + if let Some(lead_surrogate) = + self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if let Some(trail_surrogate) = + self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) + { + self.reader.advance(); + self.reader.advance(); + + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + + Ok(None) + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index 386ba37d17d07..15829a64c2121 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -43,6 +43,15 @@ pub fn is_unicode_property_value_character(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_alphanumeric() || c == '_') } +pub fn is_identifier_start_char(cp: u32) -> bool { + char::from_u32(cp) + .map_or(false, |c| unicode_id_start::is_id_start_unicode(c) || c == '$' || c == '_') +} + +pub fn is_identifier_part_char(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_continue_unicode(c) || c == '$') +} + pub fn is_lead_surrogate(cp: u32) -> bool { (0xd800..=0xdbff).contains(&cp) } From bb287b8cae2ff3c43bdeb30ec2905e3b47d13c77 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 15:09:56 +0900 Subject: [PATCH 055/143] Rename shared impl --- crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs | 4 ++-- .../src/parser/body_parser/parser/{misc.rs => shared.rs} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename crates/oxc_regexp_parser/src/parser/body_parser/parser/{misc.rs => shared.rs} (100%) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index b7c8518ca98ad..fe3294ff35988 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -1,9 +1,9 @@ -/// impl `PatternParser` mod atom; mod atom_escape; -mod misc; /// Main entry point for `PatternParser` +/// All others are splitted files to `impl PatternParser` mod parse; +mod shared; pub use parse::PatternParser; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/shared.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser/misc.rs rename to crates/oxc_regexp_parser/src/parser/body_parser/parser/shared.rs From a671f60a64baee5d1b91ea8145f05559ebd26212 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 15:52:13 +0900 Subject: [PATCH 056/143] Fix bug, to handle \1 correctly --- .../parser/body_parser/parser/atom_escape.rs | 6 +---- .../src/parser/body_parser/parser/parse.rs | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs index a4f149bb97962..92a92156bd37b 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs @@ -16,11 +16,7 @@ impl<'a> super::parse::PatternParser<'a> { if unicode::is_non_zero_digit(self.reader.peek()?) { let mut value = 0; - while let Some(cp) = self.reader.peek() { - if !unicode::is_decimal_digits(cp) { - break; - } - + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { // `- '0' as u32`: convert code point to digit value = (10 * value) + (cp - '0' as u32) as usize; self.reader.advance(); diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index 446c91243a261..86185450e9703 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -300,15 +300,22 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_atom(&mut self) -> Result>> { - Ok(self - .consume_pattern_character() - .or(self.consume_dot()) - .or(self.consume_reverse_solidus_atom_escape()?) - // TODO: Implement - // self.consume_character_class() - // self.consume_capturing_group() - // self.consume_uncapturing_group() - .or(None)) + if let Some(atom) = self.consume_pattern_character() { + return Ok(Some(atom)); + } + if let Some(atom) = self.consume_dot() { + return Ok(Some(atom)); + } + if let Some(atom) = self.consume_reverse_solidus_atom_escape()? { + return Ok(Some(atom)); + } + + // TODO: Implement + // self.consume_character_class() + // self.consume_capturing_group() + // self.consume_uncapturing_group() + + Ok(None) } // ``` From f4bcaabe43d9c0cb4ead094ee6b41e7102b6f752 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 16:18:46 +0900 Subject: [PATCH 057/143] Handle \k correctly --- .../src/parser/body_parser/parser/atom_escape.rs | 10 ++++++---- .../src/parser/body_parser/unicode.rs | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs index 92a92156bd37b..a874c9db8817e 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs @@ -254,15 +254,17 @@ impl<'a> super::parse::PatternParser<'a> { let cp = self.reader.peek()?; if self.state.is_unicode_mode() { - if unicode::is_syntax_character(cp) || cp == '/' as u32 { + if unicode::is_syntax_character(cp) { + self.reader.advance(); + return Some(cp); + } + if cp == '/' as u32 { self.reader.advance(); return Some(cp); } - - return None; } - if !unicode::is_id_continue(cp) { + if !self.state.is_unicode_mode() && !unicode::is_id_continue(cp) { self.reader.advance(); return Some(cp); } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index 15829a64c2121..f4c93868a0382 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -16,7 +16,7 @@ pub fn is_non_zero_digit(cp: u32) -> bool { } pub fn is_id_continue(cp: u32) -> bool { - char::from_u32(cp).map_or(false, unicode_id_start::is_id_continue_unicode) + char::from_u32(cp).map_or(false, unicode_id_start::is_id_continue) } pub fn is_valid_unicode(cp: u32) -> bool { @@ -45,11 +45,13 @@ pub fn is_unicode_property_value_character(cp: u32) -> bool { pub fn is_identifier_start_char(cp: u32) -> bool { char::from_u32(cp) - .map_or(false, |c| unicode_id_start::is_id_start_unicode(c) || c == '$' || c == '_') + .map_or(false, |c| { + unicode_id_start::is_id_start(c) || c == '$' || c == '_' + }) } pub fn is_identifier_part_char(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_continue_unicode(c) || c == '$') + char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_continue(c) || c == '$') } pub fn is_lead_surrogate(cp: u32) -> bool { From 9bb140dfaa41051f213c3473c1f56996c0ecdba8 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 16:27:07 +0900 Subject: [PATCH 058/143] Add tests --- crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index fe3294ff35988..8f0ba495575b3 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -74,6 +74,9 @@ mod test { ), (r"k\p{Emoji_Presentation", ParserOptions::default().with_unicode_flags(true, false)), (r"k\p{Script=", ParserOptions::default().with_unicode_flags(true, false)), + (r"l\ka", ParserOptions::default().with_unicode_flags(true, false)), + (r"l\k<", ParserOptions::default().with_unicode_flags(true, false)), + (r"l\k Date: Mon, 8 Jul 2024 16:49:15 +0900 Subject: [PATCH 059/143] Fix up backrefs --- crates/oxc_regexp_parser/examples/parser.rs | 3 +- crates/oxc_regexp_parser/src/ast.rs | 30 ++++++++++++------- .../src/parser/body_parser/parser/atom.rs | 13 ++++---- .../src/parser/body_parser/unicode.rs | 5 +--- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 39069605976a5..05a4c916c4819 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -17,7 +17,8 @@ fn main() { ("/(?=a)|(?<=b)|(?!c)|(?x\1c/u", ParserOptions::default()), ] { println!("Test: {pat} + {options:?}"); let parser = Parser::new(&allocator, pat, options); diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 013a48de28da5..ce7cfbd3376c7 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -1,6 +1,8 @@ use oxc_allocator::{Box, Vec}; use oxc_span::{Atom as SpanAtom, Span}; +// NOTE: Should keep all `enum` size == 16 + /// The root node. #[derive(Debug)] pub struct RegExpLiteral<'a> { @@ -114,30 +116,36 @@ pub enum Atom<'a> { /// E.g. `\1`, `\k` #[derive(Debug)] pub enum Backreference<'a> { - AmbiguousBackreference(Box<'a, AmbiguousBackreference<'a>>), - UnambiguousBackreference(Box<'a, UnambiguousBackreference<'a>>), - TemporaryBackreference(Box<'a, TemporaryBackreference<'a>>), + NormalBackreference(Box<'a, NormalBackreference<'a>>), + NamedBackreference(Box<'a, NamedBackreference<'a>>), + TemporaryNormalBackreference(Box<'a, TemporaryNormalBackreference>), + TemporaryNamedBackreference(Box<'a, TemporaryNamedBackreference<'a>>), } #[derive(Debug)] -pub struct AmbiguousBackreference<'a> { +pub struct NormalBackreference<'a> { pub span: Span, - pub r#ref: SpanAtom<'a>, // `\1` + pub r#ref: usize, // 1 for \1 + pub resolved: CapturingGroup<'a>, +} + +#[derive(Debug)] +pub struct NamedBackreference<'a> { + pub span: Span, + pub r#ref: SpanAtom<'a>, // name for \k pub resolved: Vec<'a, CapturingGroup<'a>>, } #[derive(Debug)] -pub struct UnambiguousBackreference<'a> { +pub struct TemporaryNormalBackreference { pub span: Span, - pub r#ref: SpanAtom<'a>, // `\k` - pub resolved: CapturingGroup<'a>, + pub r#ref: usize, // 1 for \1 } -/// Not yet resolved backreference. #[derive(Debug)] -pub struct TemporaryBackreference<'a> { +pub struct TemporaryNamedBackreference<'a> { pub span: Span, - pub r#ref: SpanAtom<'a>, // `\k` + pub r#ref: SpanAtom<'a>, // name for \k } /// The capturing group. diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 3a32ece96067d..acbb4ffb7a340 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -1,6 +1,5 @@ use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Atom as SpanAtom; use crate::{ast, parser::body_parser::unicode}; @@ -60,15 +59,15 @@ impl<'a> super::parse::PatternParser<'a> { } // `DecimalEscape`: \1 means Backreference - if self.consume_decimal_escape().is_some() { + if let Some(decimal) = self.consume_decimal_escape() { let span_end = self.reader.span_position(); // NOTE: Should be distinguished from `k`? return Ok(Some(ast::Atom::Backreference(Box::new_in( - ast::Backreference::TemporaryBackreference(Box::new_in( - ast::TemporaryBackreference { + ast::Backreference::TemporaryNormalBackreference(Box::new_in( + ast::TemporaryNormalBackreference { span: self.span_factory.create(span_start, span_end), - r#ref: SpanAtom::from(&self.source_text[span_start..span_end]), + r#ref: decimal, }, self.allocator, )), @@ -137,8 +136,8 @@ impl<'a> super::parse::PatternParser<'a> { if let Some(r#ref) = self.consume_k_group_name()? { // NOTE: Should be distinguished from `DecimalEscape`? return Ok(Some(ast::Atom::Backreference(Box::new_in( - ast::Backreference::TemporaryBackreference(Box::new_in( - ast::TemporaryBackreference { + ast::Backreference::TemporaryNamedBackreference(Box::new_in( + ast::TemporaryNamedBackreference { span: self.span_factory.create(span_start, self.reader.span_position()), r#ref, }, diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs index f4c93868a0382..d4f0c5506b076 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs @@ -44,10 +44,7 @@ pub fn is_unicode_property_value_character(cp: u32) -> bool { } pub fn is_identifier_start_char(cp: u32) -> bool { - char::from_u32(cp) - .map_or(false, |c| { - unicode_id_start::is_id_start(c) || c == '$' || c == '_' - }) + char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_start(c) || c == '$' || c == '_') } pub fn is_identifier_part_char(cp: u32) -> bool { From 25068b436ef8889b46bbe2b7ef7bd5e9048617dd Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 8 Jul 2024 16:51:54 +0900 Subject: [PATCH 060/143] Fix typo --- crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index 8f0ba495575b3..9f8653f8c5c06 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -1,7 +1,7 @@ mod atom; mod atom_escape; /// Main entry point for `PatternParser` -/// All others are splitted files to `impl PatternParser` +/// All others are just split files to `impl PatternParser` mod parse; mod shared; From 38fad90899d2825958100b20e4a1ea94f494fdda Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 9 Jul 2024 14:30:45 +0900 Subject: [PATCH 061/143] Impl non-capturing group --- crates/oxc_regexp_parser/src/ast.rs | 6 ++--- .../src/parser/body_parser/parser/atom.rs | 26 ++++++++++++++++++- .../src/parser/body_parser/parser/mod.rs | 2 ++ .../src/parser/body_parser/parser/parse.rs | 12 ++++----- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index ce7cfbd3376c7..f50ea27812547 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -107,7 +107,7 @@ pub enum Atom<'a> { ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), Backreference(Box<'a, Backreference<'a>>), CapturingGroup(Box<'a, CapturingGroup<'a>>), - Group(Box<'a, Group<'a>>), + NonCapturingGroup(Box<'a, NonCapturingGroup<'a>>), // NOTE: Is this really necessary? // LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), } @@ -347,10 +347,10 @@ pub enum ClassSubtractionLeft<'a> { ClassSubtraction(Box<'a, ClassSubtraction<'a>>), } -/// The uncapturing group. +/// The non-capturing group. /// E.g. `(?:ab)` #[derive(Debug)] -pub struct Group<'a> { +pub struct NonCapturingGroup<'a> { pub span: Span, pub alternatives: Vec<'a, Alternative<'a>>, } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index acbb4ffb7a340..571fbebba12ff 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -52,7 +52,7 @@ impl<'a> super::parse::PatternParser<'a> { // [+NamedCaptureGroups] k GroupName[?UnicodeMode] // ``` // - pub(super) fn consume_reverse_solidus_atom_escape(&mut self) -> Result>> { + pub(super) fn consume_atom_escape(&mut self) -> Result>> { let span_start = self.reader.span_position(); if !self.reader.eat('\\') { return Ok(None); @@ -149,4 +149,28 @@ impl<'a> super::parse::PatternParser<'a> { Err(OxcDiagnostic::error("Invalid escape")) } + + // ``` + // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ``` + pub(super) fn consume_non_capturing_group(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + if self.reader.eat3('(', '?', ':') { + let alternatives = self.consume_disjunction()?; + + if self.reader.eat(')') { + return Ok(Some(ast::Atom::NonCapturingGroup(Box::new_in( + ast::NonCapturingGroup { + span: self.span_factory.create(span_start, self.reader.span_position()), + alternatives, + }, + self.allocator, + )))); + } + + return Err(OxcDiagnostic::error("Unterminated group")); + } + + Ok(None) + } } diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index 9f8653f8c5c06..3dfe45d4731ce 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -38,6 +38,7 @@ mod test { ), (r"\n\cM\0\x41\u1f60\.\/", ParserOptions::default()), (r"\u{1f600}", ParserOptions::default().with_unicode_flags(true, false)), + ("(?:abc)", ParserOptions::default()), ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_ok(), @@ -77,6 +78,7 @@ mod test { (r"l\ka", ParserOptions::default().with_unicode_flags(true, false)), (r"l\k<", ParserOptions::default().with_unicode_flags(true, false)), (r"l\k PatternParser<'a> { return Err(OxcDiagnostic::error("Empty")); } - // TODO: Remove later, just for clippy unused - self.reader.eat3('a', 'b', 'c'); - self.consume_pattern() } @@ -93,7 +90,7 @@ impl<'a> PatternParser<'a> { // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] // ``` // - fn consume_disjunction(&mut self) -> Result>> { + pub(super) fn consume_disjunction(&mut self) -> Result>> { let mut alternatives = Vec::new_in(self.allocator); // TODO: Implement @@ -306,14 +303,17 @@ impl<'a> PatternParser<'a> { if let Some(atom) = self.consume_dot() { return Ok(Some(atom)); } - if let Some(atom) = self.consume_reverse_solidus_atom_escape()? { + if let Some(atom) = self.consume_atom_escape()? { return Ok(Some(atom)); } // TODO: Implement // self.consume_character_class() // self.consume_capturing_group() - // self.consume_uncapturing_group() + + if let Some(atom) = self.consume_non_capturing_group()? { + return Ok(Some(atom)); + } Ok(None) } From 0849711367ed32bac9217bda5f186ca912716a5f Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 9 Jul 2024 14:53:51 +0900 Subject: [PATCH 062/143] Omit group and backref connections temporary --- crates/oxc_regexp_parser/src/ast.rs | 27 ++++++------------- .../src/parser/body_parser/parser/atom.rs | 10 +++---- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index f50ea27812547..8aedc25306efd 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -116,36 +116,24 @@ pub enum Atom<'a> { /// E.g. `\1`, `\k` #[derive(Debug)] pub enum Backreference<'a> { - NormalBackreference(Box<'a, NormalBackreference<'a>>), + NormalBackreference(Box<'a, NormalBackreference>), NamedBackreference(Box<'a, NamedBackreference<'a>>), - TemporaryNormalBackreference(Box<'a, TemporaryNormalBackreference>), - TemporaryNamedBackreference(Box<'a, TemporaryNamedBackreference<'a>>), } #[derive(Debug)] -pub struct NormalBackreference<'a> { +pub struct NormalBackreference { pub span: Span, pub r#ref: usize, // 1 for \1 - pub resolved: CapturingGroup<'a>, + // NOTE: How to handle this...? + // pub resolved: CapturingGroup<'a>, } #[derive(Debug)] pub struct NamedBackreference<'a> { pub span: Span, pub r#ref: SpanAtom<'a>, // name for \k - pub resolved: Vec<'a, CapturingGroup<'a>>, -} - -#[derive(Debug)] -pub struct TemporaryNormalBackreference { - pub span: Span, - pub r#ref: usize, // 1 for \1 -} - -#[derive(Debug)] -pub struct TemporaryNamedBackreference<'a> { - pub span: Span, - pub r#ref: SpanAtom<'a>, // name for \k + // NOTE: How to handle this...? + // pub resolved: Vec<'a, CapturingGroup<'a>>, } /// The capturing group. @@ -155,7 +143,8 @@ pub struct CapturingGroup<'a> { pub span: Span, pub name: Option>, pub alternatives: Vec<'a, Alternative<'a>>, - pub references: Vec<'a, Backreference<'a>>, + // NOTE: How to handle this...? + // pub references: Vec<'a, Backreference<'a>>, } /// The character. diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index 571fbebba12ff..ba22f7dd643e6 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -62,10 +62,9 @@ impl<'a> super::parse::PatternParser<'a> { if let Some(decimal) = self.consume_decimal_escape() { let span_end = self.reader.span_position(); - // NOTE: Should be distinguished from `k`? return Ok(Some(ast::Atom::Backreference(Box::new_in( - ast::Backreference::TemporaryNormalBackreference(Box::new_in( - ast::TemporaryNormalBackreference { + ast::Backreference::NormalBackreference(Box::new_in( + ast::NormalBackreference { span: self.span_factory.create(span_start, span_end), r#ref: decimal, }, @@ -134,10 +133,9 @@ impl<'a> super::parse::PatternParser<'a> { // `k`: \k means Backreference if let Some(r#ref) = self.consume_k_group_name()? { - // NOTE: Should be distinguished from `DecimalEscape`? return Ok(Some(ast::Atom::Backreference(Box::new_in( - ast::Backreference::TemporaryNamedBackreference(Box::new_in( - ast::TemporaryNamedBackreference { + ast::Backreference::NamedBackreference(Box::new_in( + ast::NamedBackreference { span: self.span_factory.create(span_start, self.reader.span_position()), r#ref, }, From ba07674815b7fbec4ff4a042441f3f9b01d438c3 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 9 Jul 2024 16:06:39 +0900 Subject: [PATCH 063/143] Implement CaptureingGroup --- .../src/parser/body_parser/parser/atom.rs | 51 +++++++++++++++++++ .../src/parser/body_parser/parser/mod.rs | 2 + .../src/parser/body_parser/parser/parse.rs | 12 ++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs index ba22f7dd643e6..ecc05c547993c 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs @@ -1,5 +1,6 @@ use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Atom as SpanAtom; use crate::{ast, parser::body_parser::unicode}; @@ -148,11 +149,61 @@ impl<'a> super::parse::PatternParser<'a> { Err(OxcDiagnostic::error("Invalid escape")) } + // ``` + // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ``` + pub(super) fn consume_capturing_group(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat('(') { + let group_name = self.consume_group_specifier()?; + let alternatives = self.consume_disjunction()?; + + if self.reader.eat(')') { + return Ok(Some(ast::Atom::CapturingGroup(Box::new_in( + ast::CapturingGroup { + span: self.span_factory.create(span_start, self.reader.span_position()), + name: group_name, + alternatives, + }, + self.allocator, + )))); + } + + return Err(OxcDiagnostic::error("Unterminated group")); + } + + Ok(None) + } + + // ``` + // GroupSpecifier[UnicodeMode] :: + // ? GroupName[?UnicodeMode] + // ``` + // + fn consume_group_specifier(&mut self) -> Result>> { + if self.reader.eat('?') { + if let Some(group_name) = self.consume_group_name()? { + // TODO: Implement + // if (this._groupSpecifiers.hasInScope(this._lastStrValue)) { + // this.raise("Duplicate capture group name"); + // } + // this._groupSpecifiers.addToScope(this._lastStrValue); + return Ok(Some(group_name)); + } + + return Err(OxcDiagnostic::error("Invalid group")); + } + + Ok(None) + } + // ``` // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` pub(super) fn consume_non_capturing_group(&mut self) -> Result>> { let span_start = self.reader.span_position(); + if self.reader.eat3('(', '?', ':') { let alternatives = self.consume_disjunction()?; diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs index 3dfe45d4731ce..09580cdaab418 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs @@ -79,6 +79,8 @@ mod test { (r"l\k<", ParserOptions::default().with_unicode_flags(true, false)), (r"l\k", ParserOptions::default()), ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs index ee678fc32958f..8056ed88beca7 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs @@ -309,7 +309,17 @@ impl<'a> PatternParser<'a> { // TODO: Implement // self.consume_character_class() - // self.consume_capturing_group() + + // In the spec, (named) capturing group and non-capturing group are defined in that order. + // If `:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? + // Anyway, if we don't look ahead here, we will get a syntax error. + let checkpoint = self.reader.checkpoint(); + if !self.reader.eat3('(', '?', ':') { + if let Some(atom) = self.consume_capturing_group()? { + return Ok(Some(atom)); + } + } + self.reader.rewind(checkpoint); if let Some(atom) = self.consume_non_capturing_group()? { return Ok(Some(atom)); From d0f7624d46db35d040ec5d9f3d9a1b2b46a850c8 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 9 Jul 2024 16:10:10 +0900 Subject: [PATCH 064/143] Update examples --- crates/oxc_regexp_parser/examples/parser.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 05a4c916c4819..37c1dc4877805 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -19,6 +19,7 @@ fn main() { (r"/\n\cM\0\x41\u1234\./u", ParserOptions::default()), (r"/\n\cM\0\x41\u{1f600}\./u", ParserOptions::default()), (r"/a\kx\1c/u", ParserOptions::default()), + (r"/(cg)(?cg)(?:g)/", ParserOptions::default()), ] { println!("Test: {pat} + {options:?}"); let parser = Parser::new(&allocator, pat, options); From 8cf9bc540657322489ef7f9be66cd5c20e555c07 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 10 Jul 2024 14:10:20 +0900 Subject: [PATCH 065/143] Reduce redunduntly nested directory --- .../src/{parser => }/body_parser/mod.rs | 0 .../src/{parser => }/body_parser/parser/atom.rs | 2 +- .../{parser => }/body_parser/parser/atom_escape.rs | 2 +- .../src/{parser => }/body_parser/parser/mod.rs | 0 .../src/{parser => }/body_parser/parser/parse.rs | 8 +++----- .../src/{parser => }/body_parser/parser/shared.rs | 2 +- .../src/{parser => }/body_parser/reader.rs | 0 .../src/{parser => }/body_parser/state.rs | 0 .../src/{parser => }/body_parser/unicode.rs | 0 .../{parser => }/body_parser/unicode_property.rs | 0 .../src/{parser => }/flag_parser.rs | 5 +---- crates/oxc_regexp_parser/src/lib.rs | 13 +++++++++++-- .../src/{parser => }/literal_parser.rs | 7 ++----- .../oxc_regexp_parser/src/{parser => }/options.rs | 0 crates/oxc_regexp_parser/src/parser/mod.rs | 11 ----------- crates/oxc_regexp_parser/src/{parser => }/span.rs | 0 16 files changed, 20 insertions(+), 30 deletions(-) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/mod.rs (100%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/parser/atom.rs (99%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/parser/atom_escape.rs (99%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/parser/mod.rs (100%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/parser/parse.rs (99%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/parser/shared.rs (99%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/reader.rs (100%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/state.rs (100%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/unicode.rs (100%) rename crates/oxc_regexp_parser/src/{parser => }/body_parser/unicode_property.rs (100%) rename crates/oxc_regexp_parser/src/{parser => }/flag_parser.rs (96%) rename crates/oxc_regexp_parser/src/{parser => }/literal_parser.rs (97%) rename crates/oxc_regexp_parser/src/{parser => }/options.rs (100%) delete mode 100644 crates/oxc_regexp_parser/src/parser/mod.rs rename crates/oxc_regexp_parser/src/{parser => }/span.rs (100%) diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/mod.rs rename to crates/oxc_regexp_parser/src/body_parser/mod.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs similarity index 99% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/atom.rs index ecc05c547993c..d79f85065544c 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs @@ -2,7 +2,7 @@ use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; -use crate::{ast, parser::body_parser::unicode}; +use crate::{ast, body_parser::unicode}; impl<'a> super::parse::PatternParser<'a> { // ``` diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs similarity index 99% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs index a874c9db8817e..5c79c73c2642b 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/atom_escape.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs @@ -3,7 +3,7 @@ use oxc_span::Atom as SpanAtom; use crate::{ ast, - parser::body_parser::{unicode, unicode_property}, + body_parser::{unicode, unicode_property}, }; impl<'a> super::parse::PatternParser<'a> { diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser/mod.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/mod.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs similarity index 99% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 8056ed88beca7..8f2c44b95b086 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -3,11 +3,9 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ ast, - parser::{ - body_parser::{reader::Reader, state::State, unicode}, - options::ParserOptions, - span::SpanFactory, - }, + body_parser::{reader::Reader, state::State, unicode}, + options::ParserOptions, + span::SpanFactory, }; pub struct PatternParser<'a> { diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/parser/shared.rs b/crates/oxc_regexp_parser/src/body_parser/parser/shared.rs similarity index 99% rename from crates/oxc_regexp_parser/src/parser/body_parser/parser/shared.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/shared.rs index 35af9b6fbcf09..abc72e627e53d 100644 --- a/crates/oxc_regexp_parser/src/parser/body_parser/parser/shared.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/shared.rs @@ -1,7 +1,7 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; -use crate::parser::body_parser::unicode; +use crate::body_parser::unicode; impl<'a> super::parse::PatternParser<'a> { pub(super) fn consume_fixed_hex_digits(&mut self, len: usize) -> Option { diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/reader.rs rename to crates/oxc_regexp_parser/src/body_parser/reader.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/state.rs rename to crates/oxc_regexp_parser/src/body_parser/state.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/unicode.rs rename to crates/oxc_regexp_parser/src/body_parser/unicode.rs diff --git a/crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/body_parser/unicode_property.rs rename to crates/oxc_regexp_parser/src/body_parser/unicode_property.rs diff --git a/crates/oxc_regexp_parser/src/parser/flag_parser.rs b/crates/oxc_regexp_parser/src/flag_parser.rs similarity index 96% rename from crates/oxc_regexp_parser/src/parser/flag_parser.rs rename to crates/oxc_regexp_parser/src/flag_parser.rs index e8659eb7e635a..4b1c520ff66aa 100644 --- a/crates/oxc_regexp_parser/src/parser/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/flag_parser.rs @@ -2,10 +2,7 @@ use oxc_allocator::Allocator; use oxc_diagnostics::{OxcDiagnostic, Result}; use rustc_hash::FxHashSet; -use crate::{ - ast, - parser::{options::ParserOptions, span::SpanFactory}, -}; +use crate::{ast, options::ParserOptions, span::SpanFactory}; pub struct FlagsParser<'a> { source_text: &'a str, diff --git a/crates/oxc_regexp_parser/src/lib.rs b/crates/oxc_regexp_parser/src/lib.rs index 5d6b6269e0744..ae2f1c0a58bc0 100644 --- a/crates/oxc_regexp_parser/src/lib.rs +++ b/crates/oxc_regexp_parser/src/lib.rs @@ -1,4 +1,13 @@ +#![allow(clippy::missing_errors_doc)] + pub mod ast; -mod parser; +mod body_parser; +mod flag_parser; +mod literal_parser; +mod options; +mod span; -pub use crate::parser::{FlagsParser, Parser, ParserOptions, PatternParser}; +pub use crate::body_parser::PatternParser; +pub use crate::flag_parser::FlagsParser; +pub use crate::literal_parser::Parser; +pub use crate::options::ParserOptions; diff --git a/crates/oxc_regexp_parser/src/parser/literal_parser.rs b/crates/oxc_regexp_parser/src/literal_parser.rs similarity index 97% rename from crates/oxc_regexp_parser/src/parser/literal_parser.rs rename to crates/oxc_regexp_parser/src/literal_parser.rs index 4f2be9dae227f..b1d9145502a75 100644 --- a/crates/oxc_regexp_parser/src/parser/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/literal_parser.rs @@ -2,11 +2,8 @@ use oxc_allocator::Allocator; use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::{ - ast, - parser::{ - body_parser::PatternParser, flag_parser::FlagsParser, options::ParserOptions, - span::SpanFactory, - }, + ast, body_parser::PatternParser, flag_parser::FlagsParser, options::ParserOptions, + span::SpanFactory, }; // LiteralParser diff --git a/crates/oxc_regexp_parser/src/parser/options.rs b/crates/oxc_regexp_parser/src/options.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/options.rs rename to crates/oxc_regexp_parser/src/options.rs diff --git a/crates/oxc_regexp_parser/src/parser/mod.rs b/crates/oxc_regexp_parser/src/parser/mod.rs deleted file mode 100644 index 5230ed7245872..0000000000000 --- a/crates/oxc_regexp_parser/src/parser/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![allow(clippy::missing_errors_doc)] -mod body_parser; -mod flag_parser; -mod literal_parser; -mod options; -mod span; - -pub use body_parser::PatternParser; -pub use flag_parser::FlagsParser; -pub use literal_parser::Parser; -pub use options::ParserOptions; diff --git a/crates/oxc_regexp_parser/src/parser/span.rs b/crates/oxc_regexp_parser/src/span.rs similarity index 100% rename from crates/oxc_regexp_parser/src/parser/span.rs rename to crates/oxc_regexp_parser/src/span.rs From b692a0e6bf32733ea472b86b6b73ed5528845ae1 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 11 Jul 2024 10:34:36 +0900 Subject: [PATCH 066/143] Wip character class --- .../src/body_parser/parser/atom.rs | 80 ++++++- .../src/body_parser/parser/atom_class.rs | 212 ++++++++++++++++++ .../src/body_parser/parser/mod.rs | 1 + .../src/body_parser/parser/parse.rs | 6 +- 4 files changed, 295 insertions(+), 4 deletions(-) create mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs index d79f85065544c..b58fc88809822 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs @@ -1,4 +1,4 @@ -use oxc_allocator::Box; +use oxc_allocator::{Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; @@ -149,6 +149,84 @@ impl<'a> super::parse::PatternParser<'a> { Err(OxcDiagnostic::error("Invalid escape")) } + // ``` + // CharacterClass[UnicodeMode, UnicodeSetsMode] :: + // [ [lookahead ≠ ^] ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] + // [^ ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] + // ``` + // + pub(super) fn consume_character_class(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat('[') { + let negate = self.reader.eat('^'); + + if self.state.is_unicode_sets_mode() { + let contents = self.consume_class_contents_unicode_sets()?; + + if self.reader.eat(']') { + return Ok(Some(ast::Atom::CharacterClass(Box::new_in( + ast::CharacterClass::UnicodeSetsCharacterClass(Box::new_in( + ast::UnicodeSetsCharacterClass { + span: self + .span_factory + .create(span_start, self.reader.span_position()), + negate, + elements: contents, + }, + self.allocator, + )), + self.allocator, + )))); + } + } + + let contents = self.consume_class_contents()?; + if self.reader.eat(']') { + return Ok(Some(ast::Atom::CharacterClass(Box::new_in( + ast::CharacterClass::ClassRangesCharacterClass(Box::new_in( + ast::ClassRangesCharacterClass { + span: self.span_factory.create(span_start, self.reader.span_position()), + negate, + elements: contents, + }, + self.allocator, + )), + self.allocator, + )))); + } + + return Err(OxcDiagnostic::error("Unterminated character class")); + } + + Ok(None) + } + + // ``` + // ClassContents[UnicodeMode, UnicodeSetsMode] :: + // [empty] + // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] + // [+UnicodeSetsMode] ClassSetExpression + // ``` + // + pub(super) fn consume_class_contents( + &mut self, + ) -> Result>> { + self.consume_nonempty_class_ranges() + } + pub(super) fn consume_class_contents_unicode_sets( + &mut self, + ) -> Result>> { + let contents = Vec::new_in(self.allocator); + + // TODO: Implement consume_class_set_expression() + if self.reader.eat('👻') { + return Err(OxcDiagnostic::error("TODO")); + } + + Ok(contents) + } + // ``` // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs new file mode 100644 index 0000000000000..1dafcb2e52d5b --- /dev/null +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs @@ -0,0 +1,212 @@ +use oxc_allocator::{Box, Vec}; +use oxc_diagnostics::{OxcDiagnostic, Result}; +// use oxc_span::Atom as SpanAtom; + +use crate::ast; + +impl<'a> super::parse::PatternParser<'a> { + // ``` + // NonemptyClassRanges[UnicodeMode] :: + // ClassAtom[?UnicodeMode] + // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] + // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] + // ``` + // + pub(super) fn consume_nonempty_class_ranges( + &mut self, + ) -> Result>> { + let mut contents = Vec::new_in(self.allocator); + + loop { + let range_span_start = self.reader.span_position(); + + let Some(first_class_atom) = self.consume_class_atom()? else { + // If there is no more characters, break the loop + break; + }; + + let span_start = self.reader.span_position(); + let Some(cp) = self.reader.peek().filter(|&cp| cp == '-' as u32) else { + // If there is no `-`, push the character as a single `ClassAtom` + contents.push(first_class_atom); + // Then continue to find the next `Non` + continue; + }; + self.reader.advance(); + + let dash_character = ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }; + + let Some(second_class_atom) = self.consume_class_atom()? else { + // If there is no range end character, push `-` as a single `ClassAtom` + contents.push(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + dash_character, + self.allocator, + ))); + continue; + }; + + match (first_class_atom, second_class_atom) { + ( + ast::ClassRangesCharacterClassElement::Character(min_character), + ast::ClassRangesCharacterClassElement::Character(max_character), + ) => { + contents.push(ast::ClassRangesCharacterClassElement::CharacterClassRange( + Box::new_in( + ast::CharacterClassRange { + span: self + .span_factory + .create(range_span_start, self.reader.span_position()), + min: min_character.unbox(), + max: max_character.unbox(), + }, + self.allocator, + ), + )); + } + _ => { + return Err(OxcDiagnostic::error("Invalid character class range")); + } + } + } + + Ok(contents) + } + + // ``` + // ClassAtom[UnicodeMode] :: + // - + // ClassAtomNoDash[?UnicodeMode] + // ``` + // + // ``` + // ClassAtomNoDash[UnicodeMode] :: + // SourceCharacter but not one of \ or ] or - + // \ ClassEscape[?UnicodeMode] + // ``` + // + fn consume_class_atom(&mut self) -> Result>> { + let Some(cp) = self.reader.peek() else { + return Ok(None); + }; + + let span_start = self.reader.span_position(); + + if cp != '\\' as u32 && cp != ']' as u32 && cp != '-' as u32 { + self.reader.advance(); + + return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }, + self.allocator, + )))); + } + + if self.reader.eat('\\') { + if let Some(class_escape) = self.consume_class_escape()? { + return Ok(Some(class_escape)); + } + + return Err(OxcDiagnostic::error("Invalid escape")); + } + + Ok(None) + } + + // ``` + // ClassEscape[UnicodeMode] :: + // b + // [+UnicodeMode] - + // CharacterClassEscape[?UnicodeMode] + // CharacterEscape[?UnicodeMode] + // ``` + // + fn consume_class_escape( + &mut self, + ) -> Result>> { + let Some(cp) = self.reader.peek() else { + return Ok(None); + }; + + // TODO: `span_start` as args? + let span_start = self.reader.span_position() - 1; // -1 for `\` + + if cp == 'b' as u32 { + self.reader.advance(); + + return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }, + self.allocator, + )))); + } + + if self.state.is_unicode_mode() && cp == '-' as u32 { + self.reader.advance(); + + return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }, + self.allocator, + )))); + } + + if let Some((kind, negate)) = self.consume_character_class_escape() { + return Ok(Some(ast::ClassRangesCharacterClassElement::EscapeCharacterSet( + Box::new_in( + ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind, + negate, + }, + self.allocator, + ), + ))); + } + if self.state.is_unicode_mode() { + if let Some(((name, value, negate), is_strings_related)) = + self.consume_character_class_escape_unicode()? + { + debug_assert!( + !is_strings_related, + "This must be `false`, if `unicode_sets_mode: true`, here should not be passed" + ); + + let span = self.span_factory.create(span_start, self.reader.span_position()); + return Ok(Some( + ast::ClassRangesCharacterClassElement::CharacterUnicodePropertyCharacterSet( + Box::new_in( + ast::CharacterUnicodePropertyCharacterSet { + span, + key: name, + value, + negate, + }, + self.allocator, + ), + ), + )); + } + } + + if let Some(character_escape) = self.consume_character_escape()? { + return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: character_escape, + }, + self.allocator, + )))); + } + + Ok(None) + } +} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index 09580cdaab418..de59743ffb48a 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -1,4 +1,5 @@ mod atom; +mod atom_class; mod atom_escape; /// Main entry point for `PatternParser` /// All others are just split files to `impl PatternParser` diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 8f2c44b95b086..e0c2fe53bda74 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -304,9 +304,9 @@ impl<'a> PatternParser<'a> { if let Some(atom) = self.consume_atom_escape()? { return Ok(Some(atom)); } - - // TODO: Implement - // self.consume_character_class() + if let Some(atom) = self.consume_character_class()? { + return Ok(Some(atom)); + } // In the spec, (named) capturing group and non-capturing group are defined in that order. // If `:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? From 047e104c5c4ed27ea3ff6e3d0eeb96962b022a44 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 11 Jul 2024 11:03:01 +0900 Subject: [PATCH 067/143] Refactor wip --- .../src/body_parser/parser/atom.rs | 13 +++-- .../src/body_parser/parser/parse.rs | 53 ++++++++----------- 2 files changed, 27 insertions(+), 39 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs index b58fc88809822..7e5ec677bfd41 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs @@ -13,10 +13,7 @@ impl<'a> super::parse::PatternParser<'a> { pub(super) fn consume_pattern_character(&mut self) -> Option> { let span_start = self.reader.span_position(); - let cp = self.reader.peek()?; - if unicode::is_syntax_character(cp) { - return None; - } + let cp = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp))?; self.reader.advance(); Some(ast::Atom::Character(Box::new_in( @@ -30,6 +27,7 @@ impl<'a> super::parse::PatternParser<'a> { pub(super) fn consume_dot(&mut self) -> Option> { let span_start = self.reader.span_position(); + if !self.reader.eat('.') { return None; } @@ -55,18 +53,17 @@ impl<'a> super::parse::PatternParser<'a> { // pub(super) fn consume_atom_escape(&mut self) -> Result>> { let span_start = self.reader.span_position(); + if !self.reader.eat('\\') { return Ok(None); } // `DecimalEscape`: \1 means Backreference if let Some(decimal) = self.consume_decimal_escape() { - let span_end = self.reader.span_position(); - return Ok(Some(ast::Atom::Backreference(Box::new_in( ast::Backreference::NormalBackreference(Box::new_in( ast::NormalBackreference { - span: self.span_factory.create(span_start, span_end), + span: self.span_factory.create(span_start, self.reader.span_position()), r#ref: decimal, }, self.allocator, @@ -75,6 +72,7 @@ impl<'a> super::parse::PatternParser<'a> { )))); } + // `CharacterClassEscape`: \d if let Some((kind, negate)) = self.consume_character_class_escape() { return Ok(Some(ast::Atom::CharacterSet(Box::new_in( ast::CharacterSet::EscapeCharacterSet(Box::new_in( @@ -88,6 +86,7 @@ impl<'a> super::parse::PatternParser<'a> { self.allocator, )))); } + // `CharacterEscape`: \p{} if self.state.is_unicode_mode() { if let Some(((name, value, negate), is_strings_related)) = self.consume_character_class_escape_unicode()? diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index e0c2fe53bda74..4565eec5184e8 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -44,13 +44,13 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_pattern(&mut self) -> Result> { - let span_start = self.reader.span_position(); // TODO: Define state, use later somewhere // this._groupSpecifiers.clear(); // TODO: Define state, use later here // this._backreferenceNames.clear(); - let alternatives = self.consume_disjunction()?; + let span_start = self.reader.span_position(); + let disjunction = self.consume_disjunction()?; if self.reader.peek().is_some() { if self.reader.eat(')') { @@ -73,7 +73,7 @@ impl<'a> PatternParser<'a> { let pattern = ast::Pattern { span: self.span_factory.create(span_start, self.reader.span_position()), - alternatives, + alternatives: disjunction, }; // TODO: Implement, finalize backreferences with captured groups @@ -89,19 +89,21 @@ impl<'a> PatternParser<'a> { // ``` // pub(super) fn consume_disjunction(&mut self) -> Result>> { - let mut alternatives = Vec::new_in(self.allocator); + let mut disjunction = Vec::new_in(self.allocator); // TODO: Implement // this._groupSpecifiers.enterDisjunction(); let mut i: usize = 0; loop { - alternatives.push(self.consume_alternative(i)?); + disjunction.push(self.consume_alternative(i)?); - if !self.reader.eat('|') { - break; + if self.reader.eat('|') { + i += 1; + continue; } - i += 1; + + break; } if self.reader.eat('{') { @@ -111,7 +113,7 @@ impl<'a> PatternParser<'a> { // TODO: Implement // this._groupSpecifiers.leaveDisjunction(); - Ok(alternatives) + Ok(disjunction) } // ``` @@ -121,26 +123,20 @@ impl<'a> PatternParser<'a> { // ``` // fn consume_alternative(&mut self, i: usize) -> Result> { - let span_start = self.reader.span_position(); - // TODO: Implement let _ = i; // this._groupSpecifiers.enterAlternative(i); - let mut elements = Vec::new_in(self.allocator); - loop { - if self.reader.peek().is_none() { - break; - } - let Some(term) = self.consume_term()? else { - break; - }; - elements.push(term); + let span_start = self.reader.span_position(); + + let mut terms = Vec::new_in(self.allocator); + while let Some(term) = self.consume_term()? { + terms.push(term); } Ok(ast::Alternative { span: self.span_factory.create(span_start, self.reader.span_position()), - terms: elements, + terms, }) } @@ -307,21 +303,14 @@ impl<'a> PatternParser<'a> { if let Some(atom) = self.consume_character_class()? { return Ok(Some(atom)); } - // In the spec, (named) capturing group and non-capturing group are defined in that order. - // If `:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? - // Anyway, if we don't look ahead here, we will get a syntax error. - let checkpoint = self.reader.checkpoint(); - if !self.reader.eat3('(', '?', ':') { - if let Some(atom) = self.consume_capturing_group()? { - return Ok(Some(atom)); - } - } - self.reader.rewind(checkpoint); - + // But if `?:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? if let Some(atom) = self.consume_non_capturing_group()? { return Ok(Some(atom)); } + if let Some(atom) = self.consume_capturing_group()? { + return Ok(Some(atom)); + } Ok(None) } From ec22cf9c7ffcd784ae06610a87dc94cefab7a820 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 11 Jul 2024 12:53:19 +0900 Subject: [PATCH 068/143] Refactor... --- crates/oxc_regexp_parser/src/ast.rs | 55 ++++--- .../src/body_parser/parser/atom.rs | 137 +++--------------- .../src/body_parser/parser/atom_class.rs | 89 +++++++----- .../src/body_parser/parser/atom_escape.rs | 137 +++++++++++++++--- .../src/body_parser/parser/parse.rs | 2 +- 5 files changed, 219 insertions(+), 201 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 8aedc25306efd..94776995c35f6 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -18,6 +18,20 @@ pub struct Pattern<'a> { pub alternatives: Vec<'a, Alternative<'a>>, } +/// The flags. +#[derive(Debug)] +pub struct Flags { + pub span: Span, + pub global: bool, + pub ignore_case: bool, + pub multiline: bool, + pub unicode: bool, + pub sticky: bool, + pub dot_all: bool, + pub has_indices: bool, + pub unicode_sets: bool, +} + /// The alternative. /// E.g. `a|b` #[derive(Debug)] @@ -30,9 +44,8 @@ pub struct Alternative<'a> { #[derive(Debug)] pub enum Term<'a> { Assertion(Box<'a, Assertion<'a>>), - #[allow(clippy::enum_variant_names)] Atom(Box<'a, Atom<'a>>), - AtomWithQuantifier(Box<'a, Quantifier<'a>>), + AtomWithQuantifier(Box<'a, AtomWithQuantifier<'a>>), } /// The assertion. @@ -112,6 +125,17 @@ pub enum Atom<'a> { // LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), } +/// The quantifier. +/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` +#[derive(Debug)] +pub struct AtomWithQuantifier<'a> { + pub span: Span, + pub min: usize, + pub max: Option, // `None` means `Infinity` + pub greedy: bool, + pub atom: Atom<'a>, +} + /// The backreference. /// E.g. `\1`, `\k` #[derive(Debug)] @@ -179,8 +203,8 @@ pub struct ClassRangesCharacterClass<'a> { pub enum ClassRangesCharacterClassElement<'a> { Character(Box<'a, Character>), CharacterClassRange(Box<'a, CharacterClassRange>), - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), } /// The character class. @@ -343,28 +367,3 @@ pub struct NonCapturingGroup<'a> { pub span: Span, pub alternatives: Vec<'a, Alternative<'a>>, } - -/// The quantifier. -/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` -#[derive(Debug)] -pub struct Quantifier<'a> { - pub span: Span, - pub min: usize, - pub max: Option, // `None` means `Infinity` - pub greedy: bool, - pub atom: Atom<'a>, -} - -/// The flags. -#[derive(Debug)] -pub struct Flags { - pub span: Span, - pub global: bool, - pub ignore_case: bool, - pub multiline: bool, - pub unicode: bool, - pub sticky: bool, - pub dot_all: bool, - pub has_indices: bool, - pub unicode_sets: bool, -} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs index 7e5ec677bfd41..aadd148585bde 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs @@ -1,4 +1,4 @@ -use oxc_allocator::{Box, Vec}; +use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; @@ -59,61 +59,31 @@ impl<'a> super::parse::PatternParser<'a> { } // `DecimalEscape`: \1 means Backreference - if let Some(decimal) = self.consume_decimal_escape() { + if let Some(normal_backreference) = self.consume_normal_backreference(span_start) { return Ok(Some(ast::Atom::Backreference(Box::new_in( - ast::Backreference::NormalBackreference(Box::new_in( - ast::NormalBackreference { - span: self.span_factory.create(span_start, self.reader.span_position()), - r#ref: decimal, - }, - self.allocator, - )), + normal_backreference, self.allocator, )))); } // `CharacterClassEscape`: \d - if let Some((kind, negate)) = self.consume_character_class_escape() { + if let Some(character_class_escape) = self.consume_character_class_escape(span_start) { return Ok(Some(ast::Atom::CharacterSet(Box::new_in( ast::CharacterSet::EscapeCharacterSet(Box::new_in( - ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind, - negate, - }, + character_class_escape, self.allocator, )), self.allocator, )))); } - // `CharacterEscape`: \p{} + // `CharacterClassEscape`: \p{...} if self.state.is_unicode_mode() { - if let Some(((name, value, negate), is_strings_related)) = - self.consume_character_class_escape_unicode()? + if let Some(character_class_escape_unicode) = + self.consume_character_class_escape_unicode(span_start)? { - let span = self.span_factory.create(span_start, self.reader.span_position()); return Ok(Some(ast::Atom::CharacterSet(Box::new_in( ast::CharacterSet::UnicodePropertyCharacterSet(Box::new_in( - if is_strings_related { - ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet( - Box::new_in( - ast::StringsUnicodePropertyCharacterSet { span, key: name }, - self.allocator, - ), - ) - } else { - ast::UnicodePropertyCharacterSet::CharacterUnicodePropertyCharacterSet( - Box::new_in( - ast::CharacterUnicodePropertyCharacterSet { - span, - key: name, - value, - negate, - }, - self.allocator, - ), - ) - }, + character_class_escape_unicode, self.allocator, )), self.allocator, @@ -121,26 +91,15 @@ impl<'a> super::parse::PatternParser<'a> { } } - if let Some(cp) = self.consume_character_escape()? { - return Ok(Some(ast::Atom::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }, - self.allocator, - )))); + // `CharacterEscape`: \n, \cM, \0, etc... + if let Some(character) = self.consume_character_escape(span_start)? { + return Ok(Some(ast::Atom::Character(Box::new_in(character, self.allocator)))); } // `k`: \k means Backreference - if let Some(r#ref) = self.consume_k_group_name()? { + if let Some(named_backreference) = self.consume_named_backreference(span_start)? { return Ok(Some(ast::Atom::Backreference(Box::new_in( - ast::Backreference::NamedBackreference(Box::new_in( - ast::NamedBackreference { - span: self.span_factory.create(span_start, self.reader.span_position()), - r#ref, - }, - self.allocator, - )), + named_backreference, self.allocator, )))); } @@ -160,39 +119,12 @@ impl<'a> super::parse::PatternParser<'a> { if self.reader.eat('[') { let negate = self.reader.eat('^'); - if self.state.is_unicode_sets_mode() { - let contents = self.consume_class_contents_unicode_sets()?; - - if self.reader.eat(']') { - return Ok(Some(ast::Atom::CharacterClass(Box::new_in( - ast::CharacterClass::UnicodeSetsCharacterClass(Box::new_in( - ast::UnicodeSetsCharacterClass { - span: self - .span_factory - .create(span_start, self.reader.span_position()), - negate, - elements: contents, - }, - self.allocator, - )), - self.allocator, - )))); - } - } + let contents = self.consume_class_contents(span_start, negate)?; - let contents = self.consume_class_contents()?; if self.reader.eat(']') { - return Ok(Some(ast::Atom::CharacterClass(Box::new_in( - ast::CharacterClass::ClassRangesCharacterClass(Box::new_in( - ast::ClassRangesCharacterClass { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate, - elements: contents, - }, - self.allocator, - )), - self.allocator, - )))); + // FIXME: Span should be +1 for ']'... + // OR, CharacterClass { span, negate, contents } + return Ok(Some(ast::Atom::CharacterClass(Box::new_in(contents, self.allocator)))); } return Err(OxcDiagnostic::error("Unterminated character class")); @@ -201,31 +133,6 @@ impl<'a> super::parse::PatternParser<'a> { Ok(None) } - // ``` - // ClassContents[UnicodeMode, UnicodeSetsMode] :: - // [empty] - // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] - // [+UnicodeSetsMode] ClassSetExpression - // ``` - // - pub(super) fn consume_class_contents( - &mut self, - ) -> Result>> { - self.consume_nonempty_class_ranges() - } - pub(super) fn consume_class_contents_unicode_sets( - &mut self, - ) -> Result>> { - let contents = Vec::new_in(self.allocator); - - // TODO: Implement consume_class_set_expression() - if self.reader.eat('👻') { - return Err(OxcDiagnostic::error("TODO")); - } - - Ok(contents) - } - // ``` // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` @@ -234,14 +141,14 @@ impl<'a> super::parse::PatternParser<'a> { if self.reader.eat('(') { let group_name = self.consume_group_specifier()?; - let alternatives = self.consume_disjunction()?; + let disjunction = self.consume_disjunction()?; if self.reader.eat(')') { return Ok(Some(ast::Atom::CapturingGroup(Box::new_in( ast::CapturingGroup { span: self.span_factory.create(span_start, self.reader.span_position()), name: group_name, - alternatives, + alternatives: disjunction, }, self.allocator, )))); @@ -282,13 +189,13 @@ impl<'a> super::parse::PatternParser<'a> { let span_start = self.reader.span_position(); if self.reader.eat3('(', '?', ':') { - let alternatives = self.consume_disjunction()?; + let disjunction = self.consume_disjunction()?; if self.reader.eat(')') { return Ok(Some(ast::Atom::NonCapturingGroup(Box::new_in( ast::NonCapturingGroup { span: self.span_factory.create(span_start, self.reader.span_position()), - alternatives, + alternatives: disjunction, }, self.allocator, )))); diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs index 1dafcb2e52d5b..72f83ef5e4b62 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs @@ -5,6 +5,40 @@ use oxc_diagnostics::{OxcDiagnostic, Result}; use crate::ast; impl<'a> super::parse::PatternParser<'a> { + // ``` + // ClassContents[UnicodeMode, UnicodeSetsMode] :: + // [empty] + // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] + // [+UnicodeSetsMode] ClassSetExpression + // ``` + // + pub(super) fn consume_class_contents( + &mut self, + span_start: usize, + negate: bool, + ) -> Result> { + if !self.state.is_unicode_sets_mode() { + return Ok(ast::CharacterClass::ClassRangesCharacterClass(Box::new_in( + ast::ClassRangesCharacterClass { + span: self.span_factory.create(span_start, self.reader.span_position()), + negate, + elements: self.consume_nonempty_class_ranges()?, + }, + self.allocator, + ))); + } + + Ok(ast::CharacterClass::UnicodeSetsCharacterClass(Box::new_in( + ast::UnicodeSetsCharacterClass { + span: self.span_factory.create(span_start, self.reader.span_position()), + negate, + // TODO: Implement + elements: Vec::new_in(self.allocator), + }, + self.allocator, + ))) + } + // ``` // NonemptyClassRanges[UnicodeMode] :: // ClassAtom[?UnicodeMode] @@ -159,50 +193,39 @@ impl<'a> super::parse::PatternParser<'a> { )))); } - if let Some((kind, negate)) = self.consume_character_class_escape() { + if let Some(escape_character_set) = self.consume_character_class_escape(span_start) { return Ok(Some(ast::ClassRangesCharacterClassElement::EscapeCharacterSet( - Box::new_in( - ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind, - negate, - }, - self.allocator, - ), + Box::new_in(escape_character_set, self.allocator), ))); } if self.state.is_unicode_mode() { - if let Some(((name, value, negate), is_strings_related)) = - self.consume_character_class_escape_unicode()? + if let Some(unicode_property_character_set) = + self.consume_character_class_escape_unicode(span_start)? { - debug_assert!( - !is_strings_related, - "This must be `false`, if `unicode_sets_mode: true`, here should not be passed" - ); - - let span = self.span_factory.create(span_start, self.reader.span_position()); - return Ok(Some( - ast::ClassRangesCharacterClassElement::CharacterUnicodePropertyCharacterSet( - Box::new_in( - ast::CharacterUnicodePropertyCharacterSet { - span, - key: name, - value, - negate, - }, - self.allocator, + match unicode_property_character_set { + ast::UnicodePropertyCharacterSet::CharacterUnicodePropertyCharacterSet( + character_set, + ) => { + return Ok(Some( + ast::ClassRangesCharacterClassElement::CharacterUnicodePropertyCharacterSet( + character_set ), - ), )); + } + // This is `unicode_sets_mode` only pattern. + // If `unicode_sets_mode: true`, this function should not be called at all. + ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet(_) => { + return Err(OxcDiagnostic::error( + "Unexpected StringsUnicodePropertyCharacterSet", + )); + } + } } } - if let Some(character_escape) = self.consume_character_escape()? { + if let Some(character) = self.consume_character_escape(span_start)? { return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: character_escape, - }, + character, self.allocator, )))); } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs index 5c79c73c2642b..e05f595fee052 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs @@ -1,3 +1,4 @@ +use oxc_allocator::Box; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; @@ -7,12 +8,27 @@ use crate::{ }; impl<'a> super::parse::PatternParser<'a> { + pub(super) fn consume_normal_backreference( + &mut self, + span_start: usize, + ) -> Option> { + let decimal = self.consume_decimal_escape()?; + + Some(ast::Backreference::NormalBackreference(Box::new_in( + ast::NormalBackreference { + span: self.span_factory.create(span_start, self.reader.span_position()), + r#ref: decimal, + }, + self.allocator, + ))) + } + // ``` // DecimalEscape :: // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] // ``` // - pub(super) fn consume_decimal_escape(&mut self) -> Option { + fn consume_decimal_escape(&mut self) -> Option { if unicode::is_non_zero_digit(self.reader.peek()?) { let mut value = 0; @@ -40,37 +56,59 @@ impl<'a> super::parse::PatternParser<'a> { // [+UnicodeMode] P{ UnicodePropertyValueExpression } // ``` // - /// Returns: `(kind, negate)` pub(super) fn consume_character_class_escape( &mut self, - ) -> Option<(ast::EscapeCharacterSetKind, bool)> { - // NOTE: `mayContainStrings`? + span_start: usize, + ) -> Option { if self.reader.eat('d') { - return Some((ast::EscapeCharacterSetKind::Digit, false)); + return Some(ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EscapeCharacterSetKind::Digit, + negate: false, + }); } if self.reader.eat('D') { - return Some((ast::EscapeCharacterSetKind::Digit, true)); + return Some(ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EscapeCharacterSetKind::Digit, + negate: true, + }); } if self.reader.eat('s') { - return Some((ast::EscapeCharacterSetKind::Space, false)); + return Some(ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EscapeCharacterSetKind::Space, + negate: false, + }); } if self.reader.eat('S') { - return Some((ast::EscapeCharacterSetKind::Space, true)); + return Some(ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EscapeCharacterSetKind::Space, + negate: true, + }); } if self.reader.eat('w') { - return Some((ast::EscapeCharacterSetKind::Word, false)); + return Some(ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EscapeCharacterSetKind::Word, + negate: false, + }); } if self.reader.eat('W') { - return Some((ast::EscapeCharacterSetKind::Word, true)); + return Some(ast::EscapeCharacterSet { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EscapeCharacterSetKind::Word, + negate: true, + }); } None } - /// Returns: `((name, value, is_strings_related_unicode_property), negate)` - #[allow(clippy::type_complexity)] pub(super) fn consume_character_class_escape_unicode( &mut self, - ) -> Result, Option>, bool), bool)>> { + span_start: usize, + ) -> Result>> { let negate = if self.reader.eat('p') { Some(false) } else if self.reader.eat('P') { @@ -87,9 +125,30 @@ impl<'a> super::parse::PatternParser<'a> { if negate && is_strings_related { return Err(OxcDiagnostic::error("Invalid property name")); } + if self.reader.eat('}') { - // NOTE: `mayContainStrings`? - return Ok(Some(((name, value, negate), is_strings_related))); + let span = + self.span_factory.create(span_start, self.reader.span_position()); + return Ok(Some(if is_strings_related { + ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet( + Box::new_in( + ast::StringsUnicodePropertyCharacterSet { span, key: name }, + self.allocator, + ), + ) + } else { + ast::UnicodePropertyCharacterSet::CharacterUnicodePropertyCharacterSet( + Box::new_in( + ast::CharacterUnicodePropertyCharacterSet { + span, + key: name, + value, + negate, + }, + self.allocator, + ), + ) + })); } } } @@ -195,11 +254,17 @@ impl<'a> super::parse::PatternParser<'a> { // IdentityEscape[?UnicodeMode] // ``` // - pub(super) fn consume_character_escape(&mut self) -> Result> { + pub(super) fn consume_character_escape( + &mut self, + span_start: usize, + ) -> Result> { // e.g. \n if let Some(control_escape) = self.reader.peek().and_then(unicode::map_control_escape) { self.reader.advance(); - return Ok(Some(control_escape)); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: control_escape, + })); } // e.g. \cM @@ -207,7 +272,10 @@ impl<'a> super::parse::PatternParser<'a> { if self.reader.eat('c') { if let Some(c_ascii_letter) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { self.reader.advance(); - return Ok(Some(c_ascii_letter)); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: c_ascii_letter, + })); } self.reader.rewind(checkpoint); } @@ -217,13 +285,19 @@ impl<'a> super::parse::PatternParser<'a> { && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) { self.reader.advance(); - return Ok(Some(0x00)); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: 0x00, + })); } // e.g. \x41 if self.reader.eat('x') { if let Some(hex_digits) = self.consume_fixed_hex_digits(2) { - return Ok(Some(hex_digits)); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: hex_digits, + })); } return Err(OxcDiagnostic::error("Invalid escape")); } @@ -232,12 +306,18 @@ impl<'a> super::parse::PatternParser<'a> { if let Some(reg_exp_unicode_escape_sequence) = self.consume_reg_exp_unicode_escape_sequence()? { - return Ok(Some(reg_exp_unicode_escape_sequence)); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: reg_exp_unicode_escape_sequence, + })); } // e.g. \. if let Some(identity_escape) = self.consume_identity_escape() { - return Ok(Some(identity_escape)); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: identity_escape, + })); } Ok(None) @@ -272,13 +352,22 @@ impl<'a> super::parse::PatternParser<'a> { None } - pub(super) fn consume_k_group_name(&mut self) -> Result>> { + pub(super) fn consume_named_backreference( + &mut self, + span_start: usize, + ) -> Result>> { if self.reader.eat('k') { if let Some(group_name) = self.consume_group_name()? { // TODO: Implement // this._backreferenceNames.add(groupName); - return Ok(Some(group_name)); + return Ok(Some(ast::Backreference::NamedBackreference(Box::new_in( + ast::NamedBackreference { + span: self.span_factory.create(span_start, self.reader.span_position()), + r#ref: group_name, + }, + self.allocator, + )))); } return Err(OxcDiagnostic::error("Invalid named reference")); diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 4565eec5184e8..2dad8be6ec944 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -157,7 +157,7 @@ impl<'a> PatternParser<'a> { (Some(atom), None) => Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))), (Some(atom), Some(((min, max), greedy))) => { return Ok(Some(ast::Term::AtomWithQuantifier(Box::new_in( - ast::Quantifier { + ast::AtomWithQuantifier { span: self.span_factory.create(span_start, self.reader.span_position()), min, max, From af5dfb7a39a2cead0731b917d9d9c939ba0c83c2 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 11 Jul 2024 17:12:29 +0900 Subject: [PATCH 069/143] Align atom_class implementation --- crates/oxc_regexp_parser/src/ast.rs | 177 +++++++++--------- .../src/body_parser/parser/atom.rs | 58 +++++- .../src/body_parser/parser/atom_class.rs | 155 +++++++-------- 3 files changed, 209 insertions(+), 181 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 94776995c35f6..fe522e6da68f6 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -116,13 +116,10 @@ pub struct LookbehindAssertion<'a> { pub enum Atom<'a> { Character(Box<'a, Character>), CharacterSet(Box<'a, CharacterSet<'a>>), - CharacterClass(Box<'a, CharacterClass<'a>>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), Backreference(Box<'a, Backreference<'a>>), + CharacterClass(Box<'a, CharacterClass<'a>>), CapturingGroup(Box<'a, CapturingGroup<'a>>), NonCapturingGroup(Box<'a, NonCapturingGroup<'a>>), - // NOTE: Is this really necessary? - // LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), } /// The quantifier. @@ -144,20 +141,18 @@ pub enum Backreference<'a> { NamedBackreference(Box<'a, NamedBackreference<'a>>), } +/// E.g. `\1` #[derive(Debug)] pub struct NormalBackreference { pub span: Span, pub r#ref: usize, // 1 for \1 - // NOTE: How to handle this...? - // pub resolved: CapturingGroup<'a>, } +/// E.g. `\k` #[derive(Debug)] pub struct NamedBackreference<'a> { pub span: Span, pub r#ref: SpanAtom<'a>, // name for \k - // NOTE: How to handle this...? - // pub resolved: Vec<'a, CapturingGroup<'a>>, } /// The capturing group. @@ -167,8 +162,14 @@ pub struct CapturingGroup<'a> { pub span: Span, pub name: Option>, pub alternatives: Vec<'a, Alternative<'a>>, - // NOTE: How to handle this...? - // pub references: Vec<'a, Backreference<'a>>, +} + +/// The non-capturing group. +/// E.g. `(?:ab)` +#[derive(Debug)] +pub struct NonCapturingGroup<'a> { + pub span: Span, + pub alternatives: Vec<'a, Alternative<'a>>, } /// The character. @@ -180,6 +181,60 @@ pub struct Character { pub value: u32, } +/// The character set. +#[derive(Debug)] +#[allow(clippy::enum_variant_names)] +pub enum CharacterSet<'a> { + AnyCharacterSet(Box<'a, AnyCharacterSet>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), +} + +/// Any = `.` +#[derive(Debug)] +pub struct AnyCharacterSet { + pub span: Span, +} + +/// The character class escape. +/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` +#[derive(Debug)] +pub struct EscapeCharacterSet { + pub span: Span, + pub kind: EscapeCharacterSetKind, + pub negate: bool, +} + +#[derive(Debug)] +pub enum EscapeCharacterSetKind { + Digit, + Space, + Word, +} + +/// The unicode property escape. +/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` +#[derive(Debug)] +pub enum UnicodePropertyCharacterSet<'a> { + CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), + StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet<'a>>), +} + +#[derive(Debug)] +pub struct CharacterUnicodePropertyCharacterSet<'a> { + pub span: Span, + pub key: SpanAtom<'a>, + pub value: Option>, + pub negate: bool, +} + +/// The unicode property escape with property of strings. (`v` flag only) +#[derive(Debug)] +pub struct StringsUnicodePropertyCharacterSet<'a> { + pub span: Span, + pub key: SpanAtom<'a>, +} + /// The character class. /// E.g. `[ab]`, `[^ab]` #[derive(Debug)] @@ -188,10 +243,7 @@ pub enum CharacterClass<'a> { UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), } -/// The character class used in legacy (neither `u` nor `v` flag) and Unicode mode (`u` flag). -/// -/// This character class is guaranteed to NOT contain strings. -/// In Unicode sets mode (`v` flag), [`UnicodeSetsCharacterClass`] is used. +/// The character class used in non Unicode sets mode (`v` flag). #[derive(Debug)] pub struct ClassRangesCharacterClass<'a> { pub span: Span, @@ -216,32 +268,9 @@ pub struct CharacterClassRange { pub max: Character, } -/// The character class string disjunction. -/// E.g. `\q{a|b}` -#[derive(Debug)] -pub struct ClassStringDisjunction<'a> { - pub span: Span, - pub alternatives: Vec<'a, StringAlternative<'a>>, -} - -/// Only used for `\q{alt}`([`ClassStringDisjunction`]). -#[derive(Debug)] -pub struct StringAlternative<'a> { - pub span: Span, - pub elements: Vec<'a, Character>, -} - -#[derive(Debug)] -pub struct CharacterUnicodePropertyCharacterSet<'a> { - pub span: Span, - pub key: SpanAtom<'a>, - pub value: Option>, - pub negate: bool, -} +// TODO: Lines below are not yet finalized. /// The character class used in Unicode sets mode (`v` flag). -/// -/// This character class may contain strings. #[derive(Debug)] pub struct UnicodeSetsCharacterClass<'a> { pub span: Span, @@ -253,56 +282,28 @@ pub struct UnicodeSetsCharacterClass<'a> { pub enum UnicodeSetsCharacterClassElement<'a> { Character(Box<'a, Character>), CharacterClassRange(Box<'a, CharacterClassRange>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), + // Above are same as `ClassRangesCharacterClassElement` + StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet<'a>>), + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), } -/// The character set. -#[derive(Debug)] -#[allow(clippy::enum_variant_names)] -pub enum CharacterSet<'a> { - AnyCharacterSet(Box<'a, AnyCharacterSet>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), -} - -#[derive(Debug)] -pub struct AnyCharacterSet { - pub span: Span, -} - -/// The character class escape. -/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` +/// The character class string disjunction. +/// E.g. `\q{a|b}` #[derive(Debug)] -pub struct EscapeCharacterSet { +pub struct ClassStringDisjunction<'a> { pub span: Span, - pub kind: EscapeCharacterSetKind, - pub negate: bool, -} - -#[derive(Debug)] -pub enum EscapeCharacterSetKind { - Digit, - Space, - Word, -} - -/// The unicode property escape. -/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` -#[derive(Debug)] -pub enum UnicodePropertyCharacterSet<'a> { - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), - StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet<'a>>), + pub alternatives: Vec<'a, StringAlternative<'a>>, } -/// The unicode property escape with property of strings. +/// Only used for `\q{alt}`([`ClassStringDisjunction`]). #[derive(Debug)] -pub struct StringsUnicodePropertyCharacterSet<'a> { +pub struct StringAlternative<'a> { pub span: Span, - pub key: SpanAtom<'a>, + pub elements: Vec<'a, Character>, } /// The expression character class. @@ -320,16 +321,6 @@ pub enum ExpressionCharacterClassExpr<'a> { ClassSubtraction(Box<'a, ClassSubtraction<'a>>), } -#[derive(Debug)] -pub enum ClassSetOperand<'a> { - Character(Box<'a, Character>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), -} - /// The character class intersection. /// E.g. `a&&b` #[derive(Debug)] @@ -360,10 +351,12 @@ pub enum ClassSubtractionLeft<'a> { ClassSubtraction(Box<'a, ClassSubtraction<'a>>), } -/// The non-capturing group. -/// E.g. `(?:ab)` #[derive(Debug)] -pub struct NonCapturingGroup<'a> { - pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, +pub enum ClassSetOperand<'a> { + Character(Box<'a, Character>), + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), + EscapeCharacterSet(Box<'a, EscapeCharacterSet>), + ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), + UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), + UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs index aadd148585bde..501f11b0765d6 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs @@ -1,4 +1,4 @@ -use oxc_allocator::Box; +use oxc_allocator::{Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; @@ -119,12 +119,38 @@ impl<'a> super::parse::PatternParser<'a> { if self.reader.eat('[') { let negate = self.reader.eat('^'); - let contents = self.consume_class_contents(span_start, negate)?; + if self.state.is_unicode_sets_mode() { + let contents = self.consume_class_contents_unicode_sets()?; + if self.reader.eat(']') { + return Ok(Some(ast::Atom::CharacterClass(Box::new_in( + ast::CharacterClass::UnicodeSetsCharacterClass(Box::new_in( + ast::UnicodeSetsCharacterClass { + span: self + .span_factory + .create(span_start, self.reader.span_position()), + negate, + elements: contents, + }, + self.allocator, + )), + self.allocator, + )))); + } + } + let contents = self.consume_class_contents()?; if self.reader.eat(']') { - // FIXME: Span should be +1 for ']'... - // OR, CharacterClass { span, negate, contents } - return Ok(Some(ast::Atom::CharacterClass(Box::new_in(contents, self.allocator)))); + return Ok(Some(ast::Atom::CharacterClass(Box::new_in( + ast::CharacterClass::ClassRangesCharacterClass(Box::new_in( + ast::ClassRangesCharacterClass { + span: self.span_factory.create(span_start, self.reader.span_position()), + negate, + elements: contents, + }, + self.allocator, + )), + self.allocator, + )))); } return Err(OxcDiagnostic::error("Unterminated character class")); @@ -133,6 +159,28 @@ impl<'a> super::parse::PatternParser<'a> { Ok(None) } + // ``` + // ClassContents[UnicodeMode, UnicodeSetsMode] :: + // [empty] + // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] + // [+UnicodeSetsMode] ClassSetExpression + // ``` + // + fn consume_class_contents( + &mut self, + ) -> Result>> { + self.consume_nonempty_class_ranges() + } + fn consume_class_contents_unicode_sets( + &mut self, + ) -> Result>> { + // self.consume_class_set_expression() + if self.reader.eat('👻') { + return Err(OxcDiagnostic::error("TODO")); + } + Ok(Vec::new_in(self.allocator)) + } + // ``` // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs index 72f83ef5e4b62..c3deb10b7ca01 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs @@ -1,44 +1,9 @@ use oxc_allocator::{Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; -// use oxc_span::Atom as SpanAtom; use crate::ast; impl<'a> super::parse::PatternParser<'a> { - // ``` - // ClassContents[UnicodeMode, UnicodeSetsMode] :: - // [empty] - // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] - // [+UnicodeSetsMode] ClassSetExpression - // ``` - // - pub(super) fn consume_class_contents( - &mut self, - span_start: usize, - negate: bool, - ) -> Result> { - if !self.state.is_unicode_sets_mode() { - return Ok(ast::CharacterClass::ClassRangesCharacterClass(Box::new_in( - ast::ClassRangesCharacterClass { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate, - elements: self.consume_nonempty_class_ranges()?, - }, - self.allocator, - ))); - } - - Ok(ast::CharacterClass::UnicodeSetsCharacterClass(Box::new_in( - ast::UnicodeSetsCharacterClass { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate, - // TODO: Implement - elements: Vec::new_in(self.allocator), - }, - self.allocator, - ))) - } - // ``` // NonemptyClassRanges[UnicodeMode] :: // ClassAtom[?UnicodeMode] @@ -51,57 +16,54 @@ impl<'a> super::parse::PatternParser<'a> { ) -> Result>> { let mut contents = Vec::new_in(self.allocator); + // NOTE: This implementation may not reflect the spec correctly. + // `ClassAtom`(= `NonemptyClassRanges`) and `NonemptyClassRangesNoDash` should be distinguished? + // But `regexpp` also handles them in the same way. loop { let range_span_start = self.reader.span_position(); let Some(first_class_atom) = self.consume_class_atom()? else { - // If there is no more characters, break the loop + // If there is no more characters, break the loop to return `[empty]` break; }; let span_start = self.reader.span_position(); - let Some(cp) = self.reader.peek().filter(|&cp| cp == '-' as u32) else { - // If there is no `-`, push the character as a single `ClassAtom` - contents.push(first_class_atom); - // Then continue to find the next `Non` - continue; - }; - self.reader.advance(); - - let dash_character = ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }; - - let Some(second_class_atom) = self.consume_class_atom()? else { - // If there is no range end character, push `-` as a single `ClassAtom` - contents.push(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - dash_character, - self.allocator, - ))); - continue; - }; - - match (first_class_atom, second_class_atom) { - ( - ast::ClassRangesCharacterClassElement::Character(min_character), - ast::ClassRangesCharacterClassElement::Character(max_character), - ) => { - contents.push(ast::ClassRangesCharacterClassElement::CharacterClassRange( - Box::new_in( - ast::CharacterClassRange { - span: self - .span_factory - .create(range_span_start, self.reader.span_position()), - min: min_character.unbox(), - max: max_character.unbox(), - }, - self.allocator, - ), - )); - } - _ => { - return Err(OxcDiagnostic::error("Invalid character class range")); + if self.reader.eat('-') { + let Some(second_class_atom) = self.consume_class_atom()? else { + contents.push(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: '-' as u32, + }, + self.allocator, + ))); + // If `-` found but there is no more characters, push `-` as a character and break + break; + }; + + match (first_class_atom, second_class_atom) { + ( + ast::ClassRangesCharacterClassElement::Character(min_character), + ast::ClassRangesCharacterClassElement::Character(max_character), + ) => { + contents.push(ast::ClassRangesCharacterClassElement::CharacterClassRange( + Box::new_in( + ast::CharacterClassRange { + span: self + .span_factory + .create(range_span_start, self.reader.span_position()), + min: min_character.unbox(), + max: max_character.unbox(), + }, + self.allocator, + ), + )); + // If `-` and 2 characters found, push the range and continue + continue; + } + _ => { + return Err(OxcDiagnostic::error("Invalid character class range")); + } } } } @@ -115,19 +77,45 @@ impl<'a> super::parse::PatternParser<'a> { // ClassAtomNoDash[?UnicodeMode] // ``` // + fn consume_class_atom(&mut self) -> Result>> { + let Some(cp) = self.reader.peek() else { + return Ok(None); + }; + + let span_start = self.reader.span_position(); + if cp == '-' as u32 { + self.reader.advance(); + + return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( + ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + value: cp, + }, + self.allocator, + )))); + } + + if let Some(class_atom_no_dash) = self.consume_class_atom_no_dash()? { + return Ok(Some(class_atom_no_dash)); + } + + Ok(None) + } + // ``` // ClassAtomNoDash[UnicodeMode] :: // SourceCharacter but not one of \ or ] or - // \ ClassEscape[?UnicodeMode] // ``` // - fn consume_class_atom(&mut self) -> Result>> { + fn consume_class_atom_no_dash( + &mut self, + ) -> Result>> { let Some(cp) = self.reader.peek() else { return Ok(None); }; let span_start = self.reader.span_position(); - if cp != '\\' as u32 && cp != ']' as u32 && cp != '-' as u32 { self.reader.advance(); @@ -140,8 +128,9 @@ impl<'a> super::parse::PatternParser<'a> { )))); } + let span_start = self.reader.span_position(); if self.reader.eat('\\') { - if let Some(class_escape) = self.consume_class_escape()? { + if let Some(class_escape) = self.consume_class_escape(span_start)? { return Ok(Some(class_escape)); } @@ -161,14 +150,12 @@ impl<'a> super::parse::PatternParser<'a> { // fn consume_class_escape( &mut self, + span_start: usize, ) -> Result>> { let Some(cp) = self.reader.peek() else { return Ok(None); }; - // TODO: `span_start` as args? - let span_start = self.reader.span_position() - 1; // -1 for `\` - if cp == 'b' as u32 { self.reader.advance(); From 4940034e74c9bf78f5f70ab6768fa6a387b14432 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 12 Jul 2024 14:11:38 +0900 Subject: [PATCH 070/143] Fix bug --- .../src/body_parser/parser/atom_class.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs index c3deb10b7ca01..15238afb20a3e 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs @@ -30,6 +30,7 @@ impl<'a> super::parse::PatternParser<'a> { let span_start = self.reader.span_position(); if self.reader.eat('-') { let Some(second_class_atom) = self.consume_class_atom()? else { + contents.push(first_class_atom); contents.push(ast::ClassRangesCharacterClassElement::Character(Box::new_in( ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -37,8 +38,9 @@ impl<'a> super::parse::PatternParser<'a> { }, self.allocator, ))); - // If `-` found but there is no more characters, push `-` as a character and break - break; + // If `-` found but there is no more characters, + // push first atom and `-` as a character and continue + continue; }; match (first_class_atom, second_class_atom) { @@ -66,6 +68,9 @@ impl<'a> super::parse::PatternParser<'a> { } } } + + // If `-` not found, push the character and continue + contents.push(first_class_atom); } Ok(contents) From 62c0b2592845fcd2f139120ba5816c22bff7796a Mon Sep 17 00:00:00 2001 From: Boshen Date: Sat, 13 Jul 2024 11:03:49 +0800 Subject: [PATCH 071/143] feat(coverage): enable regexp in test262 --- Cargo.lock | 1 + Cargo.toml | 1 + crates/oxc_parser/Cargo.toml | 11 +- crates/oxc_parser/src/js/expression.rs | 15 +- tasks/coverage/codegen_sourcemap.snap | 4846 +-------- tasks/coverage/codegen_test262.snap | 4 +- tasks/coverage/minifier_test262.snap | 4 +- tasks/coverage/parser_babel.snap | 86 +- tasks/coverage/parser_test262.snap | 11990 +++++++++++++++++++++- tasks/coverage/parser_typescript.snap | 420 +- tasks/coverage/src/test262/mod.rs | 12 +- tasks/coverage/transformer_test262.snap | 4 +- 12 files changed, 12478 insertions(+), 4916 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7734a18ac3512..2a3fc3a52dd66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1608,6 +1608,7 @@ dependencies = [ "oxc_allocator", "oxc_ast", "oxc_diagnostics", + "oxc_regexp_parser", "oxc_span", "oxc_syntax", "rustc-hash", diff --git a/Cargo.toml b/Cargo.toml index ecaf3fd991b40..d496aefbda717 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,6 +92,7 @@ oxc_traverse = { version = "0.20.0", path = "crates/oxc_traverse" } oxc_module_lexer = { version = "0.20.0", path = "crates/oxc_module_lexer" } oxc_cfg = { version = "0.20.0", path = "crates/oxc_cfg" } oxc_isolated_declarations = { version = "0.20.0", path = "crates/oxc_isolated_declarations" } +oxc_regexp_parser = { version = "0.0.0", path = "crates/oxc_regexp_parser" } oxc_transform_napi = { version = "0.20.0", path = "napi/transform" } # publish = false diff --git a/crates/oxc_parser/Cargo.toml b/crates/oxc_parser/Cargo.toml index c4628d4273fd4..ea7ff3dee8a9a 100644 --- a/crates/oxc_parser/Cargo.toml +++ b/crates/oxc_parser/Cargo.toml @@ -19,11 +19,12 @@ workspace = true doctest = false [dependencies] -oxc_allocator = { workspace = true } -oxc_span = { workspace = true } -oxc_ast = { workspace = true } -oxc_syntax = { workspace = true } -oxc_diagnostics = { workspace = true } +oxc_allocator = { workspace = true } +oxc_span = { workspace = true } +oxc_ast = { workspace = true } +oxc_syntax = { workspace = true } +oxc_diagnostics = { workspace = true } +oxc_regexp_parser = { workspace = true } assert-unchecked = { workspace = true } bitflags = { workspace = true } diff --git a/crates/oxc_parser/src/js/expression.rs b/crates/oxc_parser/src/js/expression.rs index 6da5e9876d333..373bad63fa2ed 100644 --- a/crates/oxc_parser/src/js/expression.rs +++ b/crates/oxc_parser/src/js/expression.rs @@ -191,7 +191,7 @@ impl<'a> ParserImpl<'a> { } Kind::LParen => self.parse_parenthesized_expression(span), Kind::Slash | Kind::SlashEq => { - let literal = self.parse_literal_regexp(); + let literal = self.parse_literal_regexp()?; Ok(self.ast.expression_from_reg_exp_literal(literal)) } // JSXElement, JSXFragment @@ -337,20 +337,27 @@ impl<'a> ParserImpl<'a> { Ok(self.ast.big_int_literal(self.end_span(span), raw, base)) } - pub(crate) fn parse_literal_regexp(&mut self) -> RegExpLiteral<'a> { + pub(crate) fn parse_literal_regexp(&mut self) -> Result> { + use oxc_regexp_parser::{ParserOptions, PatternParser}; let span = self.start_span(); // split out pattern let (pattern_end, flags) = self.read_regex(); let pattern_start = self.cur_token().start + 1; // +1 to exclude `/` let pattern = &self.source_text[pattern_start as usize..pattern_end as usize]; + if let Err(diagnostic) = + PatternParser::new(&self.ast.allocator, self.source_text, ParserOptions::default()) + .parse() + { + self.error(diagnostic); + } self.bump_any(); - self.ast.reg_exp_literal( + Ok(self.ast.reg_exp_literal( self.end_span(span), EmptyObject, RegExp { pattern: self.ast.atom(pattern), flags }, - ) + )) } pub(crate) fn parse_literal_string(&mut self) -> Result> { diff --git a/tasks/coverage/codegen_sourcemap.snap b/tasks/coverage/codegen_sourcemap.snap index 663133b3f054c..f349740a1250d 100644 --- a/tasks/coverage/codegen_sourcemap.snap +++ b/tasks/coverage/codegen_sourcemap.snap @@ -416,4851 +416,7 @@ Invalid Character `[` - react.development.js -(9:0-11:0) "\n'use strict';\n" --> (0:0-1:0) "'use strict';" -(11:0-11:4) "\nif " --> (1:0-1:4) "\nif " -(11:4-11:12) "(process" --> (1:4-1:12) "(process" -(11:12-11:16) ".env" --> (1:12-1:16) ".env" -(11:16-11:29) ".NODE_ENV !==" --> (1:16-1:29) ".NODE_ENV !==" -(11:29-11:43) " \"production\")" --> (1:29-1:43) " 'production')" -(11:43-12:2) " {\n " --> (1:43-2:0) " {" -(12:2-12:3) " " --> (2:0-2:2) "\n\t" -(12:3-12:14) "(function()" --> (2:2-2:13) "(function()" -(12:14-13:0) " {" --> (2:13-3:0) " {" -(13:0-15:0) "\n'use strict';\n" --> (3:0-4:2) "\n\t\t'use strict';\n\t" -(15:0-15:4) "\nvar" --> (4:2-4:6) "\tvar" -(15:4-15:14) " _assign =" --> (4:6-4:16) " _assign =" -(15:14-15:22) " require" --> (4:16-4:24) " require" -(15:22-15:38) "('object-assign'" --> (4:24-4:40) "('object-assign'" -(15:38-18:0) ");\n\n// TODO: this is special because it gets imported during build." --> (4:40-5:2) ");\n\t" -(18:0-18:4) "\nvar" --> (5:2-5:6) "\tvar" -(18:4-18:19) " ReactVersion =" --> (5:6-5:21) " ReactVersion =" -(18:19-25:0) " '17.0.2';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance." --> (5:21-6:2) " '17.0.2';\n\t" -(25:0-25:4) "\nvar" --> (6:2-6:6) "\tvar" -(25:4-25:25) " REACT_ELEMENT_TYPE =" --> (6:6-6:27) " REACT_ELEMENT_TYPE =" -(25:25-26:0) " 0xeac7;" --> (6:27-7:2) " 0xeac7;\n\t" -(26:0-26:4) "\nvar" --> (7:2-7:6) "\tvar" -(26:4-26:24) " REACT_PORTAL_TYPE =" --> (7:6-7:26) " REACT_PORTAL_TYPE =" -(26:24-27:0) " 0xeaca;" --> (7:26-8:0) " 0xeaca;" -(27:0-27:8) "\nexports" --> (8:0-8:10) "\n\t\texports" -(27:8-27:19) ".Fragment =" --> (8:10-8:21) ".Fragment =" -(27:19-28:0) " 0xeacb;" --> (8:21-9:0) " 0xeacb;" -(28:0-28:8) "\nexports" --> (9:0-9:10) "\n\t\texports" -(28:8-28:21) ".StrictMode =" --> (9:10-9:23) ".StrictMode =" -(28:21-29:0) " 0xeacc;" --> (9:23-10:0) " 0xeacc;" -(29:0-29:8) "\nexports" --> (10:0-10:10) "\n\t\texports" -(29:8-29:19) ".Profiler =" --> (10:10-10:21) ".Profiler =" -(29:19-30:0) " 0xead2;" --> (10:21-11:2) " 0xead2;\n\t" -(30:0-30:4) "\nvar" --> (11:2-11:6) "\tvar" -(30:4-30:26) " REACT_PROVIDER_TYPE =" --> (11:6-11:28) " REACT_PROVIDER_TYPE =" -(30:26-31:0) " 0xeacd;" --> (11:28-12:2) " 0xeacd;\n\t" -(31:0-31:4) "\nvar" --> (12:2-12:6) "\tvar" -(31:4-31:25) " REACT_CONTEXT_TYPE =" --> (12:6-12:27) " REACT_CONTEXT_TYPE =" -(31:25-32:0) " 0xeace;" --> (12:27-13:2) " 0xeace;\n\t" -(32:0-32:4) "\nvar" --> (13:2-13:6) "\tvar" -(32:4-32:29) " REACT_FORWARD_REF_TYPE =" --> (13:6-13:31) " REACT_FORWARD_REF_TYPE =" -(32:29-33:0) " 0xead0;" --> (13:31-14:0) " 0xead0;" -(33:0-33:8) "\nexports" --> (14:0-14:10) "\n\t\texports" -(33:8-33:19) ".Suspense =" --> (14:10-14:21) ".Suspense =" -(33:19-34:0) " 0xead1;" --> (14:21-15:2) " 0xead1;\n\t" -(34:0-34:4) "\nvar" --> (15:2-15:6) "\tvar" -(34:4-34:31) " REACT_SUSPENSE_LIST_TYPE =" --> (15:6-15:33) " REACT_SUSPENSE_LIST_TYPE =" -(34:31-35:0) " 0xead8;" --> (15:33-16:2) " 0xead8;\n\t" -(35:0-35:4) "\nvar" --> (16:2-16:6) "\tvar" -(35:4-35:22) " REACT_MEMO_TYPE =" --> (16:6-16:24) " REACT_MEMO_TYPE =" -(35:22-36:0) " 0xead3;" --> (16:24-17:2) " 0xead3;\n\t" -(36:0-36:4) "\nvar" --> (17:2-17:6) "\tvar" -(36:4-36:22) " REACT_LAZY_TYPE =" --> (17:6-17:24) " REACT_LAZY_TYPE =" -(36:22-37:0) " 0xead4;" --> (17:24-18:2) " 0xead4;\n\t" -(37:0-37:4) "\nvar" --> (18:2-18:6) "\tvar" -(37:4-37:23) " REACT_BLOCK_TYPE =" --> (18:6-18:25) " REACT_BLOCK_TYPE =" -(37:23-38:0) " 0xead9;" --> (18:25-19:2) " 0xead9;\n\t" -(38:0-38:4) "\nvar" --> (19:2-19:6) "\tvar" -(38:4-38:30) " REACT_SERVER_BLOCK_TYPE =" --> (19:6-19:32) " REACT_SERVER_BLOCK_TYPE =" -(38:30-39:0) " 0xeada;" --> (19:32-20:2) " 0xeada;\n\t" -(39:0-39:4) "\nvar" --> (20:2-20:6) "\tvar" -(39:4-39:29) " REACT_FUNDAMENTAL_TYPE =" --> (20:6-20:31) " REACT_FUNDAMENTAL_TYPE =" -(39:29-40:0) " 0xead5;" --> (20:31-21:2) " 0xead5;\n\t" -(40:0-40:4) "\nvar" --> (21:2-21:6) "\tvar" -(40:4-40:23) " REACT_SCOPE_TYPE =" --> (21:6-21:25) " REACT_SCOPE_TYPE =" -(40:23-41:0) " 0xead7;" --> (21:25-22:2) " 0xead7;\n\t" -(41:0-41:4) "\nvar" --> (22:2-22:6) "\tvar" -(41:4-41:27) " REACT_OPAQUE_ID_TYPE =" --> (22:6-22:29) " REACT_OPAQUE_ID_TYPE =" -(41:27-42:0) " 0xeae0;" --> (22:29-23:2) " 0xeae0;\n\t" -(42:0-42:4) "\nvar" --> (23:2-23:6) "\tvar" -(42:4-42:36) " REACT_DEBUG_TRACING_MODE_TYPE =" --> (23:6-23:38) " REACT_DEBUG_TRACING_MODE_TYPE =" -(42:36-43:0) " 0xeae1;" --> (23:38-24:2) " 0xeae1;\n\t" -(43:0-43:4) "\nvar" --> (24:2-24:6) "\tvar" -(43:4-43:27) " REACT_OFFSCREEN_TYPE =" --> (24:6-24:29) " REACT_OFFSCREEN_TYPE =" -(43:27-44:0) " 0xeae2;" --> (24:29-25:2) " 0xeae2;\n\t" -(44:0-44:4) "\nvar" --> (25:2-25:6) "\tvar" -(44:4-44:31) " REACT_LEGACY_HIDDEN_TYPE =" --> (25:6-25:33) " REACT_LEGACY_HIDDEN_TYPE =" -(44:31-46:0) " 0xeae3;\n" --> (25:33-26:0) " 0xeae3;" -(46:0-46:11) "\nif (typeof" --> (26:0-26:13) "\n\t\tif (typeof" -(46:11-46:22) " Symbol ===" --> (26:13-26:24) " Symbol ===" -(46:22-46:36) " 'function' &&" --> (26:24-26:38) " 'function' &&" -(46:36-46:43) " Symbol" --> (26:38-26:45) " Symbol" -(46:43-46:48) ".for)" --> (26:45-26:50) ".for)" -(46:48-47:2) " {\n " --> (26:50-27:3) " {\n\t\t" -(47:2-47:6) " var" --> (27:3-27:7) "\tvar" -(47:6-47:18) " symbolFor =" --> (27:7-27:19) " symbolFor =" -(47:18-47:25) " Symbol" --> (27:19-27:26) " Symbol" -(47:25-48:2) ".for;\n " --> (27:26-28:0) ".for;" -(48:2-48:23) " REACT_ELEMENT_TYPE =" --> (28:0-28:24) "\n\t\t\tREACT_ELEMENT_TYPE =" -(48:23-48:33) " symbolFor" --> (28:24-28:34) " symbolFor" -(48:33-48:49) "('react.element'" --> (28:34-28:50) "('react.element'" -(48:49-49:2) ");\n " --> (28:50-29:0) ");" -(49:2-49:22) " REACT_PORTAL_TYPE =" --> (29:0-29:23) "\n\t\t\tREACT_PORTAL_TYPE =" -(49:22-49:32) " symbolFor" --> (29:23-29:33) " symbolFor" -(49:32-49:47) "('react.portal'" --> (29:33-29:48) "('react.portal'" -(49:47-50:2) ");\n " --> (29:48-30:0) ");" -(50:2-50:10) " exports" --> (30:0-30:11) "\n\t\t\texports" -(50:10-50:21) ".Fragment =" --> (30:11-30:22) ".Fragment =" -(50:21-50:31) " symbolFor" --> (30:22-30:32) " symbolFor" -(50:31-50:48) "('react.fragment'" --> (30:32-30:49) "('react.fragment'" -(50:48-51:2) ");\n " --> (30:49-31:0) ");" -(51:2-51:10) " exports" --> (31:0-31:11) "\n\t\t\texports" -(51:10-51:23) ".StrictMode =" --> (31:11-31:24) ".StrictMode =" -(51:23-51:33) " symbolFor" --> (31:24-31:34) " symbolFor" -(51:33-51:53) "('react.strict_mode'" --> (31:34-31:54) "('react.strict_mode'" -(51:53-52:2) ");\n " --> (31:54-32:0) ");" -(52:2-52:10) " exports" --> (32:0-32:11) "\n\t\t\texports" -(52:10-52:21) ".Profiler =" --> (32:11-32:22) ".Profiler =" -(52:21-52:31) " symbolFor" --> (32:22-32:32) " symbolFor" -(52:31-52:48) "('react.profiler'" --> (32:32-32:49) "('react.profiler'" -(52:48-53:2) ");\n " --> (32:49-33:0) ");" -(53:2-53:24) " REACT_PROVIDER_TYPE =" --> (33:0-33:25) "\n\t\t\tREACT_PROVIDER_TYPE =" -(53:24-53:34) " symbolFor" --> (33:25-33:35) " symbolFor" -(53:34-53:51) "('react.provider'" --> (33:35-33:52) "('react.provider'" -(53:51-54:2) ");\n " --> (33:52-34:0) ");" -(54:2-54:23) " REACT_CONTEXT_TYPE =" --> (34:0-34:24) "\n\t\t\tREACT_CONTEXT_TYPE =" -(54:23-54:33) " symbolFor" --> (34:24-34:34) " symbolFor" -(54:33-54:49) "('react.context'" --> (34:34-34:50) "('react.context'" -(54:49-55:2) ");\n " --> (34:50-35:0) ");" -(55:2-55:27) " REACT_FORWARD_REF_TYPE =" --> (35:0-35:28) "\n\t\t\tREACT_FORWARD_REF_TYPE =" -(55:27-55:37) " symbolFor" --> (35:28-35:38) " symbolFor" -(55:37-55:57) "('react.forward_ref'" --> (35:38-35:58) "('react.forward_ref'" -(55:57-56:2) ");\n " --> (35:58-36:0) ");" -(56:2-56:10) " exports" --> (36:0-36:11) "\n\t\t\texports" -(56:10-56:21) ".Suspense =" --> (36:11-36:22) ".Suspense =" -(56:21-56:31) " symbolFor" --> (36:22-36:32) " symbolFor" -(56:31-56:48) "('react.suspense'" --> (36:32-36:49) "('react.suspense'" -(56:48-57:2) ");\n " --> (36:49-37:0) ");" -(57:2-57:29) " REACT_SUSPENSE_LIST_TYPE =" --> (37:0-37:30) "\n\t\t\tREACT_SUSPENSE_LIST_TYPE =" -(57:29-57:39) " symbolFor" --> (37:30-37:40) " symbolFor" -(57:39-57:61) "('react.suspense_list'" --> (37:40-37:62) "('react.suspense_list'" -(57:61-58:2) ");\n " --> (37:62-38:0) ");" -(58:2-58:20) " REACT_MEMO_TYPE =" --> (38:0-38:21) "\n\t\t\tREACT_MEMO_TYPE =" -(58:20-58:30) " symbolFor" --> (38:21-38:31) " symbolFor" -(58:30-58:43) "('react.memo'" --> (38:31-38:44) "('react.memo'" -(58:43-59:2) ");\n " --> (38:44-39:0) ");" -(59:2-59:20) " REACT_LAZY_TYPE =" --> (39:0-39:21) "\n\t\t\tREACT_LAZY_TYPE =" -(59:20-59:30) " symbolFor" --> (39:21-39:31) " symbolFor" -(59:30-59:43) "('react.lazy'" --> (39:31-39:44) "('react.lazy'" -(59:43-60:2) ");\n " --> (39:44-40:0) ");" -(60:2-60:21) " REACT_BLOCK_TYPE =" --> (40:0-40:22) "\n\t\t\tREACT_BLOCK_TYPE =" -(60:21-60:31) " symbolFor" --> (40:22-40:32) " symbolFor" -(60:31-60:45) "('react.block'" --> (40:32-40:46) "('react.block'" -(60:45-61:2) ");\n " --> (40:46-41:0) ");" -(61:2-61:28) " REACT_SERVER_BLOCK_TYPE =" --> (41:0-41:29) "\n\t\t\tREACT_SERVER_BLOCK_TYPE =" -(61:28-61:38) " symbolFor" --> (41:29-41:39) " symbolFor" -(61:38-61:59) "('react.server.block'" --> (41:39-41:60) "('react.server.block'" -(61:59-62:2) ");\n " --> (41:60-42:0) ");" -(62:2-62:27) " REACT_FUNDAMENTAL_TYPE =" --> (42:0-42:28) "\n\t\t\tREACT_FUNDAMENTAL_TYPE =" -(62:27-62:37) " symbolFor" --> (42:28-42:38) " symbolFor" -(62:37-62:57) "('react.fundamental'" --> (42:38-42:58) "('react.fundamental'" -(62:57-63:2) ");\n " --> (42:58-43:0) ");" -(63:2-63:21) " REACT_SCOPE_TYPE =" --> (43:0-43:22) "\n\t\t\tREACT_SCOPE_TYPE =" -(63:21-63:31) " symbolFor" --> (43:22-43:32) " symbolFor" -(63:31-63:45) "('react.scope'" --> (43:32-43:46) "('react.scope'" -(63:45-64:2) ");\n " --> (43:46-44:0) ");" -(64:2-64:25) " REACT_OPAQUE_ID_TYPE =" --> (44:0-44:26) "\n\t\t\tREACT_OPAQUE_ID_TYPE =" -(64:25-64:35) " symbolFor" --> (44:26-44:36) " symbolFor" -(64:35-64:53) "('react.opaque.id'" --> (44:36-44:54) "('react.opaque.id'" -(64:53-65:2) ");\n " --> (44:54-45:0) ");" -(65:2-65:34) " REACT_DEBUG_TRACING_MODE_TYPE =" --> (45:0-45:35) "\n\t\t\tREACT_DEBUG_TRACING_MODE_TYPE =" -(65:34-65:44) " symbolFor" --> (45:35-45:45) " symbolFor" -(65:44-65:69) "('react.debug_trace_mode'" --> (45:45-45:70) "('react.debug_trace_mode'" -(65:69-66:2) ");\n " --> (45:70-46:0) ");" -(66:2-66:25) " REACT_OFFSCREEN_TYPE =" --> (46:0-46:26) "\n\t\t\tREACT_OFFSCREEN_TYPE =" -(66:25-66:35) " symbolFor" --> (46:26-46:36) " symbolFor" -(66:35-66:53) "('react.offscreen'" --> (46:36-46:54) "('react.offscreen'" -(66:53-67:2) ");\n " --> (46:54-47:0) ");" -(67:2-67:29) " REACT_LEGACY_HIDDEN_TYPE =" --> (47:0-47:30) "\n\t\t\tREACT_LEGACY_HIDDEN_TYPE =" -(67:29-67:39) " symbolFor" --> (47:30-47:40) " symbolFor" -(67:39-67:61) "('react.legacy_hidden'" --> (47:40-47:62) "('react.legacy_hidden'" -(67:61-68:1) ");\n" --> (47:62-48:2) ");\n\t" -(68:1-70:0) "}\n" --> (48:2-49:2) "\t}\n\t" -(70:0-70:4) "\nvar" --> (49:2-49:6) "\tvar" -(70:4-70:35) " MAYBE_ITERATOR_SYMBOL = typeof" --> (49:6-49:37) " MAYBE_ITERATOR_SYMBOL = typeof" -(70:35-70:46) " Symbol ===" --> (49:37-49:48) " Symbol ===" -(70:46-70:60) " 'function' &&" --> (49:48-49:62) " 'function' &&" -(70:60-70:67) " Symbol" --> (49:62-49:69) " Symbol" -(70:67-71:0) ".iterator;" --> (49:69-50:2) ".iterator;\n\t" -(71:0-71:4) "\nvar" --> (50:2-50:6) "\tvar" -(71:4-71:27) " FAUX_ITERATOR_SYMBOL =" --> (50:6-50:29) " FAUX_ITERATOR_SYMBOL =" -(71:27-72:0) " '@@iterator';" --> (50:29-51:2) " '@@iterator';\n\t" -(72:0-72:9) "\nfunction" --> (51:2-51:11) "\tfunction" -(72:9-72:23) " getIteratorFn" --> (51:11-51:25) " getIteratorFn" -(72:23-72:38) "(maybeIterable)" --> (51:25-51:40) "(maybeIterable)" -(72:38-73:2) " {\n " --> (51:40-52:0) " {" -(73:2-73:6) " if " --> (52:0-52:7) "\n\t\t\tif " -(73:6-73:24) "(maybeIterable ===" --> (52:7-52:25) "(maybeIterable ===" -(73:24-73:39) " null || typeof" --> (52:25-52:40) " null || typeof" -(73:39-73:57) " maybeIterable !==" --> (52:40-52:58) " maybeIterable !==" -(73:57-73:67) " 'object')" --> (52:58-52:68) " 'object')" -(73:67-74:4) " {\n " --> (52:68-53:0) " {" -(74:4-74:11) " return" --> (53:0-53:11) "\n\t\t\t\treturn" -(74:11-75:3) " null;\n " --> (53:11-54:3) " null;\n\t\t" -(75:3-77:2) "}\n\n " --> (54:3-55:3) "\t}\n\t\t" -(77:2-77:6) " var" --> (55:3-55:7) "\tvar" -(77:6-77:22) " maybeIterator =" --> (55:7-55:23) " maybeIterator =" -(77:22-77:47) " MAYBE_ITERATOR_SYMBOL &&" --> (55:23-55:48) " MAYBE_ITERATOR_SYMBOL &&" -(77:47-77:61) " maybeIterable" --> (55:48-55:62) " maybeIterable" -(77:61-77:87) "[MAYBE_ITERATOR_SYMBOL] ||" --> (55:62-55:88) "[MAYBE_ITERATOR_SYMBOL] ||" -(77:87-77:101) " maybeIterable" --> (55:88-55:102) " maybeIterable" -(77:101-79:2) "[FAUX_ITERATOR_SYMBOL];\n\n " --> (55:102-56:0) "[FAUX_ITERATOR_SYMBOL];" -(79:2-79:13) " if (typeof" --> (56:0-56:14) "\n\t\t\tif (typeof" -(79:13-79:31) " maybeIterator ===" --> (56:14-56:32) " maybeIterator ===" -(79:31-79:43) " 'function')" --> (56:32-56:44) " 'function')" -(79:43-80:4) " {\n " --> (56:44-57:0) " {" -(80:4-80:11) " return" --> (57:0-57:11) "\n\t\t\t\treturn" -(80:11-81:3) " maybeIterator;\n " --> (57:11-58:3) " maybeIterator;\n\t\t" -(81:3-83:2) "}\n\n " --> (58:3-59:0) "\t}" -(83:2-83:9) " return" --> (59:0-59:10) "\n\t\t\treturn" -(83:9-84:1) " null;\n" --> (59:10-60:2) " null;\n\t" -(84:1-89:0) "}\n\n/**\n * Keeps track of the current dispatcher.\n */" --> (60:2-61:2) "\t}\n\t" -(89:0-89:4) "\nvar" --> (61:2-61:6) "\tvar" -(89:4-89:29) " ReactCurrentDispatcher =" --> (61:6-61:31) " ReactCurrentDispatcher =" -(89:29-94:2) " {\n /**\n * @internal\n * @type {ReactComponent}\n */\n " --> (61:31-61:32) " " -(94:2-94:11) " current:" --> (61:32-61:41) "{current:" -(94:11-95:1) " null\n" --> (61:41-61:45) " nul" -(95:1-101:0) "};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */" --> (61:45-62:2) "l};\n\t" -(101:0-101:4) "\nvar" --> (62:2-62:6) "\tvar" -(101:4-101:30) " ReactCurrentBatchConfig =" --> (62:6-62:32) " ReactCurrentBatchConfig =" -(101:30-102:2) " {\n " --> (62:32-62:33) " " -(102:2-102:14) " transition:" --> (62:33-62:45) "{transition:" -(102:14-103:1) " 0\n" --> (62:45-62:46) " " -(103:1-111:0) "};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */" --> (62:46-63:2) "0};\n\t" -(111:0-111:4) "\nvar" --> (63:2-63:6) "\tvar" -(111:4-111:24) " ReactCurrentOwner =" --> (63:6-63:26) " ReactCurrentOwner =" -(111:24-116:2) " {\n /**\n * @internal\n * @type {ReactComponent}\n */\n " --> (63:26-63:27) " " -(116:2-116:11) " current:" --> (63:27-63:36) "{current:" -(116:11-117:1) " null\n" --> (63:36-63:40) " nul" -(117:1-119:0) "};\n" --> (63:40-64:2) "l};\n\t" -(119:0-119:4) "\nvar" --> (64:2-64:6) "\tvar" -(119:4-119:29) " ReactDebugCurrentFrame =" --> (64:6-64:31) " ReactDebugCurrentFrame =" -(119:29-119:31) " {" --> (64:31-64:32) " " -(119:31-120:0) "};" --> (64:32-65:2) "{};\n\t" -(120:0-120:4) "\nvar" --> (65:2-65:6) "\tvar" -(120:4-120:29) " currentExtraStackFrame =" --> (65:6-65:31) " currentExtraStackFrame =" -(120:29-121:0) " null;" --> (65:31-66:2) " null;\n\t" -(121:0-121:9) "\nfunction" --> (66:2-66:11) "\tfunction" -(121:9-121:28) " setExtraStackFrame" --> (66:11-66:30) " setExtraStackFrame" -(121:28-121:35) "(stack)" --> (66:30-66:37) "(stack)" -(121:35-122:2) " {\n " --> (66:37-67:3) " {\n\t\t" -(122:2-123:4) " {\n " --> (67:3-68:0) "\t{" -(123:4-123:29) " currentExtraStackFrame =" --> (68:0-68:29) "\n\t\t\t\tcurrentExtraStackFrame =" -(123:29-124:3) " stack;\n " --> (68:29-69:3) " stack;\n\t\t" -(124:3-125:1) "}\n" --> (69:3-70:2) "\t}\n\t" -(125:1-127:0) "}\n" --> (70:2-71:2) "\t}\n\t" -(127:0-128:2) "\n{\n " --> (71:2-72:0) "\t{" -(128:2-128:25) " ReactDebugCurrentFrame" --> (72:0-72:26) "\n\t\t\tReactDebugCurrentFrame" -(128:25-128:46) ".setExtraStackFrame =" --> (72:26-72:47) ".setExtraStackFrame =" -(128:46-128:56) " function " --> (72:47-72:56) " function" -(128:56-128:63) "(stack)" --> (72:56-72:63) "(stack)" -(128:63-129:4) " {\n " --> (72:63-73:4) " {\n\t\t\t" -(129:4-130:6) " {\n " --> (73:4-74:0) "\t{" -(130:6-130:31) " currentExtraStackFrame =" --> (74:0-74:30) "\n\t\t\t\t\tcurrentExtraStackFrame =" -(130:31-131:5) " stack;\n " --> (74:30-75:4) " stack;\n\t\t\t" -(131:5-132:3) "}\n " --> (75:4-76:3) "\t}\n\t\t" -(132:3-135:2) "}; // Stack implementation injected by the current renderer.\n\n\n " --> (76:3-77:0) "\t};" -(135:2-135:25) " ReactDebugCurrentFrame" --> (77:0-77:26) "\n\t\t\tReactDebugCurrentFrame" -(135:25-135:43) ".getCurrentStack =" --> (77:26-77:44) ".getCurrentStack =" -(135:43-137:2) " null;\n\n " --> (77:44-78:0) " null;" -(137:2-137:25) " ReactDebugCurrentFrame" --> (78:0-78:26) "\n\t\t\tReactDebugCurrentFrame" -(137:25-137:44) ".getStackAddendum =" --> (78:26-78:45) ".getStackAddendum =" -(137:44-137:56) " function ()" --> (78:45-78:56) " function()" -(137:56-138:4) " {\n " --> (78:56-79:4) " {\n\t\t\t" -(138:4-138:8) " var" --> (79:4-79:8) "\tvar" -(138:8-138:16) " stack =" --> (79:8-79:16) " stack =" -(138:16-140:4) " ''; // Add an extra top frame while an element is being validated\n\n " --> (79:16-80:0) " '';" -(140:4-140:8) " if " --> (80:0-80:8) "\n\t\t\t\tif " -(140:8-140:32) "(currentExtraStackFrame)" --> (80:8-80:32) "(currentExtraStackFrame)" -(140:32-141:6) " {\n " --> (80:32-81:0) " {" -(141:6-141:15) " stack +=" --> (81:0-81:14) "\n\t\t\t\t\tstack +=" -(141:15-142:5) " currentExtraStackFrame;\n " --> (81:14-82:4) " currentExtraStackFrame;\n\t\t\t" -(142:5-145:4) "} // Delegate to the injected renderer-specific implementation\n\n\n " --> (82:4-83:4) "\t}\n\t\t\t" -(145:4-145:8) " var" --> (83:4-83:8) "\tvar" -(145:8-145:15) " impl =" --> (83:8-83:15) " impl =" -(145:15-145:38) " ReactDebugCurrentFrame" --> (83:15-83:38) " ReactDebugCurrentFrame" -(145:38-147:4) ".getCurrentStack;\n\n " --> (83:38-84:0) ".getCurrentStack;" -(147:4-147:8) " if " --> (84:0-84:8) "\n\t\t\t\tif " -(147:8-147:14) "(impl)" --> (84:8-84:14) "(impl)" -(147:14-148:6) " {\n " --> (84:14-85:0) " {" -(148:6-148:15) " stack +=" --> (85:0-85:14) "\n\t\t\t\t\tstack +=" -(148:15-148:21) " impl(" --> (85:14-85:20) " impl(" -(148:21-148:25) ") ||" --> (85:20-85:24) ") ||" -(148:25-149:5) " '';\n " --> (85:24-86:4) " '';\n\t\t\t" -(149:5-151:4) "}\n\n " --> (86:4-87:0) "\t}" -(151:4-151:11) " return" --> (87:0-87:11) "\n\t\t\t\treturn" -(151:11-152:3) " stack;\n " --> (87:11-88:3) " stack;\n\t\t" -(152:3-153:1) "};\n" --> (88:3-89:2) "\t};\n\t" -(153:1-158:0) "}\n\n/**\n * Used by act() to track whether you're inside an act() scope.\n */" --> (89:2-90:2) "\t}\n\t" -(158:0-158:4) "\nvar" --> (90:2-90:6) "\tvar" -(158:4-158:27) " IsSomeRendererActing =" --> (90:6-90:29) " IsSomeRendererActing =" -(158:27-159:2) " {\n " --> (90:29-90:30) " " -(159:2-159:11) " current:" --> (90:30-90:39) "{current:" -(159:11-160:1) " false\n" --> (90:39-90:44) " fals" -(160:1-162:0) "};\n" --> (90:44-91:2) "e};\n\t" -(162:0-162:4) "\nvar" --> (91:2-91:6) "\tvar" -(162:4-162:27) " ReactSharedInternals =" --> (91:6-91:29) " ReactSharedInternals =" -(162:27-163:2) " {\n " --> (91:29-92:3) " {\n\t\t" -(163:2-163:26) " ReactCurrentDispatcher:" --> (92:3-92:27) "\tReactCurrentDispatcher:" -(163:26-164:2) " ReactCurrentDispatcher,\n " --> (92:27-93:3) " ReactCurrentDispatcher,\n\t\t" -(164:2-164:27) " ReactCurrentBatchConfig:" --> (93:3-93:28) "\tReactCurrentBatchConfig:" -(164:27-165:2) " ReactCurrentBatchConfig,\n " --> (93:28-94:3) " ReactCurrentBatchConfig,\n\t\t" -(165:2-165:21) " ReactCurrentOwner:" --> (94:3-94:22) "\tReactCurrentOwner:" -(165:21-166:2) " ReactCurrentOwner,\n " --> (94:22-95:3) " ReactCurrentOwner,\n\t\t" -(166:2-166:24) " IsSomeRendererActing:" --> (95:3-95:25) "\tIsSomeRendererActing:" -(166:24-168:2) " IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n " --> (95:25-96:3) " IsSomeRendererActing,\n\t\t" -(168:2-168:10) " assign:" --> (96:3-96:11) "\tassign:" -(168:10-169:1) " _assign\n" --> (96:11-97:2) " _assign\n\t" -(169:1-171:0) "};\n" --> (97:2-98:2) "\t};\n\t" -(171:0-172:2) "\n{\n " --> (98:2-99:0) "\t{" -(172:2-172:23) " ReactSharedInternals" --> (99:0-99:24) "\n\t\t\tReactSharedInternals" -(172:23-172:48) ".ReactDebugCurrentFrame =" --> (99:24-99:49) ".ReactDebugCurrentFrame =" -(172:48-173:1) " ReactDebugCurrentFrame;\n" --> (99:49-100:2) " ReactDebugCurrentFrame;\n\t" -(173:1-180:0) "}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n" --> (100:2-101:2) "\t}\n\t" -(180:0-180:9) "\nfunction" --> (101:2-101:11) "\tfunction" -(180:9-180:14) " warn" --> (101:11-101:16) " warn" -(180:14-180:22) "(format)" --> (101:16-101:24) "(format)" -(180:22-181:2) " {\n " --> (101:24-102:3) " {\n\t\t" -(181:2-182:4) " {\n " --> (102:3-103:0) "\t{" -(182:4-182:9) " for " --> (103:0-103:9) "\n\t\t\t\tfor " -(182:9-182:13) "(var" --> (103:9-103:13) "(var" -(182:13-182:20) " _len =" --> (103:13-103:20) " _len =" -(182:20-182:30) " arguments" --> (103:20-103:30) " arguments" -(182:30-182:38) ".length," --> (103:30-103:38) ".length," -(182:38-182:45) " args =" --> (103:38-103:45) " args =" -(182:45-182:49) " new" --> (103:45-103:49) " new" -(182:49-182:55) " Array" --> (103:49-103:55) " Array" -(182:55-182:62) "(_len >" --> (103:55-103:62) "(_len >" -(182:62-182:66) " 1 ?" --> (103:62-103:66) " 1 ?" -(182:66-182:73) " _len -" --> (103:66-103:73) " _len -" -(182:73-182:77) " 1 :" --> (103:73-103:77) " 1 :" -(182:77-182:81) " 0)," --> (103:77-103:81) " 0)," -(182:81-182:88) " _key =" --> (103:81-103:88) " _key =" -(182:88-182:91) " 1;" --> (103:88-103:91) " 1;" -(182:91-182:98) " _key <" --> (103:91-103:98) " _key <" -(182:98-182:104) " _len;" --> (103:98-103:104) " _len;" -(182:104-182:112) " _key++)" --> (103:104-103:112) " _key++)" -(182:112-183:6) " {\n " --> (103:112-104:0) " {" -(183:6-183:11) " args" --> (104:0-104:10) "\n\t\t\t\t\targs" -(183:11-183:18) "[_key -" --> (104:10-104:17) "[_key -" -(183:18-183:23) " 1] =" --> (104:17-104:22) " 1] =" -(183:23-183:33) " arguments" --> (104:22-104:32) " arguments" -(183:33-184:5) "[_key];\n " --> (104:32-105:4) "[_key];\n\t\t\t" -(184:5-186:4) "}\n\n " --> (105:4-106:0) "\t}" -(186:4-186:17) " printWarning" --> (106:0-106:17) "\n\t\t\t\tprintWarning" -(186:17-186:25) "('warn'," --> (106:17-106:25) "('warn'," -(186:25-186:33) " format," --> (106:25-106:33) " format," -(186:33-186:38) " args" --> (106:33-106:38) " args" -(186:38-187:3) ");\n " --> (106:38-107:3) ");\n\t\t" -(187:3-188:1) "}\n" --> (107:3-108:2) "\t}\n\t" -(188:1-189:0) "}" --> (108:2-109:2) "\t}\n\t" -(189:0-189:9) "\nfunction" --> (109:2-109:11) "\tfunction" -(189:9-189:15) " error" --> (109:11-109:17) " error" -(189:15-189:23) "(format)" --> (109:17-109:25) "(format)" -(189:23-190:2) " {\n " --> (109:25-110:3) " {\n\t\t" -(190:2-191:4) " {\n " --> (110:3-111:0) "\t{" -(191:4-191:9) " for " --> (111:0-111:9) "\n\t\t\t\tfor " -(191:9-191:13) "(var" --> (111:9-111:13) "(var" -(191:13-191:21) " _len2 =" --> (111:13-111:21) " _len2 =" -(191:21-191:31) " arguments" --> (111:21-111:31) " arguments" -(191:31-191:39) ".length," --> (111:31-111:39) ".length," -(191:39-191:46) " args =" --> (111:39-111:46) " args =" -(191:46-191:50) " new" --> (111:46-111:50) " new" -(191:50-191:56) " Array" --> (111:50-111:56) " Array" -(191:56-191:64) "(_len2 >" --> (111:56-111:64) "(_len2 >" -(191:64-191:68) " 1 ?" --> (111:64-111:68) " 1 ?" -(191:68-191:76) " _len2 -" --> (111:68-111:76) " _len2 -" -(191:76-191:80) " 1 :" --> (111:76-111:80) " 1 :" -(191:80-191:84) " 0)," --> (111:80-111:84) " 0)," -(191:84-191:92) " _key2 =" --> (111:84-111:92) " _key2 =" -(191:92-191:95) " 1;" --> (111:92-111:95) " 1;" -(191:95-191:103) " _key2 <" --> (111:95-111:103) " _key2 <" -(191:103-191:110) " _len2;" --> (111:103-111:110) " _len2;" -(191:110-191:119) " _key2++)" --> (111:110-111:119) " _key2++)" -(191:119-192:6) " {\n " --> (111:119-112:0) " {" -(192:6-192:11) " args" --> (112:0-112:10) "\n\t\t\t\t\targs" -(192:11-192:19) "[_key2 -" --> (112:10-112:18) "[_key2 -" -(192:19-192:24) " 1] =" --> (112:18-112:23) " 1] =" -(192:24-192:34) " arguments" --> (112:23-112:33) " arguments" -(192:34-193:5) "[_key2];\n " --> (112:33-113:4) "[_key2];\n\t\t\t" -(193:5-195:4) "}\n\n " --> (113:4-114:0) "\t}" -(195:4-195:17) " printWarning" --> (114:0-114:17) "\n\t\t\t\tprintWarning" -(195:17-195:26) "('error'," --> (114:17-114:26) "('error'," -(195:26-195:34) " format," --> (114:26-114:34) " format," -(195:34-195:39) " args" --> (114:34-114:39) " args" -(195:39-196:3) ");\n " --> (114:39-115:3) ");\n\t\t" -(196:3-197:1) "}\n" --> (115:3-116:2) "\t}\n\t" -(197:1-199:0) "}\n" --> (116:2-117:2) "\t}\n\t" -(199:0-199:9) "\nfunction" --> (117:2-117:11) "\tfunction" -(199:9-199:22) " printWarning" --> (117:11-117:24) " printWarning" -(199:22-199:29) "(level," --> (117:24-117:31) "(level," -(199:29-199:37) " format," --> (117:31-117:39) " format," -(199:37-199:43) " args)" --> (117:39-117:45) " args)" -(199:43-202:2) " {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n " --> (117:45-118:3) " {\n\t\t" -(202:2-203:4) " {\n " --> (118:3-119:4) "\t{\n\t\t\t" -(203:4-203:8) " var" --> (119:4-119:8) "\tvar" -(203:8-203:33) " ReactDebugCurrentFrame =" --> (119:8-119:33) " ReactDebugCurrentFrame =" -(203:33-203:54) " ReactSharedInternals" --> (119:33-119:54) " ReactSharedInternals" -(203:54-204:4) ".ReactDebugCurrentFrame;\n " --> (119:54-120:4) ".ReactDebugCurrentFrame;\n\t\t\t" -(204:4-204:8) " var" --> (120:4-120:8) "\tvar" -(204:8-204:16) " stack =" --> (120:8-120:16) " stack =" -(204:16-204:39) " ReactDebugCurrentFrame" --> (120:16-120:39) " ReactDebugCurrentFrame" -(204:39-204:57) ".getStackAddendum(" --> (120:39-120:57) ".getStackAddendum(" -(204:57-206:4) ");\n\n " --> (120:57-121:0) ");" -(206:4-206:8) " if " --> (121:0-121:8) "\n\t\t\t\tif " -(206:8-206:18) "(stack !==" --> (121:8-121:18) "(stack !==" -(206:18-206:22) " '')" --> (121:18-121:22) " '')" -(206:22-207:6) " {\n " --> (121:22-122:0) " {" -(207:6-207:16) " format +=" --> (122:0-122:15) "\n\t\t\t\t\tformat +=" -(207:16-208:6) " '%s';\n " --> (122:15-123:0) " '%s';" -(208:6-208:13) " args =" --> (123:0-123:12) "\n\t\t\t\t\targs =" -(208:13-208:18) " args" --> (123:12-123:17) " args" -(208:18-208:25) ".concat" --> (123:17-123:24) ".concat" -(208:25-208:26) "(" --> (123:24-123:25) "(" -(208:26-208:32) "[stack" --> (123:25-123:31) "[stack" -(208:32-208:33) "]" --> (123:31-123:32) "]" -(208:33-209:5) ");\n " --> (123:32-124:4) ");\n\t\t\t" -(209:5-211:4) "}\n\n " --> (124:4-125:4) "\t}\n\t\t\t" -(211:4-211:8) " var" --> (125:4-125:8) "\tvar" -(211:8-211:25) " argsWithFormat =" --> (125:8-125:25) " argsWithFormat =" -(211:25-211:30) " args" --> (125:25-125:30) " args" -(211:30-211:34) ".map" --> (125:30-125:34) ".map" -(211:34-211:44) "(function " --> (125:34-125:43) "(function" -(211:44-211:50) "(item)" --> (125:43-125:49) "(item)" -(211:50-212:6) " {\n " --> (125:49-126:0) " {" -(212:6-212:13) " return" --> (126:0-126:12) "\n\t\t\t\t\treturn" -(212:13-212:18) " '' +" --> (126:12-126:17) " '' +" -(212:18-213:5) " item;\n " --> (126:17-127:4) " item;\n\t\t\t" -(213:5-213:6) "}" --> (127:4-127:6) "\t}" -(213:6-215:4) "); // Careful: RN currently depends on this prefix\n\n " --> (127:6-128:0) ");" -(215:4-215:19) " argsWithFormat" --> (128:0-128:19) "\n\t\t\t\targsWithFormat" -(215:19-215:27) ".unshift" --> (128:19-128:27) ".unshift" -(215:27-215:41) "('Warning: ' +" --> (128:27-128:41) "('Warning: ' +" -(215:41-215:48) " format" --> (128:41-128:48) " format" -(215:48-219:4) "); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n " --> (128:48-129:0) ");" -(219:4-219:13) " Function" --> (129:0-129:13) "\n\t\t\t\tFunction" -(219:13-219:23) ".prototype" --> (129:13-129:23) ".prototype" -(219:23-219:29) ".apply" --> (129:23-129:29) ".apply" -(219:29-219:34) ".call" --> (129:29-129:34) ".call" -(219:34-219:42) "(console" --> (129:34-129:42) "(console" -(219:42-219:50) "[level]," --> (129:42-129:50) "[level]," -(219:50-219:59) " console," --> (129:50-129:59) " console," -(219:59-219:74) " argsWithFormat" --> (129:59-129:74) " argsWithFormat" -(219:74-220:3) ");\n " --> (129:74-130:3) ");\n\t\t" -(220:3-221:1) "}\n" --> (130:3-131:2) "\t}\n\t" -(221:1-223:0) "}\n" --> (131:2-132:2) "\t}\n\t" -(223:0-223:4) "\nvar" --> (132:2-132:6) "\tvar" -(223:4-223:46) " didWarnStateUpdateForUnmountedComponent =" --> (132:6-132:48) " didWarnStateUpdateForUnmountedComponent =" -(223:46-223:48) " {" --> (132:48-132:49) " " -(223:48-225:0) "};\n" --> (132:49-133:2) "{};\n\t" -(225:0-225:9) "\nfunction" --> (133:2-133:11) "\tfunction" -(225:9-225:18) " warnNoop" --> (133:11-133:20) " warnNoop" -(225:18-225:34) "(publicInstance," --> (133:20-133:36) "(publicInstance," -(225:34-225:46) " callerName)" --> (133:36-133:48) " callerName)" -(225:46-226:2) " {\n " --> (133:48-134:3) " {\n\t\t" -(226:2-227:4) " {\n " --> (134:3-135:4) "\t{\n\t\t\t" -(227:4-227:8) " var" --> (135:4-135:8) "\tvar" -(227:8-227:23) " _constructor =" --> (135:8-135:23) " _constructor =" -(227:23-227:38) " publicInstance" --> (135:23-135:38) " publicInstance" -(227:38-228:4) ".constructor;\n " --> (135:38-136:4) ".constructor;\n\t\t\t" -(228:4-228:8) " var" --> (136:4-136:8) "\tvar" -(228:8-228:24) " componentName =" --> (136:8-136:24) " componentName =" -(228:24-228:41) " _constructor && " --> (136:24-136:41) " _constructor && " -(228:41-228:54) "(_constructor" --> (136:41-136:54) "(_constructor" -(228:54-228:69) ".displayName ||" --> (136:54-136:69) ".displayName ||" -(228:69-228:82) " _constructor" --> (136:69-136:82) " _constructor" -(228:82-228:91) ".name) ||" --> (136:82-136:91) ".name) ||" -(228:91-229:4) " 'ReactClass';\n " --> (136:91-137:4) " 'ReactClass';\n\t\t\t" -(229:4-229:8) " var" --> (137:4-137:8) "\tvar" -(229:8-229:21) " warningKey =" --> (137:8-137:21) " warningKey =" -(229:21-229:37) " componentName +" --> (137:21-137:37) " componentName +" -(229:37-229:43) " \".\" +" --> (137:37-137:43) " '.' +" -(229:43-231:4) " callerName;\n\n " --> (137:43-138:0) " callerName;" -(231:4-231:8) " if " --> (138:0-138:8) "\n\t\t\t\tif " -(231:8-231:48) "(didWarnStateUpdateForUnmountedComponent" --> (138:8-138:48) "(didWarnStateUpdateForUnmountedComponent" -(231:48-231:61) "[warningKey])" --> (138:48-138:61) "[warningKey])" -(231:61-232:6) " {\n " --> (138:61-139:0) " {" -(232:6-233:5) " return;\n " --> (139:0-140:4) "\n\t\t\t\t\treturn;\n\t\t\t" -(233:5-235:4) "}\n\n " --> (140:4-141:0) "\t}" -(235:4-235:10) " error" --> (141:0-141:10) "\n\t\t\t\terror" -(235:10-235:69) "(\"Can't call %s on a component that is not yet mounted. \" +" --> (141:10-141:69) "(\"Can't call %s on a component that is not yet mounted. \" +" -(235:69-235:140) " 'This is a no-op, but it might indicate a bug in your application. ' +" --> (141:69-141:140) " 'This is a no-op, but it might indicate a bug in your application. ' +" -(235:140-235:212) " 'Instead, assign to `this.state` directly or define a `state = {};` ' +" --> (141:140-141:212) " 'Instead, assign to `this.state` directly or define a `state = {};` ' +" -(235:212-235:274) " 'class property with the desired state in the %s component.'," --> (141:212-141:274) " 'class property with the desired state in the %s component.'," -(235:274-235:286) " callerName," --> (141:274-141:286) " callerName," -(235:286-235:300) " componentName" --> (141:286-141:300) " componentName" -(235:300-237:4) ");\n\n " --> (141:300-142:0) ");" -(237:4-237:44) " didWarnStateUpdateForUnmountedComponent" --> (142:0-142:44) "\n\t\t\t\tdidWarnStateUpdateForUnmountedComponent" -(237:44-237:58) "[warningKey] =" --> (142:44-142:58) "[warningKey] =" -(237:58-238:3) " true;\n " --> (142:58-143:3) " true;\n\t\t" -(238:3-239:1) "}\n" --> (143:3-144:2) "\t}\n\t" -(239:1-245:0) "}\n/**\n * This is the abstract API for an update queue.\n */\n\n" --> (144:2-145:2) "\t}\n\t" -(245:0-245:4) "\nvar" --> (145:2-145:6) "\tvar" -(245:4-245:27) " ReactNoopUpdateQueue =" --> (145:6-145:29) " ReactNoopUpdateQueue =" -(245:27-253:2) " {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n " --> (145:29-146:3) " {\n\t\t" -(253:2-253:13) " isMounted:" --> (146:3-146:14) "\tisMounted:" -(253:13-253:23) " function " --> (146:14-146:23) " function" -(253:23-253:39) "(publicInstance)" --> (146:23-146:39) "(publicInstance)" -(253:39-254:4) " {\n " --> (146:39-147:0) " {" -(254:4-254:11) " return" --> (147:0-147:11) "\n\t\t\t\treturn" -(254:11-255:3) " false;\n " --> (147:11-148:3) " false;\n\t\t" -(255:3-272:2) "},\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n " --> (148:3-149:3) "\t},\n\t\t" -(272:2-272:22) " enqueueForceUpdate:" --> (149:3-149:23) "\tenqueueForceUpdate:" -(272:22-272:32) " function " --> (149:23-149:32) " function" -(272:32-272:48) "(publicInstance," --> (149:32-149:48) "(publicInstance," -(272:48-272:58) " callback," --> (149:48-149:58) " callback," -(272:58-272:70) " callerName)" --> (149:58-149:70) " callerName)" -(272:70-273:4) " {\n " --> (149:70-150:0) " {" -(273:4-273:13) " warnNoop" --> (150:0-150:13) "\n\t\t\t\twarnNoop" -(273:13-273:29) "(publicInstance," --> (150:13-150:29) "(publicInstance," -(273:29-273:43) " 'forceUpdate'" --> (150:29-150:43) " 'forceUpdate'" -(273:43-274:3) ");\n " --> (150:43-151:3) ");\n\t\t" -(274:3-289:2) "},\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n " --> (151:3-152:3) "\t},\n\t\t" -(289:2-289:23) " enqueueReplaceState:" --> (152:3-152:24) "\tenqueueReplaceState:" -(289:23-289:33) " function " --> (152:24-152:33) " function" -(289:33-289:49) "(publicInstance," --> (152:33-152:49) "(publicInstance," -(289:49-289:64) " completeState," --> (152:49-152:64) " completeState," -(289:64-289:74) " callback," --> (152:64-152:74) " callback," -(289:74-289:86) " callerName)" --> (152:74-152:86) " callerName)" -(289:86-290:4) " {\n " --> (152:86-153:0) " {" -(290:4-290:13) " warnNoop" --> (153:0-153:13) "\n\t\t\t\twarnNoop" -(290:13-290:29) "(publicInstance," --> (153:13-153:29) "(publicInstance," -(290:29-290:44) " 'replaceState'" --> (153:29-153:44) " 'replaceState'" -(290:44-291:3) ");\n " --> (153:44-154:3) ");\n\t\t" -(291:3-305:2) "},\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n " --> (154:3-155:3) "\t},\n\t\t" -(305:2-305:19) " enqueueSetState:" --> (155:3-155:20) "\tenqueueSetState:" -(305:19-305:29) " function " --> (155:20-155:29) " function" -(305:29-305:45) "(publicInstance," --> (155:29-155:45) "(publicInstance," -(305:45-305:59) " partialState," --> (155:45-155:59) " partialState," -(305:59-305:69) " callback," --> (155:59-155:69) " callback," -(305:69-305:81) " callerName)" --> (155:69-155:81) " callerName)" -(305:81-306:4) " {\n " --> (155:81-156:0) " {" -(306:4-306:13) " warnNoop" --> (156:0-156:13) "\n\t\t\t\twarnNoop" -(306:13-306:29) "(publicInstance," --> (156:13-156:29) "(publicInstance," -(306:29-306:40) " 'setState'" --> (156:29-156:40) " 'setState'" -(306:40-307:3) ");\n " --> (156:40-157:3) ");\n\t\t" -(307:3-308:1) "}\n" --> (157:3-158:2) "\t}\n\t" -(308:1-310:0) "};\n" --> (158:2-159:2) "\t};\n\t" -(310:0-310:4) "\nvar" --> (159:2-159:6) "\tvar" -(310:4-310:18) " emptyObject =" --> (159:6-159:20) " emptyObject =" -(310:18-310:20) " {" --> (159:20-159:21) " " -(310:20-312:0) "};\n" --> (159:21-160:2) "{};\n\t" -(312:0-313:2) "\n{\n " --> (160:2-161:0) "\t{" -(313:2-313:9) " Object" --> (161:0-161:10) "\n\t\t\tObject" -(313:9-313:16) ".freeze" --> (161:10-161:17) ".freeze" -(313:16-313:28) "(emptyObject" --> (161:17-161:29) "(emptyObject" -(313:28-314:1) ");\n" --> (161:29-162:2) ");\n\t" -(314:1-320:0) "}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n" --> (162:2-163:2) "\t}\n\t" -(320:0-320:9) "\nfunction" --> (163:2-163:11) "\tfunction" -(320:9-320:19) " Component" --> (163:11-163:21) " Component" -(320:19-320:26) "(props," --> (163:21-163:28) "(props," -(320:26-320:35) " context," --> (163:28-163:37) " context," -(320:35-320:44) " updater)" --> (163:37-163:46) " updater)" -(320:44-321:2) " {\n " --> (163:46-164:0) " {" -(321:2-321:7) " this" --> (164:0-164:8) "\n\t\t\tthis" -(321:7-321:15) ".props =" --> (164:8-164:16) ".props =" -(321:15-322:2) " props;\n " --> (164:16-165:0) " props;" -(322:2-322:7) " this" --> (165:0-165:8) "\n\t\t\tthis" -(322:7-322:17) ".context =" --> (165:8-165:18) ".context =" -(322:17-324:2) " context; // If a component has string refs, we will assign a different object later.\n\n " --> (165:18-166:0) " context;" -(324:2-324:7) " this" --> (166:0-166:8) "\n\t\t\tthis" -(324:7-324:14) ".refs =" --> (166:8-166:15) ".refs =" -(324:14-327:2) " emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n " --> (166:15-167:0) " emptyObject;" -(327:2-327:7) " this" --> (167:0-167:8) "\n\t\t\tthis" -(327:7-327:17) ".updater =" --> (167:8-167:18) ".updater =" -(327:17-327:28) " updater ||" --> (167:18-167:29) " updater ||" -(327:28-328:1) " ReactNoopUpdateQueue;\n" --> (167:29-168:2) " ReactNoopUpdateQueue;\n\t" -(328:1-330:0) "}\n" --> (168:2-169:0) "\t}" -(330:0-330:10) "\nComponent" --> (169:0-169:12) "\n\t\tComponent" -(330:10-330:20) ".prototype" --> (169:12-169:22) ".prototype" -(330:20-330:39) ".isReactComponent =" --> (169:22-169:41) ".isReactComponent =" -(330:39-330:41) " {" --> (169:41-169:42) " " -(330:41-357:0) "};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n" --> (169:42-170:0) "{};" -(357:0-357:10) "\nComponent" --> (170:0-170:12) "\n\t\tComponent" -(357:10-357:20) ".prototype" --> (170:12-170:22) ".prototype" -(357:20-357:31) ".setState =" --> (170:22-170:33) ".setState =" -(357:31-357:41) " function " --> (170:33-170:42) " function" -(357:41-357:55) "(partialState," --> (170:42-170:56) "(partialState," -(357:55-357:65) " callback)" --> (170:56-170:66) " callback)" -(357:65-358:2) " {\n " --> (170:66-171:0) " {" -(358:2-358:15) " if (!(typeof" --> (171:0-171:16) "\n\t\t\tif (!(typeof" -(358:15-358:32) " partialState ===" --> (171:16-171:33) " partialState ===" -(358:32-358:51) " 'object' || typeof" --> (171:33-171:52) " 'object' || typeof" -(358:51-358:68) " partialState ===" --> (171:52-171:69) " partialState ===" -(358:68-358:82) " 'function' ||" --> (171:69-171:83) " 'function' ||" -(358:82-358:98) " partialState ==" --> (171:83-171:99) " partialState ==" -(358:98-358:105) " null))" --> (171:99-171:106) " null))" -(358:105-359:4) " {\n " --> (171:106-172:4) " {\n\t\t\t" -(359:4-360:6) " {\n " --> (172:4-173:0) "\t{" -(360:6-360:12) " throw" --> (173:0-173:11) "\n\t\t\t\t\tthrow" -(360:12-360:19) " Error(" --> (173:11-173:17) " Error" -(360:19-360:140) " \"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\" " --> (173:17-173:137) "('setState(...): takes an object of state variables to update or a function which returns an object of state variables.'" -(360:140-361:5) ");\n " --> (173:137-174:4) ");\n\t\t\t" -(361:5-362:3) "}\n " --> (174:4-175:3) "\t}\n\t\t" -(362:3-364:2) "}\n\n " --> (175:3-176:0) "\t}" -(364:2-364:7) " this" --> (176:0-176:8) "\n\t\t\tthis" -(364:7-364:15) ".updater" --> (176:8-176:16) ".updater" -(364:15-364:31) ".enqueueSetState" --> (176:16-176:32) ".enqueueSetState" -(364:31-364:37) "(this," --> (176:32-176:38) "(this," -(364:37-364:51) " partialState," --> (176:38-176:52) " partialState," -(364:51-364:61) " callback," --> (176:52-176:62) " callback," -(364:61-364:72) " 'setState'" --> (176:62-176:73) " 'setState'" -(364:72-365:1) ");\n" --> (176:73-177:2) ");\n\t" -(365:1-382:0) "};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n" --> (177:2-178:0) "\t};" -(382:0-382:10) "\nComponent" --> (178:0-178:12) "\n\t\tComponent" -(382:10-382:20) ".prototype" --> (178:12-178:22) ".prototype" -(382:20-382:34) ".forceUpdate =" --> (178:22-178:36) ".forceUpdate =" -(382:34-382:44) " function " --> (178:36-178:45) " function" -(382:44-382:54) "(callback)" --> (178:45-178:55) "(callback)" -(382:54-383:2) " {\n " --> (178:55-179:0) " {" -(383:2-383:7) " this" --> (179:0-179:8) "\n\t\t\tthis" -(383:7-383:15) ".updater" --> (179:8-179:16) ".updater" -(383:15-383:34) ".enqueueForceUpdate" --> (179:16-179:35) ".enqueueForceUpdate" -(383:34-383:40) "(this," --> (179:35-179:41) "(this," -(383:40-383:50) " callback," --> (179:41-179:51) " callback," -(383:50-383:64) " 'forceUpdate'" --> (179:51-179:65) " 'forceUpdate'" -(383:64-384:1) ");\n" --> (179:65-180:2) ");\n\t" -(384:1-392:0) "};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n" --> (180:2-181:2) "\t};\n\t" -(392:0-393:2) "\n{\n " --> (181:2-182:3) "\t{\n\t\t" -(393:2-393:6) " var" --> (182:3-182:7) "\tvar" -(393:6-393:23) " deprecatedAPIs =" --> (182:7-182:24) " deprecatedAPIs =" -(393:23-394:4) " {\n " --> (182:24-183:4) " {\n\t\t\t" -(394:4-394:15) " isMounted:" --> (183:4-183:15) "\tisMounted:" -(394:15-394:16) " " --> (183:15-183:16) " " -(394:16-394:29) "['isMounted'," --> (183:16-183:29) "['isMounted'," -(394:29-394:103) " 'Instead, make sure to clean up subscriptions and pending requests in ' +" --> (183:29-183:103) " 'Instead, make sure to clean up subscriptions and pending requests in ' +" -(394:103-394:151) " 'componentWillUnmount to prevent memory leaks.'" --> (183:103-183:151) " 'componentWillUnmount to prevent memory leaks.'" -(394:151-395:4) "],\n " --> (183:151-184:4) "],\n\t\t\t" -(395:4-395:18) " replaceState:" --> (184:4-184:18) "\treplaceState:" -(395:18-395:19) " " --> (184:18-184:19) " " -(395:19-395:35) "['replaceState'," --> (184:19-184:35) "['replaceState'," -(395:35-395:88) " 'Refactor your code to use setState instead (see ' +" --> (184:35-184:88) " 'Refactor your code to use setState instead (see ' +" -(395:88-395:138) " 'https://github.com/facebook/react/issues/3236).'" --> (184:88-184:138) " 'https://github.com/facebook/react/issues/3236).'" -(395:138-396:3) "]\n " --> (184:138-185:3) "]\n\t\t" -(396:3-398:2) "};\n\n " --> (185:3-186:3) "\t};\n\t\t" -(398:2-398:6) " var" --> (186:3-186:7) "\tvar" -(398:6-398:33) " defineDeprecationWarning =" --> (186:7-186:34) " defineDeprecationWarning =" -(398:33-398:43) " function " --> (186:34-186:43) " function" -(398:43-398:55) "(methodName," --> (186:43-186:55) "(methodName," -(398:55-398:61) " info)" --> (186:55-186:61) " info)" -(398:61-399:4) " {\n " --> (186:61-187:0) " {" -(399:4-399:11) " Object" --> (187:0-187:11) "\n\t\t\t\tObject" -(399:11-399:26) ".defineProperty" --> (187:11-187:26) ".defineProperty" -(399:26-399:36) "(Component" --> (187:26-187:36) "(Component" -(399:36-399:47) ".prototype," --> (187:36-187:47) ".prototype," -(399:47-399:59) " methodName," --> (187:47-187:59) " methodName," -(399:59-400:6) " {\n " --> (187:59-187:60) " " -(400:6-400:11) " get:" --> (187:60-187:65) "{get:" -(400:11-400:23) " function ()" --> (187:65-187:76) " function()" -(400:23-401:8) " {\n " --> (187:76-188:0) " {" -(401:8-401:13) " warn" --> (188:0-188:10) "\n\t\t\t\t\twarn" -(401:13-401:76) "('%s(...) is deprecated in plain JavaScript React classes. %s'," --> (188:10-188:73) "('%s(...) is deprecated in plain JavaScript React classes. %s'," -(401:76-401:81) " info" --> (188:73-188:78) " info" -(401:81-401:85) "[0]," --> (188:78-188:82) "[0]," -(401:85-401:90) " info" --> (188:82-188:87) " info" -(401:90-401:93) "[1]" --> (188:87-188:90) "[1]" -(401:93-403:8) ");\n\n " --> (188:90-189:0) ");" -(403:8-403:15) " return" --> (189:0-189:12) "\n\t\t\t\t\treturn" -(403:15-404:7) " undefined;\n " --> (189:12-190:4) " undefined;\n\t\t\t" -(404:7-405:5) "}\n " --> (190:4-190:5) "\t" -(405:5-405:6) "}" --> (190:5-190:7) "}}" -(405:6-406:3) ");\n " --> (190:7-191:3) ");\n\t\t" -(406:3-408:2) "};\n\n " --> (191:3-192:0) "\t};" -(408:2-408:7) " for " --> (192:0-192:8) "\n\t\t\tfor " -(408:7-408:11) "(var" --> (192:8-192:12) "(var" -(408:11-408:21) " fnName in" --> (192:12-192:22) " fnName in" -(408:21-408:37) " deprecatedAPIs)" --> (192:22-192:38) " deprecatedAPIs)" -(408:37-409:4) " {\n " --> (192:38-193:0) " {" -(409:4-409:8) " if " --> (193:0-193:8) "\n\t\t\t\tif " -(409:8-409:23) "(deprecatedAPIs" --> (193:8-193:23) "(deprecatedAPIs" -(409:23-409:38) ".hasOwnProperty" --> (193:23-193:38) ".hasOwnProperty" -(409:38-409:45) "(fnName" --> (193:38-193:45) "(fnName" -(409:45-409:47) "))" --> (193:45-193:47) "))" -(409:47-410:6) " {\n " --> (193:47-194:0) " {" -(410:6-410:31) " defineDeprecationWarning" --> (194:0-194:30) "\n\t\t\t\t\tdefineDeprecationWarning" -(410:31-410:39) "(fnName," --> (194:30-194:38) "(fnName," -(410:39-410:54) " deprecatedAPIs" --> (194:38-194:53) " deprecatedAPIs" -(410:54-410:62) "[fnName]" --> (194:53-194:61) "[fnName]" -(410:62-411:5) ");\n " --> (194:61-195:4) ");\n\t\t\t" -(411:5-412:3) "}\n " --> (195:4-196:3) "\t}\n\t\t" -(412:3-413:1) "}\n" --> (196:3-197:2) "\t}\n\t" -(413:1-415:0) "}\n" --> (197:2-198:2) "\t}\n\t" -(415:0-415:9) "\nfunction" --> (198:2-198:11) "\tfunction" -(415:9-415:26) " ComponentDummy()" --> (198:11-198:28) " ComponentDummy()" -(415:26-415:28) " {" --> (198:28-198:29) " " -(415:28-417:0) "}\n" --> (198:29-199:0) "{}" -(417:0-417:15) "\nComponentDummy" --> (199:0-199:17) "\n\t\tComponentDummy" -(417:15-417:27) ".prototype =" --> (199:17-199:29) ".prototype =" -(417:27-417:37) " Component" --> (199:29-199:39) " Component" -(417:37-422:0) ".prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n" --> (199:39-200:2) ".prototype;\n\t" -(422:0-422:9) "\nfunction" --> (200:2-200:11) "\tfunction" -(422:9-422:23) " PureComponent" --> (200:11-200:25) " PureComponent" -(422:23-422:30) "(props," --> (200:25-200:32) "(props," -(422:30-422:39) " context," --> (200:32-200:41) " context," -(422:39-422:48) " updater)" --> (200:41-200:50) " updater)" -(422:48-423:2) " {\n " --> (200:50-201:0) " {" -(423:2-423:7) " this" --> (201:0-201:8) "\n\t\t\tthis" -(423:7-423:15) ".props =" --> (201:8-201:16) ".props =" -(423:15-424:2) " props;\n " --> (201:16-202:0) " props;" -(424:2-424:7) " this" --> (202:0-202:8) "\n\t\t\tthis" -(424:7-424:17) ".context =" --> (202:8-202:18) ".context =" -(424:17-426:2) " context; // If a component has string refs, we will assign a different object later.\n\n " --> (202:18-203:0) " context;" -(426:2-426:7) " this" --> (203:0-203:8) "\n\t\t\tthis" -(426:7-426:14) ".refs =" --> (203:8-203:15) ".refs =" -(426:14-427:2) " emptyObject;\n " --> (203:15-204:0) " emptyObject;" -(427:2-427:7) " this" --> (204:0-204:8) "\n\t\t\tthis" -(427:7-427:17) ".updater =" --> (204:8-204:18) ".updater =" -(427:17-427:28) " updater ||" --> (204:18-204:29) " updater ||" -(427:28-428:1) " ReactNoopUpdateQueue;\n" --> (204:29-205:2) " ReactNoopUpdateQueue;\n\t" -(428:1-430:0) "}\n" --> (205:2-206:2) "\t}\n\t" -(430:0-430:4) "\nvar" --> (206:2-206:6) "\tvar" -(430:4-430:29) " pureComponentPrototype =" --> (206:6-206:31) " pureComponentPrototype =" -(430:29-430:43) " PureComponent" --> (206:31-206:45) " PureComponent" -(430:43-430:55) ".prototype =" --> (206:45-206:57) ".prototype =" -(430:55-430:59) " new" --> (206:57-206:61) " new" -(430:59-431:0) " ComponentDummy();" --> (206:61-207:0) " ComponentDummy();" -(431:0-431:23) "\npureComponentPrototype" --> (207:0-207:25) "\n\t\tpureComponentPrototype" -(431:23-431:37) ".constructor =" --> (207:25-207:39) ".constructor =" -(431:37-433:0) " PureComponent; // Avoid an extra prototype jump for these methods.\n" --> (207:39-208:0) " PureComponent;" -(433:0-433:8) "\n_assign" --> (208:0-208:10) "\n\t\t_assign" -(433:8-433:32) "(pureComponentPrototype," --> (208:10-208:34) "(pureComponentPrototype," -(433:32-433:42) " Component" --> (208:34-208:44) " Component" -(433:42-433:52) ".prototype" --> (208:44-208:54) ".prototype" -(433:52-435:0) ");\n" --> (208:54-209:0) ");" -(435:0-435:23) "\npureComponentPrototype" --> (209:0-209:25) "\n\t\tpureComponentPrototype" -(435:23-435:46) ".isPureReactComponent =" --> (209:25-209:48) ".isPureReactComponent =" -(435:46-438:0) " true;\n\n// an immutable object with a single mutable value" --> (209:48-210:2) " true;\n\t" -(438:0-438:9) "\nfunction" --> (210:2-210:11) "\tfunction" -(438:9-438:21) " createRef()" --> (210:11-210:23) " createRef()" -(438:21-439:2) " {\n " --> (210:23-211:3) " {\n\t\t" -(439:2-439:6) " var" --> (211:3-211:7) "\tvar" -(439:6-439:18) " refObject =" --> (211:7-211:19) " refObject =" -(439:18-440:4) " {\n " --> (211:19-211:20) " " -(440:4-440:13) " current:" --> (211:20-211:29) "{current:" -(440:13-441:3) " null\n " --> (211:29-211:33) " nul" -(441:3-443:2) "};\n\n " --> (211:33-212:3) "l};\n\t\t" -(443:2-444:4) " {\n " --> (212:3-213:0) "\t{" -(444:4-444:11) " Object" --> (213:0-213:11) "\n\t\t\t\tObject" -(444:11-444:16) ".seal" --> (213:11-213:16) ".seal" -(444:16-444:26) "(refObject" --> (213:16-213:26) "(refObject" -(444:26-445:3) ");\n " --> (213:26-214:3) ");\n\t\t" -(445:3-447:2) "}\n\n " --> (214:3-215:0) "\t}" -(447:2-447:9) " return" --> (215:0-215:10) "\n\t\t\treturn" -(447:9-448:1) " refObject;\n" --> (215:10-216:2) " refObject;\n\t" -(448:1-450:0) "}\n" --> (216:2-217:2) "\t}\n\t" -(450:0-450:9) "\nfunction" --> (217:2-217:11) "\tfunction" -(450:9-450:24) " getWrappedName" --> (217:11-217:26) " getWrappedName" -(450:24-450:35) "(outerType," --> (217:26-217:37) "(outerType," -(450:35-450:46) " innerType," --> (217:37-217:48) " innerType," -(450:46-450:59) " wrapperName)" --> (217:48-217:61) " wrapperName)" -(450:59-451:2) " {\n " --> (217:61-218:3) " {\n\t\t" -(451:2-451:6) " var" --> (218:3-218:7) "\tvar" -(451:6-451:21) " functionName =" --> (218:7-218:22) " functionName =" -(451:21-451:31) " innerType" --> (218:22-218:32) " innerType" -(451:31-451:46) ".displayName ||" --> (218:32-218:47) ".displayName ||" -(451:46-451:56) " innerType" --> (218:47-218:57) " innerType" -(451:56-451:64) ".name ||" --> (218:57-218:65) ".name ||" -(451:64-452:2) " '';\n " --> (218:65-219:0) " '';" -(452:2-452:9) " return" --> (219:0-219:10) "\n\t\t\treturn" -(452:9-452:19) " outerType" --> (219:10-219:20) " outerType" -(452:19-452:35) ".displayName || " --> (219:20-219:36) ".displayName || " -(452:35-452:52) "(functionName !==" --> (219:36-219:53) "(functionName !==" -(452:52-452:57) " '' ?" --> (219:53-219:58) " '' ?" -(452:57-452:71) " wrapperName +" --> (219:58-219:72) " wrapperName +" -(452:71-452:77) " \"(\" +" --> (219:72-219:78) " '(' +" -(452:77-452:92) " functionName +" --> (219:78-219:93) " functionName +" -(452:92-452:98) " \")\" :" --> (219:93-219:99) " ')' :" -(452:98-453:1) " wrapperName);\n" --> (219:99-220:2) " wrapperName);\n\t" -(453:1-455:0) "}\n" --> (220:2-221:2) "\t}\n\t" -(455:0-455:9) "\nfunction" --> (221:2-221:11) "\tfunction" -(455:9-455:24) " getContextName" --> (221:11-221:26) " getContextName" -(455:24-455:30) "(type)" --> (221:26-221:32) "(type)" -(455:30-456:2) " {\n " --> (221:32-222:0) " {" -(456:2-456:9) " return" --> (222:0-222:10) "\n\t\t\treturn" -(456:9-456:14) " type" --> (222:10-222:15) " type" -(456:14-456:29) ".displayName ||" --> (222:15-222:30) ".displayName ||" -(456:29-457:1) " 'Context';\n" --> (222:30-223:2) " 'Context';\n\t" -(457:1-459:0) "}\n" --> (223:2-224:2) "\t}\n\t" -(459:0-459:9) "\nfunction" --> (224:2-224:11) "\tfunction" -(459:9-459:26) " getComponentName" --> (224:11-224:28) " getComponentName" -(459:26-459:32) "(type)" --> (224:28-224:34) "(type)" -(459:32-460:2) " {\n " --> (224:34-225:0) " {" -(460:2-460:6) " if " --> (225:0-225:7) "\n\t\t\tif " -(460:6-460:14) "(type ==" --> (225:7-225:15) "(type ==" -(460:14-460:20) " null)" --> (225:15-225:21) " null)" -(460:20-462:4) " {\n // Host root, text node or just invalid type.\n " --> (225:21-226:0) " {" -(462:4-462:11) " return" --> (226:0-226:11) "\n\t\t\t\treturn" -(462:11-463:3) " null;\n " --> (226:11-227:3) " null;\n\t\t" -(463:3-465:2) "}\n\n " --> (227:3-228:3) "\t}\n\t\t" -(465:2-466:4) " {\n " --> (228:3-229:0) "\t{" -(466:4-466:15) " if (typeof" --> (229:0-229:15) "\n\t\t\t\tif (typeof" -(466:15-466:20) " type" --> (229:15-229:20) " type" -(466:20-466:28) ".tag ===" --> (229:20-229:28) ".tag ===" -(466:28-466:38) " 'number')" --> (229:28-229:38) " 'number')" -(466:38-467:6) " {\n " --> (229:38-230:0) " {" -(467:6-467:12) " error" --> (230:0-230:11) "\n\t\t\t\t\terror" -(467:12-467:70) "('Received an unexpected object in getComponentName(). ' +" --> (230:11-230:69) "('Received an unexpected object in getComponentName(). ' +" -(467:70-467:125) " 'This is likely a bug in React. Please file an issue.'" --> (230:69-230:124) " 'This is likely a bug in React. Please file an issue.'" -(467:125-468:5) ");\n " --> (230:124-231:4) ");\n\t\t\t" -(468:5-469:3) "}\n " --> (231:4-232:3) "\t}\n\t\t" -(469:3-471:2) "}\n\n " --> (232:3-233:0) "\t}" -(471:2-471:13) " if (typeof" --> (233:0-233:14) "\n\t\t\tif (typeof" -(471:13-471:22) " type ===" --> (233:14-233:23) " type ===" -(471:22-471:34) " 'function')" --> (233:23-233:35) " 'function')" -(471:34-472:4) " {\n " --> (233:35-234:0) " {" -(472:4-472:11) " return" --> (234:0-234:11) "\n\t\t\t\treturn" -(472:11-472:16) " type" --> (234:11-234:16) " type" -(472:16-472:31) ".displayName ||" --> (234:16-234:31) ".displayName ||" -(472:31-472:36) " type" --> (234:31-234:36) " type" -(472:36-472:44) ".name ||" --> (234:36-234:44) ".name ||" -(472:44-473:3) " null;\n " --> (234:44-235:3) " null;\n\t\t" -(473:3-475:2) "}\n\n " --> (235:3-236:0) "\t}" -(475:2-475:13) " if (typeof" --> (236:0-236:14) "\n\t\t\tif (typeof" -(475:13-475:22) " type ===" --> (236:14-236:23) " type ===" -(475:22-475:32) " 'string')" --> (236:23-236:33) " 'string')" -(475:32-476:4) " {\n " --> (236:33-237:0) " {" -(476:4-476:11) " return" --> (237:0-237:11) "\n\t\t\t\treturn" -(476:11-477:3) " type;\n " --> (237:11-238:3) " type;\n\t\t" -(477:3-479:2) "}\n\n " --> (238:3-239:0) "\t}" -(479:2-479:10) " switch " --> (239:0-239:11) "\n\t\t\tswitch " -(479:10-479:2) " switch " --> (239:11-239:17) "(type)" -(479:2-480:4) " switch (type) {\n " --> (239:17-240:0) " {" -(480:4-480:9) " case" --> (240:0-240:9) "\n\t\t\t\tcase" -(480:9-480:17) " exports" --> (240:9-240:17) " exports" -(480:17-481:6) ".Fragment:\n " --> (240:17-240:26) ".Fragment" -(481:6-481:13) " return" --> (240:26-240:34) ": return" -(481:13-483:4) " 'Fragment';\n\n " --> (240:34-241:0) " 'Fragment';" -(483:4-483:9) " case" --> (241:0-241:9) "\n\t\t\t\tcase" -(483:9-484:6) " REACT_PORTAL_TYPE:\n " --> (241:9-241:27) " REACT_PORTAL_TYPE" -(484:6-484:13) " return" --> (241:27-241:35) ": return" -(484:13-486:4) " 'Portal';\n\n " --> (241:35-242:0) " 'Portal';" -(486:4-486:9) " case" --> (242:0-242:9) "\n\t\t\t\tcase" -(486:9-486:17) " exports" --> (242:9-242:17) " exports" -(486:17-487:6) ".Profiler:\n " --> (242:17-242:26) ".Profiler" -(487:6-487:13) " return" --> (242:26-242:34) ": return" -(487:13-489:4) " 'Profiler';\n\n " --> (242:34-243:0) " 'Profiler';" -(489:4-489:9) " case" --> (243:0-243:9) "\n\t\t\t\tcase" -(489:9-489:17) " exports" --> (243:9-243:17) " exports" -(489:17-490:6) ".StrictMode:\n " --> (243:17-243:28) ".StrictMode" -(490:6-490:13) " return" --> (243:28-243:36) ": return" -(490:13-492:4) " 'StrictMode';\n\n " --> (243:36-244:0) " 'StrictMode';" -(492:4-492:9) " case" --> (244:0-244:9) "\n\t\t\t\tcase" -(492:9-492:17) " exports" --> (244:9-244:17) " exports" -(492:17-493:6) ".Suspense:\n " --> (244:17-244:26) ".Suspense" -(493:6-493:13) " return" --> (244:26-244:34) ": return" -(493:13-495:4) " 'Suspense';\n\n " --> (244:34-245:0) " 'Suspense';" -(495:4-495:9) " case" --> (245:0-245:9) "\n\t\t\t\tcase" -(495:9-496:6) " REACT_SUSPENSE_LIST_TYPE:\n " --> (245:9-245:34) " REACT_SUSPENSE_LIST_TYPE" -(496:6-496:13) " return" --> (245:34-245:42) ": return" -(496:13-497:3) " 'SuspenseList';\n " --> (245:42-246:3) " 'SuspenseList';\n\t\t" -(497:3-499:2) "}\n\n " --> (246:3-247:0) "\t}" -(499:2-499:13) " if (typeof" --> (247:0-247:14) "\n\t\t\tif (typeof" -(499:13-499:22) " type ===" --> (247:14-247:23) " type ===" -(499:22-499:32) " 'object')" --> (247:23-247:33) " 'object')" -(499:32-500:4) " {\n " --> (247:33-248:0) " {" -(500:4-500:12) " switch " --> (248:0-248:12) "\n\t\t\t\tswitch " -(500:12-500:17) "(type" --> (248:12-248:17) "(type" -(500:17-500:4) " switch (type" --> (248:17-248:27) ".$$typeof)" -(500:4-501:6) " switch (type.$$typeof) {\n " --> (248:27-249:0) " {" -(501:6-501:11) " case" --> (249:0-249:10) "\n\t\t\t\t\tcase" -(501:11-502:8) " REACT_CONTEXT_TYPE:\n " --> (249:10-250:6) " REACT_CONTEXT_TYPE:\n\t\t\t\t\t" -(502:8-502:12) " var" --> (250:6-250:10) "\tvar" -(502:12-502:22) " context =" --> (250:10-250:20) " context =" -(502:22-503:8) " type;\n " --> (250:20-251:0) " type;" -(503:8-503:15) " return" --> (251:0-251:13) "\n\t\t\t\t\t\treturn" -(503:15-503:30) " getContextName" --> (251:13-251:28) " getContextName" -(503:30-503:38) "(context" --> (251:28-251:36) "(context" -(503:38-503:41) ") +" --> (251:36-251:39) ") +" -(503:41-505:6) " '.Consumer';\n\n " --> (251:39-252:0) " '.Consumer';" -(505:6-505:11) " case" --> (252:0-252:10) "\n\t\t\t\t\tcase" -(505:11-506:8) " REACT_PROVIDER_TYPE:\n " --> (252:10-253:6) " REACT_PROVIDER_TYPE:\n\t\t\t\t\t" -(506:8-506:12) " var" --> (253:6-253:10) "\tvar" -(506:12-506:23) " provider =" --> (253:10-253:21) " provider =" -(506:23-507:8) " type;\n " --> (253:21-254:0) " type;" -(507:8-507:15) " return" --> (254:0-254:13) "\n\t\t\t\t\t\treturn" -(507:15-507:30) " getContextName" --> (254:13-254:28) " getContextName" -(507:30-507:39) "(provider" --> (254:28-254:37) "(provider" -(507:39-507:48) "._context" --> (254:37-254:46) "._context" -(507:48-507:51) ") +" --> (254:46-254:49) ") +" -(507:51-509:6) " '.Provider';\n\n " --> (254:49-255:0) " '.Provider';" -(509:6-509:11) " case" --> (255:0-255:10) "\n\t\t\t\t\tcase" -(509:11-510:8) " REACT_FORWARD_REF_TYPE:\n " --> (255:10-255:33) " REACT_FORWARD_REF_TYPE" -(510:8-510:15) " return" --> (255:33-255:41) ": return" -(510:15-510:30) " getWrappedName" --> (255:41-255:56) " getWrappedName" -(510:30-510:36) "(type," --> (255:56-255:62) "(type," -(510:36-510:41) " type" --> (255:62-255:67) " type" -(510:41-510:49) ".render," --> (255:67-255:75) ".render," -(510:49-510:62) " 'ForwardRef'" --> (255:75-255:88) " 'ForwardRef'" -(510:62-512:6) ");\n\n " --> (255:88-256:0) ");" -(512:6-512:11) " case" --> (256:0-256:10) "\n\t\t\t\t\tcase" -(512:11-513:8) " REACT_MEMO_TYPE:\n " --> (256:10-256:26) " REACT_MEMO_TYPE" -(513:8-513:15) " return" --> (256:26-256:34) ": return" -(513:15-513:32) " getComponentName" --> (256:34-256:51) " getComponentName" -(513:32-513:37) "(type" --> (256:51-256:56) "(type" -(513:37-513:42) ".type" --> (256:56-256:61) ".type" -(513:42-515:6) ");\n\n " --> (256:61-257:0) ");" -(515:6-515:11) " case" --> (257:0-257:10) "\n\t\t\t\t\tcase" -(515:11-516:8) " REACT_BLOCK_TYPE:\n " --> (257:10-257:27) " REACT_BLOCK_TYPE" -(516:8-516:15) " return" --> (257:27-257:35) ": return" -(516:15-516:32) " getComponentName" --> (257:35-257:52) " getComponentName" -(516:32-516:37) "(type" --> (257:52-257:57) "(type" -(516:37-516:45) "._render" --> (257:57-257:65) "._render" -(516:45-518:6) ");\n\n " --> (257:65-258:0) ");" -(518:6-518:11) " case" --> (258:0-258:10) "\n\t\t\t\t\tcase" -(518:11-519:8) " REACT_LAZY_TYPE:\n " --> (258:10-258:27) " REACT_LAZY_TYPE:" -(519:8-520:10) " {\n " --> (258:27-259:6) " {\n\t\t\t\t\t" -(520:10-520:14) " var" --> (259:6-259:10) "\tvar" -(520:14-520:30) " lazyComponent =" --> (259:10-259:26) " lazyComponent =" -(520:30-521:10) " type;\n " --> (259:26-260:6) " type;\n\t\t\t\t\t" -(521:10-521:14) " var" --> (260:6-260:10) "\tvar" -(521:14-521:24) " payload =" --> (260:10-260:20) " payload =" -(521:24-521:38) " lazyComponent" --> (260:20-260:34) " lazyComponent" -(521:38-522:10) "._payload;\n " --> (260:34-261:6) "._payload;\n\t\t\t\t\t" -(522:10-522:14) " var" --> (261:6-261:10) "\tvar" -(522:14-522:21) " init =" --> (261:10-261:17) " init =" -(522:21-522:35) " lazyComponent" --> (261:17-261:31) " lazyComponent" -(522:35-524:10) "._init;\n\n " --> (261:31-262:0) "._init;" -(524:10-524:14) " try" --> (262:0-262:10) "\n\t\t\t\t\t\ttry" -(524:14-525:12) " {\n " --> (262:10-263:0) " {" -(525:12-525:19) " return" --> (263:0-263:14) "\n\t\t\t\t\t\t\treturn" -(525:19-525:36) " getComponentName" --> (263:14-263:31) " getComponentName" -(525:36-525:41) "(init" --> (263:31-263:36) "(init" -(525:41-525:49) "(payload" --> (263:36-263:44) "(payload" -(525:49-525:50) ")" --> (263:44-263:45) ")" -(525:50-526:11) ");\n " --> (263:45-264:6) ");\n\t\t\t\t\t" -(526:11-526:19) "} catch " --> (264:6-264:15) "\t} catch " -(526:19-526:22) "(x)" --> (264:15-264:18) "(x)" -(526:22-527:12) " {\n " --> (264:18-265:0) " {" -(527:12-527:19) " return" --> (265:0-265:14) "\n\t\t\t\t\t\t\treturn" -(527:19-528:11) " null;\n " --> (265:14-266:6) " null;\n\t\t\t\t\t" -(528:11-529:9) "}\n " --> (266:6-267:5) "\t}\n\t\t\t\t" -(529:9-530:5) "}\n " --> (267:5-268:4) "\t}\n\t\t\t" -(530:5-531:3) "}\n " --> (268:4-269:3) "\t}\n\t\t" -(531:3-533:2) "}\n\n " --> (269:3-270:0) "\t}" -(533:2-533:9) " return" --> (270:0-270:10) "\n\t\t\treturn" -(533:9-534:1) " null;\n" --> (270:10-271:2) " null;\n\t" -(534:1-536:0) "}\n" --> (271:2-272:2) "\t}\n\t" -(536:0-536:4) "\nvar" --> (272:2-272:6) "\tvar" -(536:4-536:21) " hasOwnProperty =" --> (272:6-272:23) " hasOwnProperty =" -(536:21-536:28) " Object" --> (272:23-272:30) " Object" -(536:28-536:38) ".prototype" --> (272:30-272:40) ".prototype" -(536:38-537:0) ".hasOwnProperty;" --> (272:40-273:2) ".hasOwnProperty;\n\t" -(537:0-537:4) "\nvar" --> (273:2-273:6) "\tvar" -(537:4-537:21) " RESERVED_PROPS =" --> (273:6-273:23) " RESERVED_PROPS =" -(537:21-538:2) " {\n " --> (273:23-274:3) " {\n\t\t" -(538:2-538:7) " key:" --> (274:3-274:8) "\tkey:" -(538:7-539:2) " true,\n " --> (274:8-275:3) " true,\n\t\t" -(539:2-539:7) " ref:" --> (275:3-275:8) "\tref:" -(539:7-540:2) " true,\n " --> (275:8-276:3) " true,\n\t\t" -(540:2-540:10) " __self:" --> (276:3-276:11) "\t__self:" -(540:10-541:2) " true,\n " --> (276:11-277:3) " true,\n\t\t" -(541:2-541:12) " __source:" --> (277:3-277:13) "\t__source:" -(541:12-542:1) " true\n" --> (277:13-278:2) " true\n\t" -(542:1-543:0) "};" --> (278:2-279:2) "\t};\n\t" -(543:0-543:4) "\nvar" --> (279:2-279:6) "\tvar" -(543:4-543:32) " specialPropKeyWarningShown," --> (279:6-279:34) " specialPropKeyWarningShown," -(543:32-543:60) " specialPropRefWarningShown," --> (279:34-279:62) " specialPropRefWarningShown," -(543:60-545:0) " didWarnAboutStringRefs;\n" --> (279:62-280:2) " didWarnAboutStringRefs;\n\t" -(545:0-546:2) "\n{\n " --> (280:2-281:0) "\t{" -(546:2-546:27) " didWarnAboutStringRefs =" --> (281:0-281:28) "\n\t\t\tdidWarnAboutStringRefs =" -(546:27-546:29) " {" --> (281:28-281:29) " " -(546:29-547:1) "};\n" --> (281:29-282:2) "{};\n\t" -(547:1-549:0) "}\n" --> (282:2-283:2) "\t}\n\t" -(549:0-549:9) "\nfunction" --> (283:2-283:11) "\tfunction" -(549:9-549:21) " hasValidRef" --> (283:11-283:23) " hasValidRef" -(549:21-549:29) "(config)" --> (283:23-283:31) "(config)" -(549:29-550:2) " {\n " --> (283:31-284:3) " {\n\t\t" -(550:2-551:4) " {\n " --> (284:3-285:0) "\t{" -(551:4-551:8) " if " --> (285:0-285:8) "\n\t\t\t\tif " -(551:8-551:23) "(hasOwnProperty" --> (285:8-285:23) "(hasOwnProperty" -(551:23-551:28) ".call" --> (285:23-285:28) ".call" -(551:28-551:36) "(config," --> (285:28-285:36) "(config," -(551:36-551:42) " 'ref'" --> (285:36-285:42) " 'ref'" -(551:42-551:44) "))" --> (285:42-285:44) "))" -(551:44-552:6) " {\n " --> (285:44-286:5) " {\n\t\t\t\t" -(552:6-552:10) " var" --> (286:5-286:9) "\tvar" -(552:10-552:19) " getter =" --> (286:9-286:18) " getter =" -(552:19-552:26) " Object" --> (286:18-286:25) " Object" -(552:26-552:51) ".getOwnPropertyDescriptor" --> (286:25-286:50) ".getOwnPropertyDescriptor" -(552:51-552:59) "(config," --> (286:50-286:58) "(config," -(552:59-552:65) " 'ref'" --> (286:58-286:64) " 'ref'" -(552:65-552:66) ")" --> (286:64-286:65) ")" -(552:66-554:6) ".get;\n\n " --> (286:65-287:0) ".get;" -(554:6-554:10) " if " --> (287:0-287:9) "\n\t\t\t\t\tif " -(554:10-554:20) "(getter &&" --> (287:9-287:19) "(getter &&" -(554:20-554:27) " getter" --> (287:19-287:26) " getter" -(554:27-554:43) ".isReactWarning)" --> (287:26-287:42) ".isReactWarning)" -(554:43-555:8) " {\n " --> (287:42-288:0) " {" -(555:8-555:15) " return" --> (288:0-288:13) "\n\t\t\t\t\t\treturn" -(555:15-556:7) " false;\n " --> (288:13-289:5) " false;\n\t\t\t\t" -(556:7-557:5) "}\n " --> (289:5-290:4) "\t}\n\t\t\t" -(557:5-558:3) "}\n " --> (290:4-291:3) "\t}\n\t\t" -(558:3-560:2) "}\n\n " --> (291:3-292:0) "\t}" -(560:2-560:9) " return" --> (292:0-292:10) "\n\t\t\treturn" -(560:9-560:16) " config" --> (292:10-292:17) " config" -(560:16-560:24) ".ref !==" --> (292:17-292:25) ".ref !==" -(560:24-561:1) " undefined;\n" --> (292:25-293:2) " undefined;\n\t" -(561:1-563:0) "}\n" --> (293:2-294:2) "\t}\n\t" -(563:0-563:9) "\nfunction" --> (294:2-294:11) "\tfunction" -(563:9-563:21) " hasValidKey" --> (294:11-294:23) " hasValidKey" -(563:21-563:29) "(config)" --> (294:23-294:31) "(config)" -(563:29-564:2) " {\n " --> (294:31-295:3) " {\n\t\t" -(564:2-565:4) " {\n " --> (295:3-296:0) "\t{" -(565:4-565:8) " if " --> (296:0-296:8) "\n\t\t\t\tif " -(565:8-565:23) "(hasOwnProperty" --> (296:8-296:23) "(hasOwnProperty" -(565:23-565:28) ".call" --> (296:23-296:28) ".call" -(565:28-565:36) "(config," --> (296:28-296:36) "(config," -(565:36-565:42) " 'key'" --> (296:36-296:42) " 'key'" -(565:42-565:44) "))" --> (296:42-296:44) "))" -(565:44-566:6) " {\n " --> (296:44-297:5) " {\n\t\t\t\t" -(566:6-566:10) " var" --> (297:5-297:9) "\tvar" -(566:10-566:19) " getter =" --> (297:9-297:18) " getter =" -(566:19-566:26) " Object" --> (297:18-297:25) " Object" -(566:26-566:51) ".getOwnPropertyDescriptor" --> (297:25-297:50) ".getOwnPropertyDescriptor" -(566:51-566:59) "(config," --> (297:50-297:58) "(config," -(566:59-566:65) " 'key'" --> (297:58-297:64) " 'key'" -(566:65-566:66) ")" --> (297:64-297:65) ")" -(566:66-568:6) ".get;\n\n " --> (297:65-298:0) ".get;" -(568:6-568:10) " if " --> (298:0-298:9) "\n\t\t\t\t\tif " -(568:10-568:20) "(getter &&" --> (298:9-298:19) "(getter &&" -(568:20-568:27) " getter" --> (298:19-298:26) " getter" -(568:27-568:43) ".isReactWarning)" --> (298:26-298:42) ".isReactWarning)" -(568:43-569:8) " {\n " --> (298:42-299:0) " {" -(569:8-569:15) " return" --> (299:0-299:13) "\n\t\t\t\t\t\treturn" -(569:15-570:7) " false;\n " --> (299:13-300:5) " false;\n\t\t\t\t" -(570:7-571:5) "}\n " --> (300:5-301:4) "\t}\n\t\t\t" -(571:5-572:3) "}\n " --> (301:4-302:3) "\t}\n\t\t" -(572:3-574:2) "}\n\n " --> (302:3-303:0) "\t}" -(574:2-574:9) " return" --> (303:0-303:10) "\n\t\t\treturn" -(574:9-574:16) " config" --> (303:10-303:17) " config" -(574:16-574:24) ".key !==" --> (303:17-303:25) ".key !==" -(574:24-575:1) " undefined;\n" --> (303:25-304:2) " undefined;\n\t" -(575:1-577:0) "}\n" --> (304:2-305:2) "\t}\n\t" -(577:0-577:9) "\nfunction" --> (305:2-305:11) "\tfunction" -(577:9-577:36) " defineKeyPropWarningGetter" --> (305:11-305:38) " defineKeyPropWarningGetter" -(577:36-577:43) "(props," --> (305:38-305:45) "(props," -(577:43-577:56) " displayName)" --> (305:45-305:58) " displayName)" -(577:56-578:2) " {\n " --> (305:58-306:3) " {\n\t\t" -(578:2-578:6) " var" --> (306:3-306:7) "\tvar" -(578:6-578:30) " warnAboutAccessingKey =" --> (306:7-306:31) " warnAboutAccessingKey =" -(578:30-578:42) " function ()" --> (306:31-306:42) " function()" -(578:42-579:4) " {\n " --> (306:42-307:4) " {\n\t\t\t" -(579:4-580:6) " {\n " --> (307:4-308:0) "\t{" -(580:6-580:11) " if (" --> (308:0-308:10) "\n\t\t\t\t\tif (" -(580:11-580:39) "!specialPropKeyWarningShown)" --> (308:10-308:38) "!specialPropKeyWarningShown)" -(580:39-581:8) " {\n " --> (308:38-309:0) " {" -(581:8-581:37) " specialPropKeyWarningShown =" --> (309:0-309:35) "\n\t\t\t\t\t\tspecialPropKeyWarningShown =" -(581:37-583:8) " true;\n\n " --> (309:35-310:0) " true;" -(583:8-583:14) " error" --> (310:0-310:12) "\n\t\t\t\t\t\terror" -(583:14-583:76) "('%s: `key` is not a prop. Trying to access it will result ' +" --> (310:12-310:74) "('%s: `key` is not a prop. Trying to access it will result ' +" -(583:76-583:143) " 'in `undefined` being returned. If you need to access the same ' +" --> (310:74-310:141) " 'in `undefined` being returned. If you need to access the same ' +" -(583:143-583:216) " 'value within the child component, you should pass it as a different ' +" --> (310:141-310:214) " 'value within the child component, you should pass it as a different ' +" -(583:216-583:266) " 'prop. (https://reactjs.org/link/special-props)'," --> (310:214-310:264) " 'prop. (https://reactjs.org/link/special-props)'," -(583:266-583:278) " displayName" --> (310:264-310:276) " displayName" -(583:278-584:7) ");\n " --> (310:276-311:5) ");\n\t\t\t\t" -(584:7-585:5) "}\n " --> (311:5-312:4) "\t}\n\t\t\t" -(585:5-586:3) "}\n " --> (312:4-313:3) "\t}\n\t\t" -(586:3-588:2) "};\n\n " --> (313:3-314:0) "\t};" -(588:2-588:24) " warnAboutAccessingKey" --> (314:0-314:25) "\n\t\t\twarnAboutAccessingKey" -(588:24-588:41) ".isReactWarning =" --> (314:25-314:42) ".isReactWarning =" -(588:41-589:2) " true;\n " --> (314:42-315:0) " true;" -(589:2-589:9) " Object" --> (315:0-315:10) "\n\t\t\tObject" -(589:9-589:24) ".defineProperty" --> (315:10-315:25) ".defineProperty" -(589:24-589:31) "(props," --> (315:25-315:32) "(props," -(589:31-589:38) " 'key'," --> (315:32-315:39) " 'key'," -(589:38-590:4) " {\n " --> (315:39-316:4) " {\n\t\t\t" -(590:4-590:9) " get:" --> (316:4-316:9) "\tget:" -(590:9-591:4) " warnAboutAccessingKey,\n " --> (316:9-317:4) " warnAboutAccessingKey,\n\t\t\t" -(591:4-591:18) " configurable:" --> (317:4-317:18) "\tconfigurable:" -(591:18-592:3) " true\n " --> (317:18-318:3) " true\n\t\t" -(592:3-592:4) "}" --> (318:3-318:5) "\t}" -(592:4-593:1) ");\n" --> (318:5-319:2) ");\n\t" -(593:1-595:0) "}\n" --> (319:2-320:2) "\t}\n\t" -(595:0-595:9) "\nfunction" --> (320:2-320:11) "\tfunction" -(595:9-595:36) " defineRefPropWarningGetter" --> (320:11-320:38) " defineRefPropWarningGetter" -(595:36-595:43) "(props," --> (320:38-320:45) "(props," -(595:43-595:56) " displayName)" --> (320:45-320:58) " displayName)" -(595:56-596:2) " {\n " --> (320:58-321:3) " {\n\t\t" -(596:2-596:6) " var" --> (321:3-321:7) "\tvar" -(596:6-596:30) " warnAboutAccessingRef =" --> (321:7-321:31) " warnAboutAccessingRef =" -(596:30-596:42) " function ()" --> (321:31-321:42) " function()" -(596:42-597:4) " {\n " --> (321:42-322:4) " {\n\t\t\t" -(597:4-598:6) " {\n " --> (322:4-323:0) "\t{" -(598:6-598:11) " if (" --> (323:0-323:10) "\n\t\t\t\t\tif (" -(598:11-598:39) "!specialPropRefWarningShown)" --> (323:10-323:38) "!specialPropRefWarningShown)" -(598:39-599:8) " {\n " --> (323:38-324:0) " {" -(599:8-599:37) " specialPropRefWarningShown =" --> (324:0-324:35) "\n\t\t\t\t\t\tspecialPropRefWarningShown =" -(599:37-601:8) " true;\n\n " --> (324:35-325:0) " true;" -(601:8-601:14) " error" --> (325:0-325:12) "\n\t\t\t\t\t\terror" -(601:14-601:76) "('%s: `ref` is not a prop. Trying to access it will result ' +" --> (325:12-325:74) "('%s: `ref` is not a prop. Trying to access it will result ' +" -(601:76-601:143) " 'in `undefined` being returned. If you need to access the same ' +" --> (325:74-325:141) " 'in `undefined` being returned. If you need to access the same ' +" -(601:143-601:216) " 'value within the child component, you should pass it as a different ' +" --> (325:141-325:214) " 'value within the child component, you should pass it as a different ' +" -(601:216-601:266) " 'prop. (https://reactjs.org/link/special-props)'," --> (325:214-325:264) " 'prop. (https://reactjs.org/link/special-props)'," -(601:266-601:278) " displayName" --> (325:264-325:276) " displayName" -(601:278-602:7) ");\n " --> (325:276-326:5) ");\n\t\t\t\t" -(602:7-603:5) "}\n " --> (326:5-327:4) "\t}\n\t\t\t" -(603:5-604:3) "}\n " --> (327:4-328:3) "\t}\n\t\t" -(604:3-606:2) "};\n\n " --> (328:3-329:0) "\t};" -(606:2-606:24) " warnAboutAccessingRef" --> (329:0-329:25) "\n\t\t\twarnAboutAccessingRef" -(606:24-606:41) ".isReactWarning =" --> (329:25-329:42) ".isReactWarning =" -(606:41-607:2) " true;\n " --> (329:42-330:0) " true;" -(607:2-607:9) " Object" --> (330:0-330:10) "\n\t\t\tObject" -(607:9-607:24) ".defineProperty" --> (330:10-330:25) ".defineProperty" -(607:24-607:31) "(props," --> (330:25-330:32) "(props," -(607:31-607:38) " 'ref'," --> (330:32-330:39) " 'ref'," -(607:38-608:4) " {\n " --> (330:39-331:4) " {\n\t\t\t" -(608:4-608:9) " get:" --> (331:4-331:9) "\tget:" -(608:9-609:4) " warnAboutAccessingRef,\n " --> (331:9-332:4) " warnAboutAccessingRef,\n\t\t\t" -(609:4-609:18) " configurable:" --> (332:4-332:18) "\tconfigurable:" -(609:18-610:3) " true\n " --> (332:18-333:3) " true\n\t\t" -(610:3-610:4) "}" --> (333:3-333:5) "\t}" -(610:4-611:1) ");\n" --> (333:5-334:2) ");\n\t" -(611:1-613:0) "}\n" --> (334:2-335:2) "\t}\n\t" -(613:0-613:9) "\nfunction" --> (335:2-335:11) "\tfunction" -(613:9-613:46) " warnIfStringRefCannotBeAutoConverted" --> (335:11-335:48) " warnIfStringRefCannotBeAutoConverted" -(613:46-613:54) "(config)" --> (335:48-335:56) "(config)" -(613:54-614:2) " {\n " --> (335:56-336:3) " {\n\t\t" -(614:2-615:4) " {\n " --> (336:3-337:0) "\t{" -(615:4-615:15) " if (typeof" --> (337:0-337:15) "\n\t\t\t\tif (typeof" -(615:15-615:22) " config" --> (337:15-337:22) " config" -(615:22-615:30) ".ref ===" --> (337:22-337:30) ".ref ===" -(615:30-615:42) " 'string' &&" --> (337:30-337:42) " 'string' &&" -(615:42-615:60) " ReactCurrentOwner" --> (337:42-337:60) " ReactCurrentOwner" -(615:60-615:71) ".current &&" --> (337:60-337:71) ".current &&" -(615:71-615:78) " config" --> (337:71-337:78) " config" -(615:78-615:88) ".__self &&" --> (337:78-337:88) ".__self &&" -(615:88-615:106) " ReactCurrentOwner" --> (337:88-337:106) " ReactCurrentOwner" -(615:106-615:114) ".current" --> (337:106-337:114) ".current" -(615:114-615:128) ".stateNode !==" --> (337:114-337:128) ".stateNode !==" -(615:128-615:135) " config" --> (337:128-337:135) " config" -(615:135-615:143) ".__self)" --> (337:135-337:143) ".__self)" -(615:143-616:6) " {\n " --> (337:143-338:5) " {\n\t\t\t\t" -(616:6-616:10) " var" --> (338:5-338:9) "\tvar" -(616:10-616:26) " componentName =" --> (338:9-338:25) " componentName =" -(616:26-616:43) " getComponentName" --> (338:25-338:42) " getComponentName" -(616:43-616:61) "(ReactCurrentOwner" --> (338:42-338:60) "(ReactCurrentOwner" -(616:61-616:69) ".current" --> (338:60-338:68) ".current" -(616:69-616:74) ".type" --> (338:68-338:73) ".type" -(616:74-618:6) ");\n\n " --> (338:73-339:0) ");" -(618:6-618:11) " if (" --> (339:0-339:10) "\n\t\t\t\t\tif (" -(618:11-618:34) "!didWarnAboutStringRefs" --> (339:10-339:33) "!didWarnAboutStringRefs" -(618:34-618:50) "[componentName])" --> (339:33-339:49) "[componentName])" -(618:50-619:8) " {\n " --> (339:49-340:0) " {" -(619:8-619:14) " error" --> (340:0-340:12) "\n\t\t\t\t\t\terror" -(619:14-619:64) "('Component \"%s\" contains the string ref \"%s\". ' +" --> (340:12-340:62) "('Component \"%s\" contains the string ref \"%s\". ' +" -(619:64-619:136) " 'Support for string refs will be removed in a future major release. ' +" --> (340:62-340:134) " 'Support for string refs will be removed in a future major release. ' +" -(619:136-619:207) " 'This case cannot be automatically converted to an arrow function. ' +" --> (340:134-340:205) " 'This case cannot be automatically converted to an arrow function. ' +" -(619:207-619:291) " 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +" --> (340:205-340:289) " 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +" -(619:291-619:337) " 'Learn more about using refs safely here: ' +" --> (340:289-340:335) " 'Learn more about using refs safely here: ' +" -(619:337-619:388) " 'https://reactjs.org/link/strict-mode-string-ref'," --> (340:335-340:386) " 'https://reactjs.org/link/strict-mode-string-ref'," -(619:388-619:403) " componentName," --> (340:386-340:401) " componentName," -(619:403-619:410) " config" --> (340:401-340:408) " config" -(619:410-619:414) ".ref" --> (340:408-340:412) ".ref" -(619:414-621:8) ");\n\n " --> (340:412-341:0) ");" -(621:8-621:31) " didWarnAboutStringRefs" --> (341:0-341:29) "\n\t\t\t\t\t\tdidWarnAboutStringRefs" -(621:31-621:48) "[componentName] =" --> (341:29-341:46) "[componentName] =" -(621:48-622:7) " true;\n " --> (341:46-342:5) " true;\n\t\t\t\t" -(622:7-623:5) "}\n " --> (342:5-343:4) "\t}\n\t\t\t" -(623:5-624:3) "}\n " --> (343:4-344:3) "\t}\n\t\t" -(624:3-625:1) "}\n" --> (344:3-345:2) "\t}\n\t" -(625:1-648:0) "}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n" --> (345:2-346:2) "\t}\n\t" -(648:0-648:4) "\nvar" --> (346:2-346:6) "\tvar" -(648:4-648:19) " ReactElement =" --> (346:6-346:21) " ReactElement =" -(648:19-648:29) " function " --> (346:21-346:30) " function" -(648:29-648:35) "(type," --> (346:30-346:36) "(type," -(648:35-648:40) " key," --> (346:36-346:41) " key," -(648:40-648:45) " ref," --> (346:41-346:46) " ref," -(648:45-648:51) " self," --> (346:46-346:52) " self," -(648:51-648:59) " source," --> (346:52-346:60) " source," -(648:59-648:66) " owner," --> (346:60-346:67) " owner," -(648:66-648:73) " props)" --> (346:67-346:74) " props)" -(648:73-649:2) " {\n " --> (346:74-347:3) " {\n\t\t" -(649:2-649:6) " var" --> (347:3-347:7) "\tvar" -(649:6-649:16) " element =" --> (347:7-347:17) " element =" -(649:16-651:4) " {\n // This tag allows us to uniquely identify this as a React Element\n " --> (347:17-348:4) " {\n\t\t\t" -(651:4-651:14) " $$typeof:" --> (348:4-348:14) "\t$$typeof:" -(651:14-653:4) " REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n " --> (348:14-349:4) " REACT_ELEMENT_TYPE,\n\t\t\t" -(653:4-653:10) " type:" --> (349:4-349:10) "\ttype:" -(653:10-654:4) " type,\n " --> (349:10-350:4) " type,\n\t\t\t" -(654:4-654:9) " key:" --> (350:4-350:9) "\tkey:" -(654:9-655:4) " key,\n " --> (350:9-351:4) " key,\n\t\t\t" -(655:4-655:9) " ref:" --> (351:4-351:9) "\tref:" -(655:9-656:4) " ref,\n " --> (351:9-352:4) " ref,\n\t\t\t" -(656:4-656:11) " props:" --> (352:4-352:11) "\tprops:" -(656:11-658:4) " props,\n // Record the component responsible for creating this element.\n " --> (352:11-353:4) " props,\n\t\t\t" -(658:4-658:12) " _owner:" --> (353:4-353:12) "\t_owner:" -(658:12-659:3) " owner\n " --> (353:12-354:3) " owner\n\t\t" -(659:3-661:2) "};\n\n " --> (354:3-355:3) "\t};\n\t\t" -(661:2-666:4) " {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n " --> (355:3-356:0) "\t{" -(666:4-666:12) " element" --> (356:0-356:12) "\n\t\t\t\telement" -(666:12-666:21) "._store =" --> (356:12-356:21) "._store =" -(666:21-666:23) " {" --> (356:21-356:22) " " -(666:23-671:4) "}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n " --> (356:22-357:0) "{};" -(671:4-671:11) " Object" --> (357:0-357:11) "\n\t\t\t\tObject" -(671:11-671:26) ".defineProperty" --> (357:11-357:26) ".defineProperty" -(671:26-671:34) "(element" --> (357:26-357:34) "(element" -(671:34-671:42) "._store," --> (357:34-357:42) "._store," -(671:42-671:55) " 'validated'," --> (357:42-357:55) " 'validated'," -(671:55-672:6) " {\n " --> (357:55-358:5) " {\n\t\t\t\t" -(672:6-672:20) " configurable:" --> (358:5-358:19) "\tconfigurable:" -(672:20-673:6) " false,\n " --> (358:19-359:5) " false,\n\t\t\t\t" -(673:6-673:18) " enumerable:" --> (359:5-359:17) "\tenumerable:" -(673:18-674:6) " false,\n " --> (359:17-360:5) " false,\n\t\t\t\t" -(674:6-674:16) " writable:" --> (360:5-360:15) "\twritable:" -(674:16-675:6) " true,\n " --> (360:15-361:5) " true,\n\t\t\t\t" -(675:6-675:13) " value:" --> (361:5-361:12) "\tvalue:" -(675:13-676:5) " false\n " --> (361:12-362:4) " false\n\t\t\t" -(676:5-676:6) "}" --> (362:4-362:6) "\t}" -(676:6-678:4) "); // self and source are DEV only properties.\n\n " --> (362:6-363:0) ");" -(678:4-678:11) " Object" --> (363:0-363:11) "\n\t\t\t\tObject" -(678:11-678:26) ".defineProperty" --> (363:11-363:26) ".defineProperty" -(678:26-678:35) "(element," --> (363:26-363:35) "(element," -(678:35-678:44) " '_self'," --> (363:35-363:44) " '_self'," -(678:44-679:6) " {\n " --> (363:44-364:5) " {\n\t\t\t\t" -(679:6-679:20) " configurable:" --> (364:5-364:19) "\tconfigurable:" -(679:20-680:6) " false,\n " --> (364:19-365:5) " false,\n\t\t\t\t" -(680:6-680:18) " enumerable:" --> (365:5-365:17) "\tenumerable:" -(680:18-681:6) " false,\n " --> (365:17-366:5) " false,\n\t\t\t\t" -(681:6-681:16) " writable:" --> (366:5-366:15) "\twritable:" -(681:16-682:6) " false,\n " --> (366:15-367:5) " false,\n\t\t\t\t" -(682:6-682:13) " value:" --> (367:5-367:12) "\tvalue:" -(682:13-683:5) " self\n " --> (367:12-368:4) " self\n\t\t\t" -(683:5-683:6) "}" --> (368:4-368:6) "\t}" -(683:6-686:4) "); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n " --> (368:6-369:0) ");" -(686:4-686:11) " Object" --> (369:0-369:11) "\n\t\t\t\tObject" -(686:11-686:26) ".defineProperty" --> (369:11-369:26) ".defineProperty" -(686:26-686:35) "(element," --> (369:26-369:35) "(element," -(686:35-686:46) " '_source'," --> (369:35-369:46) " '_source'," -(686:46-687:6) " {\n " --> (369:46-370:5) " {\n\t\t\t\t" -(687:6-687:20) " configurable:" --> (370:5-370:19) "\tconfigurable:" -(687:20-688:6) " false,\n " --> (370:19-371:5) " false,\n\t\t\t\t" -(688:6-688:18) " enumerable:" --> (371:5-371:17) "\tenumerable:" -(688:18-689:6) " false,\n " --> (371:17-372:5) " false,\n\t\t\t\t" -(689:6-689:16) " writable:" --> (372:5-372:15) "\twritable:" -(689:16-690:6) " false,\n " --> (372:15-373:5) " false,\n\t\t\t\t" -(690:6-690:13) " value:" --> (373:5-373:12) "\tvalue:" -(690:13-691:5) " source\n " --> (373:12-374:4) " source\n\t\t\t" -(691:5-691:6) "}" --> (374:4-374:6) "\t}" -(691:6-693:4) ");\n\n " --> (374:6-375:0) ");" -(693:4-693:8) " if " --> (375:0-375:8) "\n\t\t\t\tif " -(693:8-693:15) "(Object" --> (375:8-375:15) "(Object" -(693:15-693:23) ".freeze)" --> (375:15-375:23) ".freeze)" -(693:23-694:6) " {\n " --> (375:23-376:0) " {" -(694:6-694:13) " Object" --> (376:0-376:12) "\n\t\t\t\t\tObject" -(694:13-694:20) ".freeze" --> (376:12-376:19) ".freeze" -(694:20-694:28) "(element" --> (376:19-376:27) "(element" -(694:28-694:34) ".props" --> (376:27-376:33) ".props" -(694:34-695:6) ");\n " --> (376:33-377:0) ");" -(695:6-695:13) " Object" --> (377:0-377:12) "\n\t\t\t\t\tObject" -(695:13-695:20) ".freeze" --> (377:12-377:19) ".freeze" -(695:20-695:28) "(element" --> (377:19-377:27) "(element" -(695:28-696:5) ");\n " --> (377:27-378:4) ");\n\t\t\t" -(696:5-697:3) "}\n " --> (378:4-379:3) "\t}\n\t\t" -(697:3-699:2) "}\n\n " --> (379:3-380:0) "\t}" -(699:2-699:9) " return" --> (380:0-380:10) "\n\t\t\treturn" -(699:9-700:1) " element;\n" --> (380:10-381:2) " element;\n\t" -(700:1-706:0) "};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n" --> (381:2-382:2) "\t};\n\t" -(706:0-706:9) "\nfunction" --> (382:2-382:11) "\tfunction" -(706:9-706:23) " createElement" --> (382:11-382:25) " createElement" -(706:23-706:29) "(type," --> (382:25-382:31) "(type," -(706:29-706:37) " config," --> (382:31-382:39) " config," -(706:37-706:47) " children)" --> (382:39-382:49) " children)" -(706:47-707:2) " {\n " --> (382:49-383:3) " {\n\t\t" -(707:2-707:6) " var" --> (383:3-383:7) "\tvar" -(707:6-709:2) " propName; // Reserved names are extracted\n\n " --> (383:7-384:3) " propName;\n\t\t" -(709:2-709:6) " var" --> (384:3-384:7) "\tvar" -(709:6-709:14) " props =" --> (384:7-384:15) " props =" -(709:14-709:16) " {" --> (384:15-384:16) " " -(709:16-710:2) "};\n " --> (384:16-385:3) "{};\n\t\t" -(710:2-710:6) " var" --> (385:3-385:7) "\tvar" -(710:6-710:12) " key =" --> (385:7-385:13) " key =" -(710:12-711:2) " null;\n " --> (385:13-386:3) " null;\n\t\t" -(711:2-711:6) " var" --> (386:3-386:7) "\tvar" -(711:6-711:12) " ref =" --> (386:7-386:13) " ref =" -(711:12-712:2) " null;\n " --> (386:13-387:3) " null;\n\t\t" -(712:2-712:6) " var" --> (387:3-387:7) "\tvar" -(712:6-712:13) " self =" --> (387:7-387:14) " self =" -(712:13-713:2) " null;\n " --> (387:14-388:3) " null;\n\t\t" -(713:2-713:6) " var" --> (388:3-388:7) "\tvar" -(713:6-713:15) " source =" --> (388:7-388:16) " source =" -(713:15-715:2) " null;\n\n " --> (388:16-389:0) " null;" -(715:2-715:6) " if " --> (389:0-389:7) "\n\t\t\tif " -(715:6-715:16) "(config !=" --> (389:7-389:17) "(config !=" -(715:16-715:22) " null)" --> (389:17-389:23) " null)" -(715:22-716:4) " {\n " --> (389:23-390:0) " {" -(716:4-716:8) " if " --> (390:0-390:8) "\n\t\t\t\tif " -(716:8-716:20) "(hasValidRef" --> (390:8-390:20) "(hasValidRef" -(716:20-716:27) "(config" --> (390:20-390:27) "(config" -(716:27-716:29) "))" --> (390:27-390:29) "))" -(716:29-717:6) " {\n " --> (390:29-391:0) " {" -(717:6-717:12) " ref =" --> (391:0-391:11) "\n\t\t\t\t\tref =" -(717:12-717:19) " config" --> (391:11-391:18) " config" -(717:19-719:6) ".ref;\n\n " --> (391:18-392:5) ".ref;\n\t\t\t\t" -(719:6-720:8) " {\n " --> (392:5-393:0) "\t{" -(720:8-720:45) " warnIfStringRefCannotBeAutoConverted" --> (393:0-393:43) "\n\t\t\t\t\t\twarnIfStringRefCannotBeAutoConverted" -(720:45-720:52) "(config" --> (393:43-393:50) "(config" -(720:52-721:7) ");\n " --> (393:50-394:5) ");\n\t\t\t\t" -(721:7-722:5) "}\n " --> (394:5-395:4) "\t}\n\t\t\t" -(722:5-724:4) "}\n\n " --> (395:4-396:0) "\t}" -(724:4-724:8) " if " --> (396:0-396:8) "\n\t\t\t\tif " -(724:8-724:20) "(hasValidKey" --> (396:8-396:20) "(hasValidKey" -(724:20-724:27) "(config" --> (396:20-396:27) "(config" -(724:27-724:29) "))" --> (396:27-396:29) "))" -(724:29-725:6) " {\n " --> (396:29-397:0) " {" -(725:6-725:12) " key =" --> (397:0-397:11) "\n\t\t\t\t\tkey =" -(725:12-725:17) " '' +" --> (397:11-397:16) " '' +" -(725:17-725:24) " config" --> (397:16-397:23) " config" -(725:24-726:5) ".key;\n " --> (397:23-398:4) ".key;\n\t\t\t" -(726:5-728:4) "}\n\n " --> (398:4-399:0) "\t}" -(728:4-728:11) " self =" --> (399:0-399:11) "\n\t\t\t\tself =" -(728:11-728:18) " config" --> (399:11-399:18) " config" -(728:18-728:29) ".__self ===" --> (399:18-399:29) ".__self ===" -(728:29-728:41) " undefined ?" --> (399:29-399:41) " undefined ?" -(728:41-728:48) " null :" --> (399:41-399:48) " null :" -(728:48-728:55) " config" --> (399:48-399:55) " config" -(728:55-729:4) ".__self;\n " --> (399:55-400:0) ".__self;" -(729:4-729:13) " source =" --> (400:0-400:13) "\n\t\t\t\tsource =" -(729:13-729:20) " config" --> (400:13-400:20) " config" -(729:20-729:33) ".__source ===" --> (400:20-400:33) ".__source ===" -(729:33-729:45) " undefined ?" --> (400:33-400:45) " undefined ?" -(729:45-729:52) " null :" --> (400:45-400:52) " null :" -(729:52-729:59) " config" --> (400:52-400:59) " config" -(729:59-731:4) ".__source; // Remaining properties are added to a new props object\n\n " --> (400:59-401:0) ".__source;" -(731:4-731:9) " for " --> (401:0-401:9) "\n\t\t\t\tfor " -(731:9-731:21) "(propName in" --> (401:9-401:21) "(propName in" -(731:21-731:29) " config)" --> (401:21-401:29) " config)" -(731:29-732:6) " {\n " --> (401:29-402:0) " {" -(732:6-732:10) " if " --> (402:0-402:9) "\n\t\t\t\t\tif " -(732:10-732:25) "(hasOwnProperty" --> (402:9-402:24) "(hasOwnProperty" -(732:25-732:30) ".call" --> (402:24-402:29) ".call" -(732:30-732:38) "(config," --> (402:29-402:37) "(config," -(732:38-732:47) " propName" --> (402:37-402:46) " propName" -(732:47-732:52) ") && " --> (402:46-402:51) ") && " -(732:52-732:67) "!RESERVED_PROPS" --> (402:51-402:66) "!RESERVED_PROPS" -(732:67-732:82) ".hasOwnProperty" --> (402:66-402:81) ".hasOwnProperty" -(732:82-732:91) "(propName" --> (402:81-402:90) "(propName" -(732:91-732:93) "))" --> (402:90-402:92) "))" -(732:93-733:8) " {\n " --> (402:92-403:0) " {" -(733:8-733:14) " props" --> (403:0-403:12) "\n\t\t\t\t\t\tprops" -(733:14-733:26) "[propName] =" --> (403:12-403:24) "[propName] =" -(733:26-733:33) " config" --> (403:24-403:31) " config" -(733:33-734:7) "[propName];\n " --> (403:31-404:5) "[propName];\n\t\t\t\t" -(734:7-735:5) "}\n " --> (404:5-405:4) "\t}\n\t\t\t" -(735:5-736:3) "}\n " --> (405:4-406:3) "\t}\n\t\t" -(736:3-740:2) "} // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n " --> (406:3-407:3) "\t}\n\t\t" -(740:2-740:6) " var" --> (407:3-407:7) "\tvar" -(740:6-740:23) " childrenLength =" --> (407:7-407:24) " childrenLength =" -(740:23-740:33) " arguments" --> (407:24-407:34) " arguments" -(740:33-740:42) ".length -" --> (407:34-407:43) ".length -" -(740:42-742:2) " 2;\n\n " --> (407:43-408:0) " 2;" -(742:2-742:6) " if " --> (408:0-408:7) "\n\t\t\tif " -(742:6-742:25) "(childrenLength ===" --> (408:7-408:26) "(childrenLength ===" -(742:25-742:28) " 1)" --> (408:26-408:29) " 1)" -(742:28-743:4) " {\n " --> (408:29-409:0) " {" -(743:4-743:10) " props" --> (409:0-409:10) "\n\t\t\t\tprops" -(743:10-743:21) ".children =" --> (409:10-409:21) ".children =" -(743:21-744:3) " children;\n " --> (409:21-410:3) " children;\n\t\t" -(744:3-744:13) "} else if " --> (410:3-410:14) "\t} else if " -(744:13-744:30) "(childrenLength >" --> (410:14-410:31) "(childrenLength >" -(744:30-744:33) " 1)" --> (410:31-410:34) " 1)" -(744:33-745:4) " {\n " --> (410:34-411:4) " {\n\t\t\t" -(745:4-745:8) " var" --> (411:4-411:8) "\tvar" -(745:8-745:21) " childArray =" --> (411:8-411:21) " childArray =" -(745:21-745:27) " Array" --> (411:21-411:27) " Array" -(745:27-745:42) "(childrenLength" --> (411:27-411:42) "(childrenLength" -(745:42-747:4) ");\n\n " --> (411:42-412:0) ");" -(747:4-747:9) " for " --> (412:0-412:9) "\n\t\t\t\tfor " -(747:9-747:13) "(var" --> (412:9-412:13) "(var" -(747:13-747:17) " i =" --> (412:13-412:17) " i =" -(747:17-747:20) " 0;" --> (412:17-412:20) " 0;" -(747:20-747:24) " i <" --> (412:20-412:24) " i <" -(747:24-747:40) " childrenLength;" --> (412:24-412:40) " childrenLength;" -(747:40-747:45) " i++)" --> (412:40-412:45) " i++)" -(747:45-748:6) " {\n " --> (412:45-413:0) " {" -(748:6-748:17) " childArray" --> (413:0-413:16) "\n\t\t\t\t\tchildArray" -(748:17-748:22) "[i] =" --> (413:16-413:21) "[i] =" -(748:22-748:32) " arguments" --> (413:21-413:31) " arguments" -(748:32-748:36) "[i +" --> (413:31-413:35) "[i +" -(748:36-749:5) " 2];\n " --> (413:35-414:4) " 2];\n\t\t\t" -(749:5-751:4) "}\n\n " --> (414:4-415:4) "\t}\n\t\t\t" -(751:4-752:6) " {\n " --> (415:4-416:0) "\t{" -(752:6-752:10) " if " --> (416:0-416:9) "\n\t\t\t\t\tif " -(752:10-752:17) "(Object" --> (416:9-416:16) "(Object" -(752:17-752:25) ".freeze)" --> (416:16-416:24) ".freeze)" -(752:25-753:8) " {\n " --> (416:24-417:0) " {" -(753:8-753:15) " Object" --> (417:0-417:13) "\n\t\t\t\t\t\tObject" -(753:15-753:22) ".freeze" --> (417:13-417:20) ".freeze" -(753:22-753:33) "(childArray" --> (417:20-417:31) "(childArray" -(753:33-754:7) ");\n " --> (417:31-418:5) ");\n\t\t\t\t" -(754:7-755:5) "}\n " --> (418:5-419:4) "\t}\n\t\t\t" -(755:5-757:4) "}\n\n " --> (419:4-420:0) "\t}" -(757:4-757:10) " props" --> (420:0-420:10) "\n\t\t\t\tprops" -(757:10-757:21) ".children =" --> (420:10-420:21) ".children =" -(757:21-758:3) " childArray;\n " --> (420:21-421:3) " childArray;\n\t\t" -(758:3-761:2) "} // Resolve default props\n\n\n " --> (421:3-422:0) "\t}" -(761:2-761:6) " if " --> (422:0-422:7) "\n\t\t\tif " -(761:6-761:14) "(type &&" --> (422:7-422:15) "(type &&" -(761:14-761:19) " type" --> (422:15-422:20) " type" -(761:19-761:33) ".defaultProps)" --> (422:20-422:34) ".defaultProps)" -(761:33-762:4) " {\n " --> (422:34-423:4) " {\n\t\t\t" -(762:4-762:8) " var" --> (423:4-423:8) "\tvar" -(762:8-762:23) " defaultProps =" --> (423:8-423:23) " defaultProps =" -(762:23-762:28) " type" --> (423:23-423:28) " type" -(762:28-764:4) ".defaultProps;\n\n " --> (423:28-424:0) ".defaultProps;" -(764:4-764:9) " for " --> (424:0-424:9) "\n\t\t\t\tfor " -(764:9-764:21) "(propName in" --> (424:9-424:21) "(propName in" -(764:21-764:35) " defaultProps)" --> (424:21-424:35) " defaultProps)" -(764:35-765:6) " {\n " --> (424:35-425:0) " {" -(765:6-765:10) " if " --> (425:0-425:9) "\n\t\t\t\t\tif " -(765:10-765:16) "(props" --> (425:9-425:15) "(props" -(765:16-765:30) "[propName] ===" --> (425:15-425:29) "[propName] ===" -(765:30-765:41) " undefined)" --> (425:29-425:40) " undefined)" -(765:41-766:8) " {\n " --> (425:40-426:0) " {" -(766:8-766:14) " props" --> (426:0-426:12) "\n\t\t\t\t\t\tprops" -(766:14-766:26) "[propName] =" --> (426:12-426:24) "[propName] =" -(766:26-766:39) " defaultProps" --> (426:24-426:37) " defaultProps" -(766:39-767:7) "[propName];\n " --> (426:37-427:5) "[propName];\n\t\t\t\t" -(767:7-768:5) "}\n " --> (427:5-428:4) "\t}\n\t\t\t" -(768:5-769:3) "}\n " --> (428:4-429:3) "\t}\n\t\t" -(769:3-771:2) "}\n\n " --> (429:3-430:3) "\t}\n\t\t" -(771:2-772:4) " {\n " --> (430:3-431:0) "\t{" -(772:4-772:8) " if " --> (431:0-431:8) "\n\t\t\t\tif " -(772:8-772:15) "(key ||" --> (431:8-431:15) "(key ||" -(772:15-772:20) " ref)" --> (431:15-431:20) " ref)" -(772:20-773:6) " {\n " --> (431:20-432:5) " {\n\t\t\t\t" -(773:6-773:10) " var" --> (432:5-432:9) "\tvar" -(773:10-773:31) " displayName = typeof" --> (432:9-432:30) " displayName = typeof" -(773:31-773:40) " type ===" --> (432:30-432:39) " type ===" -(773:40-773:53) " 'function' ?" --> (432:39-432:52) " 'function' ?" -(773:53-773:58) " type" --> (432:52-432:57) " type" -(773:58-773:73) ".displayName ||" --> (432:57-432:72) ".displayName ||" -(773:73-773:78) " type" --> (432:72-432:77) " type" -(773:78-773:86) ".name ||" --> (432:77-432:85) ".name ||" -(773:86-773:98) " 'Unknown' :" --> (432:85-432:97) " 'Unknown' :" -(773:98-775:6) " type;\n\n " --> (432:97-433:0) " type;" -(775:6-775:10) " if " --> (433:0-433:9) "\n\t\t\t\t\tif " -(775:10-775:15) "(key)" --> (433:9-433:14) "(key)" -(775:15-776:8) " {\n " --> (433:14-434:0) " {" -(776:8-776:35) " defineKeyPropWarningGetter" --> (434:0-434:33) "\n\t\t\t\t\t\tdefineKeyPropWarningGetter" -(776:35-776:42) "(props," --> (434:33-434:40) "(props," -(776:42-776:54) " displayName" --> (434:40-434:52) " displayName" -(776:54-777:7) ");\n " --> (434:52-435:5) ");\n\t\t\t\t" -(777:7-779:6) "}\n\n " --> (435:5-436:0) "\t}" -(779:6-779:10) " if " --> (436:0-436:9) "\n\t\t\t\t\tif " -(779:10-779:15) "(ref)" --> (436:9-436:14) "(ref)" -(779:15-780:8) " {\n " --> (436:14-437:0) " {" -(780:8-780:35) " defineRefPropWarningGetter" --> (437:0-437:33) "\n\t\t\t\t\t\tdefineRefPropWarningGetter" -(780:35-780:42) "(props," --> (437:33-437:40) "(props," -(780:42-780:54) " displayName" --> (437:40-437:52) " displayName" -(780:54-781:7) ");\n " --> (437:52-438:5) ");\n\t\t\t\t" -(781:7-782:5) "}\n " --> (438:5-439:4) "\t}\n\t\t\t" -(782:5-783:3) "}\n " --> (439:4-440:3) "\t}\n\t\t" -(783:3-785:2) "}\n\n " --> (440:3-441:0) "\t}" -(785:2-785:9) " return" --> (441:0-441:10) "\n\t\t\treturn" -(785:9-785:22) " ReactElement" --> (441:10-441:23) " ReactElement" -(785:22-785:28) "(type," --> (441:23-441:29) "(type," -(785:28-785:33) " key," --> (441:29-441:34) " key," -(785:33-785:38) " ref," --> (441:34-441:39) " ref," -(785:38-785:44) " self," --> (441:39-441:45) " self," -(785:44-785:52) " source," --> (441:45-441:53) " source," -(785:52-785:70) " ReactCurrentOwner" --> (441:53-441:71) " ReactCurrentOwner" -(785:70-785:79) ".current," --> (441:71-441:80) ".current," -(785:79-785:85) " props" --> (441:80-441:86) " props" -(785:85-786:1) ");\n" --> (441:86-442:2) ");\n\t" -(786:1-787:0) "}" --> (442:2-443:2) "\t}\n\t" -(787:0-787:9) "\nfunction" --> (443:2-443:11) "\tfunction" -(787:9-787:28) " cloneAndReplaceKey" --> (443:11-443:30) " cloneAndReplaceKey" -(787:28-787:40) "(oldElement," --> (443:30-443:42) "(oldElement," -(787:40-787:48) " newKey)" --> (443:42-443:50) " newKey)" -(787:48-788:2) " {\n " --> (443:50-444:3) " {\n\t\t" -(788:2-788:6) " var" --> (444:3-444:7) "\tvar" -(788:6-788:19) " newElement =" --> (444:7-444:20) " newElement =" -(788:19-788:32) " ReactElement" --> (444:20-444:33) " ReactElement" -(788:32-788:43) "(oldElement" --> (444:33-444:44) "(oldElement" -(788:43-788:49) ".type," --> (444:44-444:50) ".type," -(788:49-788:57) " newKey," --> (444:50-444:58) " newKey," -(788:57-788:68) " oldElement" --> (444:58-444:69) " oldElement" -(788:68-788:73) ".ref," --> (444:69-444:74) ".ref," -(788:73-788:84) " oldElement" --> (444:74-444:85) " oldElement" -(788:84-788:91) "._self," --> (444:85-444:92) "._self," -(788:91-788:102) " oldElement" --> (444:92-444:103) " oldElement" -(788:102-788:111) "._source," --> (444:103-444:112) "._source," -(788:111-788:122) " oldElement" --> (444:112-444:123) " oldElement" -(788:122-788:130) "._owner," --> (444:123-444:131) "._owner," -(788:130-788:141) " oldElement" --> (444:131-444:142) " oldElement" -(788:141-788:147) ".props" --> (444:142-444:148) ".props" -(788:147-789:2) ");\n " --> (444:148-445:0) ");" -(789:2-789:9) " return" --> (445:0-445:10) "\n\t\t\treturn" -(789:9-790:1) " newElement;\n" --> (445:10-446:2) " newElement;\n\t" -(790:1-796:0) "}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n" --> (446:2-447:2) "\t}\n\t" -(796:0-796:9) "\nfunction" --> (447:2-447:11) "\tfunction" -(796:9-796:22) " cloneElement" --> (447:11-447:24) " cloneElement" -(796:22-796:31) "(element," --> (447:24-447:33) "(element," -(796:31-796:39) " config," --> (447:33-447:41) " config," -(796:39-796:49) " children)" --> (447:41-447:51) " children)" -(796:49-797:2) " {\n " --> (447:51-448:0) " {" -(797:2-797:9) " if (!!" --> (448:0-448:10) "\n\t\t\tif (!!" -(797:9-797:21) "(element ===" --> (448:10-448:22) "(element ===" -(797:21-797:29) " null ||" --> (448:22-448:30) " null ||" -(797:29-797:41) " element ===" --> (448:30-448:42) " element ===" -(797:41-797:53) " undefined))" --> (448:42-448:54) " undefined))" -(797:53-798:4) " {\n " --> (448:54-449:4) " {\n\t\t\t" -(798:4-799:6) " {\n " --> (449:4-450:0) "\t{" -(799:6-799:12) " throw" --> (450:0-450:11) "\n\t\t\t\t\tthrow" -(799:12-799:19) " Error(" --> (450:11-450:17) " Error" -(799:19-799:102) " \"React.cloneElement(...): The argument must be a React element, but you passed \" +" --> (450:17-450:100) "('React.cloneElement(...): The argument must be a React element, but you passed ' +" -(799:102-799:112) " element +" --> (450:100-450:110) " element +" -(799:112-799:117) " \".\" " --> (450:110-450:114) " '.'" -(799:117-800:5) ");\n " --> (450:114-451:4) ");\n\t\t\t" -(800:5-801:3) "}\n " --> (451:4-452:3) "\t}\n\t\t" -(801:3-803:2) "}\n\n " --> (452:3-453:3) "\t}\n\t\t" -(803:2-803:6) " var" --> (453:3-453:7) "\tvar" -(803:6-805:2) " propName; // Original props are copied\n\n " --> (453:7-454:3) " propName;\n\t\t" -(805:2-805:6) " var" --> (454:3-454:7) "\tvar" -(805:6-805:14) " props =" --> (454:7-454:15) " props =" -(805:14-805:22) " _assign" --> (454:15-454:23) " _assign" -(805:22-805:24) "({" --> (454:23-454:24) "(" -(805:24-805:26) "}," --> (454:24-454:27) "{}," -(805:26-805:34) " element" --> (454:27-454:35) " element" -(805:34-805:40) ".props" --> (454:35-454:41) ".props" -(805:40-808:2) "); // Reserved names are extracted\n\n\n " --> (454:41-455:3) ");\n\t\t" -(808:2-808:6) " var" --> (455:3-455:7) "\tvar" -(808:6-808:12) " key =" --> (455:7-455:13) " key =" -(808:12-808:20) " element" --> (455:13-455:21) " element" -(808:20-809:2) ".key;\n " --> (455:21-456:3) ".key;\n\t\t" -(809:2-809:6) " var" --> (456:3-456:7) "\tvar" -(809:6-809:12) " ref =" --> (456:7-456:13) " ref =" -(809:12-809:20) " element" --> (456:13-456:21) " element" -(809:20-811:2) ".ref; // Self is preserved since the owner is preserved.\n\n " --> (456:21-457:3) ".ref;\n\t\t" -(811:2-811:6) " var" --> (457:3-457:7) "\tvar" -(811:6-811:13) " self =" --> (457:7-457:14) " self =" -(811:13-811:21) " element" --> (457:14-457:22) " element" -(811:21-815:2) "._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n " --> (457:22-458:3) "._self;\n\t\t" -(815:2-815:6) " var" --> (458:3-458:7) "\tvar" -(815:6-815:15) " source =" --> (458:7-458:16) " source =" -(815:15-815:23) " element" --> (458:16-458:24) " element" -(815:23-817:2) "._source; // Owner will be preserved, unless ref is overridden\n\n " --> (458:24-459:3) "._source;\n\t\t" -(817:2-817:6) " var" --> (459:3-459:7) "\tvar" -(817:6-817:14) " owner =" --> (459:7-459:15) " owner =" -(817:14-817:22) " element" --> (459:15-459:23) " element" -(817:22-819:2) "._owner;\n\n " --> (459:23-460:0) "._owner;" -(819:2-819:6) " if " --> (460:0-460:7) "\n\t\t\tif " -(819:6-819:16) "(config !=" --> (460:7-460:17) "(config !=" -(819:16-819:22) " null)" --> (460:17-460:23) " null)" -(819:22-820:4) " {\n " --> (460:23-461:0) " {" -(820:4-820:8) " if " --> (461:0-461:8) "\n\t\t\t\tif " -(820:8-820:20) "(hasValidRef" --> (461:8-461:20) "(hasValidRef" -(820:20-820:27) "(config" --> (461:20-461:27) "(config" -(820:27-820:29) "))" --> (461:27-461:29) "))" -(820:29-822:6) " {\n // Silently steal the ref from the parent.\n " --> (461:29-462:0) " {" -(822:6-822:12) " ref =" --> (462:0-462:11) "\n\t\t\t\t\tref =" -(822:12-822:19) " config" --> (462:11-462:18) " config" -(822:19-823:6) ".ref;\n " --> (462:18-463:0) ".ref;" -(823:6-823:14) " owner =" --> (463:0-463:13) "\n\t\t\t\t\towner =" -(823:14-823:32) " ReactCurrentOwner" --> (463:13-463:31) " ReactCurrentOwner" -(823:32-824:5) ".current;\n " --> (463:31-464:4) ".current;\n\t\t\t" -(824:5-826:4) "}\n\n " --> (464:4-465:0) "\t}" -(826:4-826:8) " if " --> (465:0-465:8) "\n\t\t\t\tif " -(826:8-826:20) "(hasValidKey" --> (465:8-465:20) "(hasValidKey" -(826:20-826:27) "(config" --> (465:20-465:27) "(config" -(826:27-826:29) "))" --> (465:27-465:29) "))" -(826:29-827:6) " {\n " --> (465:29-466:0) " {" -(827:6-827:12) " key =" --> (466:0-466:11) "\n\t\t\t\t\tkey =" -(827:12-827:17) " '' +" --> (466:11-466:16) " '' +" -(827:17-827:24) " config" --> (466:16-466:23) " config" -(827:24-828:5) ".key;\n " --> (466:23-467:4) ".key;\n\t\t\t" -(828:5-831:4) "} // Remaining properties override existing props\n\n\n " --> (467:4-468:4) "\t}\n\t\t\t" -(831:4-831:8) " var" --> (468:4-468:8) "\tvar" -(831:8-833:4) " defaultProps;\n\n " --> (468:8-469:0) " defaultProps;" -(833:4-833:8) " if " --> (469:0-469:8) "\n\t\t\t\tif " -(833:8-833:16) "(element" --> (469:8-469:16) "(element" -(833:16-833:24) ".type &&" --> (469:16-469:24) ".type &&" -(833:24-833:32) " element" --> (469:24-469:32) " element" -(833:32-833:37) ".type" --> (469:32-469:37) ".type" -(833:37-833:51) ".defaultProps)" --> (469:37-469:51) ".defaultProps)" -(833:51-834:6) " {\n " --> (469:51-470:0) " {" -(834:6-834:21) " defaultProps =" --> (470:0-470:20) "\n\t\t\t\t\tdefaultProps =" -(834:21-834:29) " element" --> (470:20-470:28) " element" -(834:29-834:34) ".type" --> (470:28-470:33) ".type" -(834:34-835:5) ".defaultProps;\n " --> (470:33-471:4) ".defaultProps;\n\t\t\t" -(835:5-837:4) "}\n\n " --> (471:4-472:0) "\t}" -(837:4-837:9) " for " --> (472:0-472:9) "\n\t\t\t\tfor " -(837:9-837:21) "(propName in" --> (472:9-472:21) "(propName in" -(837:21-837:29) " config)" --> (472:21-472:29) " config)" -(837:29-838:6) " {\n " --> (472:29-473:0) " {" -(838:6-838:10) " if " --> (473:0-473:9) "\n\t\t\t\t\tif " -(838:10-838:25) "(hasOwnProperty" --> (473:9-473:24) "(hasOwnProperty" -(838:25-838:30) ".call" --> (473:24-473:29) ".call" -(838:30-838:38) "(config," --> (473:29-473:37) "(config," -(838:38-838:47) " propName" --> (473:37-473:46) " propName" -(838:47-838:52) ") && " --> (473:46-473:51) ") && " -(838:52-838:67) "!RESERVED_PROPS" --> (473:51-473:66) "!RESERVED_PROPS" -(838:67-838:82) ".hasOwnProperty" --> (473:66-473:81) ".hasOwnProperty" -(838:82-838:91) "(propName" --> (473:81-473:90) "(propName" -(838:91-838:93) "))" --> (473:90-473:92) "))" -(838:93-839:8) " {\n " --> (473:92-474:0) " {" -(839:8-839:12) " if " --> (474:0-474:10) "\n\t\t\t\t\t\tif " -(839:12-839:19) "(config" --> (474:10-474:17) "(config" -(839:19-839:33) "[propName] ===" --> (474:17-474:31) "[propName] ===" -(839:33-839:46) " undefined &&" --> (474:31-474:44) " undefined &&" -(839:46-839:63) " defaultProps !==" --> (474:44-474:61) " defaultProps !==" -(839:63-839:74) " undefined)" --> (474:61-474:72) " undefined)" -(839:74-841:10) " {\n // Resolve default props\n " --> (474:72-475:0) " {" -(841:10-841:16) " props" --> (475:0-475:13) "\n\t\t\t\t\t\t\tprops" -(841:16-841:28) "[propName] =" --> (475:13-475:25) "[propName] =" -(841:28-841:41) " defaultProps" --> (475:25-475:38) " defaultProps" -(841:41-842:9) "[propName];\n " --> (475:38-476:6) "[propName];\n\t\t\t\t\t" -(842:9-842:15) "} else" --> (476:6-476:13) "\t} else" -(842:15-843:10) " {\n " --> (476:13-477:0) " {" -(843:10-843:16) " props" --> (477:0-477:13) "\n\t\t\t\t\t\t\tprops" -(843:16-843:28) "[propName] =" --> (477:13-477:25) "[propName] =" -(843:28-843:35) " config" --> (477:25-477:32) " config" -(843:35-844:9) "[propName];\n " --> (477:32-478:6) "[propName];\n\t\t\t\t\t" -(844:9-845:7) "}\n " --> (478:6-479:5) "\t}\n\t\t\t\t" -(845:7-846:5) "}\n " --> (479:5-480:4) "\t}\n\t\t\t" -(846:5-847:3) "}\n " --> (480:4-481:3) "\t}\n\t\t" -(847:3-851:2) "} // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n " --> (481:3-482:3) "\t}\n\t\t" -(851:2-851:6) " var" --> (482:3-482:7) "\tvar" -(851:6-851:23) " childrenLength =" --> (482:7-482:24) " childrenLength =" -(851:23-851:33) " arguments" --> (482:24-482:34) " arguments" -(851:33-851:42) ".length -" --> (482:34-482:43) ".length -" -(851:42-853:2) " 2;\n\n " --> (482:43-483:0) " 2;" -(853:2-853:6) " if " --> (483:0-483:7) "\n\t\t\tif " -(853:6-853:25) "(childrenLength ===" --> (483:7-483:26) "(childrenLength ===" -(853:25-853:28) " 1)" --> (483:26-483:29) " 1)" -(853:28-854:4) " {\n " --> (483:29-484:0) " {" -(854:4-854:10) " props" --> (484:0-484:10) "\n\t\t\t\tprops" -(854:10-854:21) ".children =" --> (484:10-484:21) ".children =" -(854:21-855:3) " children;\n " --> (484:21-485:3) " children;\n\t\t" -(855:3-855:13) "} else if " --> (485:3-485:14) "\t} else if " -(855:13-855:30) "(childrenLength >" --> (485:14-485:31) "(childrenLength >" -(855:30-855:33) " 1)" --> (485:31-485:34) " 1)" -(855:33-856:4) " {\n " --> (485:34-486:4) " {\n\t\t\t" -(856:4-856:8) " var" --> (486:4-486:8) "\tvar" -(856:8-856:21) " childArray =" --> (486:8-486:21) " childArray =" -(856:21-856:27) " Array" --> (486:21-486:27) " Array" -(856:27-856:42) "(childrenLength" --> (486:27-486:42) "(childrenLength" -(856:42-858:4) ");\n\n " --> (486:42-487:0) ");" -(858:4-858:9) " for " --> (487:0-487:9) "\n\t\t\t\tfor " -(858:9-858:13) "(var" --> (487:9-487:13) "(var" -(858:13-858:17) " i =" --> (487:13-487:17) " i =" -(858:17-858:20) " 0;" --> (487:17-487:20) " 0;" -(858:20-858:24) " i <" --> (487:20-487:24) " i <" -(858:24-858:40) " childrenLength;" --> (487:24-487:40) " childrenLength;" -(858:40-858:45) " i++)" --> (487:40-487:45) " i++)" -(858:45-859:6) " {\n " --> (487:45-488:0) " {" -(859:6-859:17) " childArray" --> (488:0-488:16) "\n\t\t\t\t\tchildArray" -(859:17-859:22) "[i] =" --> (488:16-488:21) "[i] =" -(859:22-859:32) " arguments" --> (488:21-488:31) " arguments" -(859:32-859:36) "[i +" --> (488:31-488:35) "[i +" -(859:36-860:5) " 2];\n " --> (488:35-489:4) " 2];\n\t\t\t" -(860:5-862:4) "}\n\n " --> (489:4-490:0) "\t}" -(862:4-862:10) " props" --> (490:0-490:10) "\n\t\t\t\tprops" -(862:10-862:21) ".children =" --> (490:10-490:21) ".children =" -(862:21-863:3) " childArray;\n " --> (490:21-491:3) " childArray;\n\t\t" -(863:3-865:2) "}\n\n " --> (491:3-492:0) "\t}" -(865:2-865:9) " return" --> (492:0-492:10) "\n\t\t\treturn" -(865:9-865:22) " ReactElement" --> (492:10-492:23) " ReactElement" -(865:22-865:30) "(element" --> (492:23-492:31) "(element" -(865:30-865:36) ".type," --> (492:31-492:37) ".type," -(865:36-865:41) " key," --> (492:37-492:42) " key," -(865:41-865:46) " ref," --> (492:42-492:47) " ref," -(865:46-865:52) " self," --> (492:47-492:53) " self," -(865:52-865:60) " source," --> (492:53-492:61) " source," -(865:60-865:67) " owner," --> (492:61-492:68) " owner," -(865:67-865:73) " props" --> (492:68-492:74) " props" -(865:73-866:1) ");\n" --> (492:74-493:2) ");\n\t" -(866:1-875:0) "}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n" --> (493:2-494:2) "\t}\n\t" -(875:0-875:9) "\nfunction" --> (494:2-494:11) "\tfunction" -(875:9-875:24) " isValidElement" --> (494:11-494:26) " isValidElement" -(875:24-875:32) "(object)" --> (494:26-494:34) "(object)" -(875:32-876:2) " {\n " --> (494:34-495:0) " {" -(876:2-876:16) " return typeof" --> (495:0-495:17) "\n\t\t\treturn typeof" -(876:16-876:27) " object ===" --> (495:17-495:28) " object ===" -(876:27-876:39) " 'object' &&" --> (495:28-495:40) " 'object' &&" -(876:39-876:50) " object !==" --> (495:40-495:51) " object !==" -(876:50-876:58) " null &&" --> (495:51-495:59) " null &&" -(876:58-876:65) " object" --> (495:59-495:66) " object" -(876:65-876:78) ".$$typeof ===" --> (495:66-495:79) ".$$typeof ===" -(876:78-877:1) " REACT_ELEMENT_TYPE;\n" --> (495:79-496:2) " REACT_ELEMENT_TYPE;\n\t" -(877:1-879:0) "}\n" --> (496:2-497:2) "\t}\n\t" -(879:0-879:4) "\nvar" --> (497:2-497:6) "\tvar" -(879:4-879:16) " SEPARATOR =" --> (497:6-497:18) " SEPARATOR =" -(879:16-880:0) " '.';" --> (497:18-498:2) " '.';\n\t" -(880:0-880:4) "\nvar" --> (498:2-498:6) "\tvar" -(880:4-880:19) " SUBSEPARATOR =" --> (498:6-498:21) " SUBSEPARATOR =" -(880:19-888:0) " ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n" --> (498:21-499:2) " ':';\n\t" -(888:0-888:9) "\nfunction" --> (499:2-499:11) "\tfunction" -(888:9-888:16) " escape" --> (499:11-499:18) " escape" -(888:16-888:21) "(key)" --> (499:18-499:23) "(key)" -(888:21-889:2) " {\n " --> (499:23-500:3) " {\n\t\t" -(889:2-889:6) " var" --> (500:3-500:7) "\tvar" -(889:6-889:20) " escapeRegex =" --> (500:7-500:21) " escapeRegex =" -(889:20-890:2) " /[=:]/g;\n " --> (500:21-501:3) " /[=:]/g;\n\t\t" -(890:2-890:6) " var" --> (501:3-501:7) "\tvar" -(890:6-890:22) " escaperLookup =" --> (501:7-501:23) " escaperLookup =" -(890:22-891:4) " {\n " --> (501:23-502:4) " {\n\t\t\t" -(891:4-891:9) " '=':" --> (502:4-502:9) "\t'=':" -(891:9-892:4) " '=0',\n " --> (502:9-503:4) " '=0',\n\t\t\t" -(892:4-892:9) " ':':" --> (503:4-503:9) "\t':':" -(892:9-893:3) " '=2'\n " --> (503:9-504:3) " '=2'\n\t\t" -(893:3-894:2) "};\n " --> (504:3-505:3) "\t};\n\t\t" -(894:2-894:6) " var" --> (505:3-505:7) "\tvar" -(894:6-894:22) " escapedString =" --> (505:7-505:23) " escapedString =" -(894:22-894:26) " key" --> (505:23-505:27) " key" -(894:26-894:34) ".replace" --> (505:27-505:35) ".replace" -(894:34-894:47) "(escapeRegex," --> (505:35-505:48) "(escapeRegex," -(894:47-894:57) " function " --> (505:48-505:57) " function" -(894:57-894:64) "(match)" --> (505:57-505:64) "(match)" -(894:64-895:4) " {\n " --> (505:64-506:0) " {" -(895:4-895:11) " return" --> (506:0-506:11) "\n\t\t\t\treturn" -(895:11-895:25) " escaperLookup" --> (506:11-506:25) " escaperLookup" -(895:25-896:3) "[match];\n " --> (506:25-507:3) "[match];\n\t\t" -(896:3-896:4) "}" --> (507:3-507:5) "\t}" -(896:4-897:2) ");\n " --> (507:5-508:0) ");" -(897:2-897:9) " return" --> (508:0-508:10) "\n\t\t\treturn" -(897:9-897:15) " '$' +" --> (508:10-508:16) " '$' +" -(897:15-898:1) " escapedString;\n" --> (508:16-509:2) " escapedString;\n\t" -(898:1-905:0) "}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n" --> (509:2-510:2) "\t}\n\t" -(905:0-905:4) "\nvar" --> (510:2-510:6) "\tvar" -(905:4-905:23) " didWarnAboutMaps =" --> (510:6-510:25) " didWarnAboutMaps =" -(905:23-906:0) " false;" --> (510:25-511:2) " false;\n\t" -(906:0-906:4) "\nvar" --> (511:2-511:6) "\tvar" -(906:4-906:33) " userProvidedKeyEscapeRegex =" --> (511:6-511:35) " userProvidedKeyEscapeRegex =" -(906:33-908:0) " /\\/+/g;\n" --> (511:35-512:2) " /\\/+/g;\n\t" -(908:0-908:9) "\nfunction" --> (512:2-512:11) "\tfunction" -(908:9-908:31) " escapeUserProvidedKey" --> (512:11-512:33) " escapeUserProvidedKey" -(908:31-908:37) "(text)" --> (512:33-512:39) "(text)" -(908:37-909:2) " {\n " --> (512:39-513:0) " {" -(909:2-909:9) " return" --> (513:0-513:10) "\n\t\t\treturn" -(909:9-909:14) " text" --> (513:10-513:15) " text" -(909:14-909:22) ".replace" --> (513:15-513:23) ".replace" -(909:22-909:50) "(userProvidedKeyEscapeRegex," --> (513:23-513:51) "(userProvidedKeyEscapeRegex," -(909:50-909:56) " '$&/'" --> (513:51-513:57) " '$&/'" -(909:56-910:1) ");\n" --> (513:57-514:2) ");\n\t" -(910:1-920:0) "}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n" --> (514:2-515:2) "\t}\n\t" -(920:0-920:9) "\nfunction" --> (515:2-515:11) "\tfunction" -(920:9-920:23) " getElementKey" --> (515:11-515:25) " getElementKey" -(920:23-920:32) "(element," --> (515:25-515:34) "(element," -(920:32-920:39) " index)" --> (515:34-515:41) " index)" -(920:39-923:2) " {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n " --> (515:41-516:0) " {" -(923:2-923:13) " if (typeof" --> (516:0-516:14) "\n\t\t\tif (typeof" -(923:13-923:25) " element ===" --> (516:14-516:26) " element ===" -(923:25-923:37) " 'object' &&" --> (516:26-516:38) " 'object' &&" -(923:37-923:49) " element !==" --> (516:38-516:50) " element !==" -(923:49-923:57) " null &&" --> (516:50-516:58) " null &&" -(923:57-923:65) " element" --> (516:58-516:66) " element" -(923:65-923:72) ".key !=" --> (516:66-516:73) ".key !=" -(923:72-923:78) " null)" --> (516:73-516:79) " null)" -(923:78-925:4) " {\n // Explicit key\n " --> (516:79-517:0) " {" -(925:4-925:11) " return" --> (517:0-517:11) "\n\t\t\t\treturn" -(925:11-925:18) " escape" --> (517:11-517:18) " escape" -(925:18-925:23) "('' +" --> (517:18-517:23) "('' +" -(925:23-925:31) " element" --> (517:23-517:31) " element" -(925:31-925:35) ".key" --> (517:31-517:35) ".key" -(925:35-926:3) ");\n " --> (517:35-518:3) ");\n\t\t" -(926:3-929:2) "} // Implicit key determined by the index in the set\n\n\n " --> (518:3-519:0) "\t}" -(929:2-929:9) " return" --> (519:0-519:10) "\n\t\t\treturn" -(929:9-929:15) " index" --> (519:10-519:16) " index" -(929:15-929:24) ".toString" --> (519:16-519:25) ".toString" -(929:24-929:27) "(36" --> (519:25-519:28) "(36" -(929:27-930:1) ");\n" --> (519:28-520:2) ");\n\t" -(930:1-932:0) "}\n" --> (520:2-521:2) "\t}\n\t" -(932:0-932:9) "\nfunction" --> (521:2-521:11) "\tfunction" -(932:9-932:22) " mapIntoArray" --> (521:11-521:24) " mapIntoArray" -(932:22-932:32) "(children," --> (521:24-521:34) "(children," -(932:32-932:39) " array," --> (521:34-521:41) " array," -(932:39-932:54) " escapedPrefix," --> (521:41-521:56) " escapedPrefix," -(932:54-932:65) " nameSoFar," --> (521:56-521:67) " nameSoFar," -(932:65-932:75) " callback)" --> (521:67-521:77) " callback)" -(932:75-933:2) " {\n " --> (521:77-522:3) " {\n\t\t" -(933:2-933:6) " var" --> (522:3-522:7) "\tvar" -(933:6-933:20) " type = typeof" --> (522:7-522:21) " type = typeof" -(933:20-935:2) " children;\n\n " --> (522:21-523:0) " children;" -(935:2-935:6) " if " --> (523:0-523:7) "\n\t\t\tif " -(935:6-935:15) "(type ===" --> (523:7-523:16) "(type ===" -(935:15-935:30) " 'undefined' ||" --> (523:16-523:31) " 'undefined' ||" -(935:30-935:39) " type ===" --> (523:31-523:40) " type ===" -(935:39-935:50) " 'boolean')" --> (523:40-523:51) " 'boolean')" -(935:50-937:4) " {\n // All of the above are perceived as null.\n " --> (523:51-524:0) " {" -(937:4-937:15) " children =" --> (524:0-524:15) "\n\t\t\t\tchildren =" -(937:15-938:3) " null;\n " --> (524:15-525:3) " null;\n\t\t" -(938:3-940:2) "}\n\n " --> (525:3-526:3) "\t}\n\t\t" -(940:2-940:6) " var" --> (526:3-526:7) "\tvar" -(940:6-940:23) " invokeCallback =" --> (526:7-526:24) " invokeCallback =" -(940:23-942:2) " false;\n\n " --> (526:24-527:0) " false;" -(942:2-942:6) " if " --> (527:0-527:7) "\n\t\t\tif " -(942:6-942:19) "(children ===" --> (527:7-527:20) "(children ===" -(942:19-942:25) " null)" --> (527:20-527:26) " null)" -(942:25-943:4) " {\n " --> (527:26-528:0) " {" -(943:4-943:21) " invokeCallback =" --> (528:0-528:21) "\n\t\t\t\tinvokeCallback =" -(943:21-944:3) " true;\n " --> (528:21-529:3) " true;\n\t\t" -(944:3-944:9) "} else" --> (529:3-529:10) "\t} else" -(944:9-945:4) " {\n " --> (529:10-530:0) " {" -(945:4-945:12) " switch " --> (530:0-530:12) "\n\t\t\t\tswitch " -(945:12-945:4) " switch " --> (530:12-530:18) "(type)" -(945:4-946:6) " switch (type) {\n " --> (530:18-531:0) " {" -(946:6-946:11) " case" --> (531:0-531:10) "\n\t\t\t\t\tcase" -(946:11-947:6) " 'string':\n " --> (531:10-532:0) " 'string':" -(947:6-947:11) " case" --> (532:0-532:10) "\n\t\t\t\t\tcase" -(947:11-948:8) " 'number':\n " --> (532:10-533:0) " 'number':" -(948:8-948:25) " invokeCallback =" --> (533:0-533:23) "\n\t\t\t\t\t\tinvokeCallback =" -(948:25-949:8) " true;\n " --> (533:23-534:0) " true;" -(949:8-951:6) " break;\n\n " --> (534:0-535:0) "\n\t\t\t\t\t\tbreak;" -(951:6-951:11) " case" --> (535:0-535:10) "\n\t\t\t\t\tcase" -(951:11-952:8) " 'object':\n " --> (535:10-535:19) " 'object'" -(952:8-952:16) " switch " --> (535:19-535:28) ": switch " -(952:16-952:25) "(children" --> (535:28-535:37) "(children" -(952:25-952:8) " switch (children" --> (535:37-535:47) ".$$typeof)" -(952:8-953:10) " switch (children.$$typeof) {\n " --> (535:47-536:0) " {" -(953:10-953:15) " case" --> (536:0-536:11) "\n\t\t\t\t\t\tcase" -(953:15-954:10) " REACT_ELEMENT_TYPE:\n " --> (536:11-537:0) " REACT_ELEMENT_TYPE:" -(954:10-954:15) " case" --> (537:0-537:11) "\n\t\t\t\t\t\tcase" -(954:15-955:12) " REACT_PORTAL_TYPE:\n " --> (537:11-537:29) " REACT_PORTAL_TYPE" -(955:12-955:29) " invokeCallback =" --> (537:29-537:47) ": invokeCallback =" -(955:29-956:9) " true;\n " --> (537:47-538:5) " true;\n\t\t\t\t" -(956:9-958:5) "}\n\n " --> (538:5-539:4) "\t}\n\t\t\t" -(958:5-959:3) "}\n " --> (539:4-540:3) "\t}\n\t\t" -(959:3-961:2) "}\n\n " --> (540:3-541:0) "\t}" -(961:2-961:6) " if " --> (541:0-541:7) "\n\t\t\tif " -(961:6-961:22) "(invokeCallback)" --> (541:7-541:23) "(invokeCallback)" -(961:22-962:4) " {\n " --> (541:23-542:4) " {\n\t\t\t" -(962:4-962:8) " var" --> (542:4-542:8) "\tvar" -(962:8-962:17) " _child =" --> (542:8-542:17) " _child =" -(962:17-963:4) " children;\n " --> (542:17-543:4) " children;\n\t\t\t" -(963:4-963:8) " var" --> (543:4-543:8) "\tvar" -(963:8-963:22) " mappedChild =" --> (543:8-543:22) " mappedChild =" -(963:22-963:31) " callback" --> (543:22-543:31) " callback" -(963:31-963:38) "(_child" --> (543:31-543:38) "(_child" -(963:38-966:4) "); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n " --> (543:38-544:4) ");\n\t\t\t" -(966:4-966:8) " var" --> (544:4-544:8) "\tvar" -(966:8-966:19) " childKey =" --> (544:8-544:19) " childKey =" -(966:19-966:33) " nameSoFar ===" --> (544:19-544:33) " nameSoFar ===" -(966:33-966:38) " '' ?" --> (544:33-544:38) " '' ?" -(966:38-966:50) " SEPARATOR +" --> (544:38-544:50) " SEPARATOR +" -(966:50-966:64) " getElementKey" --> (544:50-544:64) " getElementKey" -(966:64-966:72) "(_child," --> (544:64-544:72) "(_child," -(966:72-966:74) " 0" --> (544:72-544:74) " 0" -(966:74-966:77) ") :" --> (544:74-544:77) ") :" -(966:77-968:4) " nameSoFar;\n\n " --> (544:77-545:0) " nameSoFar;" -(968:4-968:8) " if " --> (545:0-545:8) "\n\t\t\t\tif " -(968:8-968:14) "(Array" --> (545:8-545:14) "(Array" -(968:14-968:22) ".isArray" --> (545:14-545:22) ".isArray" -(968:22-968:34) "(mappedChild" --> (545:22-545:34) "(mappedChild" -(968:34-968:36) "))" --> (545:34-545:36) "))" -(968:36-969:6) " {\n " --> (545:36-546:5) " {\n\t\t\t\t" -(969:6-969:10) " var" --> (546:5-546:9) "\tvar" -(969:10-969:28) " escapedChildKey =" --> (546:9-546:27) " escapedChildKey =" -(969:28-971:6) " '';\n\n " --> (546:27-547:0) " '';" -(971:6-971:10) " if " --> (547:0-547:9) "\n\t\t\t\t\tif " -(971:10-971:22) "(childKey !=" --> (547:9-547:21) "(childKey !=" -(971:22-971:28) " null)" --> (547:21-547:27) " null)" -(971:28-972:8) " {\n " --> (547:27-548:0) " {" -(972:8-972:26) " escapedChildKey =" --> (548:0-548:24) "\n\t\t\t\t\t\tescapedChildKey =" -(972:26-972:48) " escapeUserProvidedKey" --> (548:24-548:46) " escapeUserProvidedKey" -(972:48-972:57) "(childKey" --> (548:46-548:55) "(childKey" -(972:57-972:60) ") +" --> (548:55-548:58) ") +" -(972:60-973:7) " '/';\n " --> (548:58-549:5) " '/';\n\t\t\t\t" -(973:7-975:6) "}\n\n " --> (549:5-550:0) "\t}" -(975:6-975:19) " mapIntoArray" --> (550:0-550:18) "\n\t\t\t\t\tmapIntoArray" -(975:19-975:32) "(mappedChild," --> (550:18-550:31) "(mappedChild," -(975:32-975:39) " array," --> (550:31-550:38) " array," -(975:39-975:56) " escapedChildKey," --> (550:38-550:55) " escapedChildKey," -(975:56-975:60) " ''," --> (550:55-550:59) " ''," -(975:60-975:70) " function " --> (550:59-550:68) " function" -(975:70-975:73) "(c)" --> (550:68-550:71) "(c)" -(975:73-976:8) " {\n " --> (550:71-551:0) " {" -(976:8-976:15) " return" --> (551:0-551:13) "\n\t\t\t\t\t\treturn" -(976:15-977:7) " c;\n " --> (551:13-552:5) " c;\n\t\t\t\t" -(977:7-977:8) "}" --> (552:5-552:7) "\t}" -(977:8-978:5) ");\n " --> (552:7-553:4) ");\n\t\t\t" -(978:5-978:15) "} else if " --> (553:4-553:15) "\t} else if " -(978:15-978:30) "(mappedChild !=" --> (553:15-553:30) "(mappedChild !=" -(978:30-978:36) " null)" --> (553:30-553:36) " null)" -(978:36-979:6) " {\n " --> (553:36-554:0) " {" -(979:6-979:10) " if " --> (554:0-554:9) "\n\t\t\t\t\tif " -(979:10-979:25) "(isValidElement" --> (554:9-554:24) "(isValidElement" -(979:25-979:37) "(mappedChild" --> (554:24-554:36) "(mappedChild" -(979:37-979:39) "))" --> (554:36-554:38) "))" -(979:39-980:8) " {\n " --> (554:38-555:0) " {" -(980:8-980:22) " mappedChild =" --> (555:0-555:20) "\n\t\t\t\t\t\tmappedChild =" -(980:22-980:41) " cloneAndReplaceKey" --> (555:20-555:39) " cloneAndReplaceKey" -(980:41-982:8) "(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n " --> (555:39-555:52) "(mappedChild," -(982:8-983:8) " escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n " --> (555:52-555:69) " escapedPrefix + " -(983:8-983:20) " mappedChild" --> (555:69-555:81) "(mappedChild" -(983:20-983:29) ".key && (" --> (555:81-555:90) ".key && (" -(983:29-983:39) "!_child ||" --> (555:90-555:100) "!_child ||" -(983:39-983:46) " _child" --> (555:100-555:107) " _child" -(983:46-983:54) ".key !==" --> (555:107-555:115) ".key !==" -(983:54-983:66) " mappedChild" --> (555:115-555:127) " mappedChild" -(983:66-984:8) ".key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n " --> (555:127-555:134) ".key) ?" -(984:8-984:30) " escapeUserProvidedKey" --> (555:134-555:156) " escapeUserProvidedKey" -(984:30-984:35) "('' +" --> (555:156-555:161) "('' +" -(984:35-984:47) " mappedChild" --> (555:161-555:173) " mappedChild" -(984:47-984:51) ".key" --> (555:173-555:177) ".key" -(984:51-984:54) ") +" --> (555:177-555:180) ") +" -(984:54-984:60) " '/' :" --> (555:180-555:186) " '/' :" -(984:60-984:66) " '') +" --> (555:186-555:192) " '') +" -(984:66-984:75) " childKey" --> (555:192-555:201) " childKey" -(984:75-985:7) ");\n " --> (555:201-556:5) ");\n\t\t\t\t" -(985:7-987:6) "}\n\n " --> (556:5-557:0) "\t}" -(987:6-987:12) " array" --> (557:0-557:11) "\n\t\t\t\t\tarray" -(987:12-987:17) ".push" --> (557:11-557:16) ".push" -(987:17-987:29) "(mappedChild" --> (557:16-557:28) "(mappedChild" -(987:29-988:5) ");\n " --> (557:28-558:4) ");\n\t\t\t" -(988:5-990:4) "}\n\n " --> (558:4-559:0) "\t}" -(990:4-990:11) " return" --> (559:0-559:11) "\n\t\t\t\treturn" -(990:11-991:3) " 1;\n " --> (559:11-560:3) " 1;\n\t\t" -(991:3-993:2) "}\n\n " --> (560:3-561:3) "\t}\n\t\t" -(993:2-993:6) " var" --> (561:3-561:7) "\tvar" -(993:6-994:2) " child;\n " --> (561:7-562:3) " child;\n\t\t" -(994:2-994:6) " var" --> (562:3-562:7) "\tvar" -(994:6-995:2) " nextName;\n " --> (562:7-563:3) " nextName;\n\t\t" -(995:2-995:6) " var" --> (563:3-563:7) "\tvar" -(995:6-995:21) " subtreeCount =" --> (563:7-563:22) " subtreeCount =" -(995:21-997:2) " 0; // Count of children found in the current subtree.\n\n " --> (563:22-564:3) " 0;\n\t\t" -(997:2-997:6) " var" --> (564:3-564:7) "\tvar" -(997:6-997:23) " nextNamePrefix =" --> (564:7-564:24) " nextNamePrefix =" -(997:23-997:37) " nameSoFar ===" --> (564:24-564:38) " nameSoFar ===" -(997:37-997:42) " '' ?" --> (564:38-564:43) " '' ?" -(997:42-997:54) " SEPARATOR :" --> (564:43-564:55) " SEPARATOR :" -(997:54-997:66) " nameSoFar +" --> (564:55-564:67) " nameSoFar +" -(997:66-999:2) " SUBSEPARATOR;\n\n " --> (564:67-565:0) " SUBSEPARATOR;" -(999:2-999:6) " if " --> (565:0-565:7) "\n\t\t\tif " -(999:6-999:12) "(Array" --> (565:7-565:13) "(Array" -(999:12-999:20) ".isArray" --> (565:13-565:21) ".isArray" -(999:20-999:29) "(children" --> (565:21-565:30) "(children" -(999:29-999:31) "))" --> (565:30-565:32) "))" -(999:31-1000:4) " {\n " --> (565:32-566:0) " {" -(1000:4-1000:9) " for " --> (566:0-566:9) "\n\t\t\t\tfor " -(1000:9-1000:13) "(var" --> (566:9-566:13) "(var" -(1000:13-1000:17) " i =" --> (566:13-566:17) " i =" -(1000:17-1000:20) " 0;" --> (566:17-566:20) " 0;" -(1000:20-1000:24) " i <" --> (566:20-566:24) " i <" -(1000:24-1000:33) " children" --> (566:24-566:33) " children" -(1000:33-1000:41) ".length;" --> (566:33-566:41) ".length;" -(1000:41-1000:46) " i++)" --> (566:41-566:46) " i++)" -(1000:46-1001:6) " {\n " --> (566:46-567:0) " {" -(1001:6-1001:14) " child =" --> (567:0-567:13) "\n\t\t\t\t\tchild =" -(1001:14-1001:23) " children" --> (567:13-567:22) " children" -(1001:23-1002:6) "[i];\n " --> (567:22-568:0) "[i];" -(1002:6-1002:17) " nextName =" --> (568:0-568:16) "\n\t\t\t\t\tnextName =" -(1002:17-1002:34) " nextNamePrefix +" --> (568:16-568:33) " nextNamePrefix +" -(1002:34-1002:48) " getElementKey" --> (568:33-568:47) " getElementKey" -(1002:48-1002:55) "(child," --> (568:47-568:54) "(child," -(1002:55-1002:57) " i" --> (568:54-568:56) " i" -(1002:57-1003:6) ");\n " --> (568:56-569:0) ");" -(1003:6-1003:22) " subtreeCount +=" --> (569:0-569:21) "\n\t\t\t\t\tsubtreeCount +=" -(1003:22-1003:35) " mapIntoArray" --> (569:21-569:34) " mapIntoArray" -(1003:35-1003:42) "(child," --> (569:34-569:41) "(child," -(1003:42-1003:49) " array," --> (569:41-569:48) " array," -(1003:49-1003:64) " escapedPrefix," --> (569:48-569:63) " escapedPrefix," -(1003:64-1003:74) " nextName," --> (569:63-569:73) " nextName," -(1003:74-1003:83) " callback" --> (569:73-569:82) " callback" -(1003:83-1004:5) ");\n " --> (569:82-570:4) ");\n\t\t\t" -(1004:5-1005:3) "}\n " --> (570:4-571:3) "\t}\n\t\t" -(1005:3-1005:9) "} else" --> (571:3-571:10) "\t} else" -(1005:9-1006:4) " {\n " --> (571:10-572:4) " {\n\t\t\t" -(1006:4-1006:8) " var" --> (572:4-572:8) "\tvar" -(1006:8-1006:21) " iteratorFn =" --> (572:8-572:21) " iteratorFn =" -(1006:21-1006:35) " getIteratorFn" --> (572:21-572:35) " getIteratorFn" -(1006:35-1006:44) "(children" --> (572:35-572:44) "(children" -(1006:44-1008:4) ");\n\n " --> (572:44-573:0) ");" -(1008:4-1008:15) " if (typeof" --> (573:0-573:15) "\n\t\t\t\tif (typeof" -(1008:15-1008:30) " iteratorFn ===" --> (573:15-573:30) " iteratorFn ===" -(1008:30-1008:42) " 'function')" --> (573:30-573:42) " 'function')" -(1008:42-1009:6) " {\n " --> (573:42-574:5) " {\n\t\t\t\t" -(1009:6-1009:10) " var" --> (574:5-574:9) "\tvar" -(1009:10-1009:29) " iterableChildren =" --> (574:9-574:28) " iterableChildren =" -(1009:29-1011:6) " children;\n\n " --> (574:28-575:5) " children;\n\t\t\t\t" -(1011:6-1013:8) " {\n // Warn about using Maps as children\n " --> (575:5-576:0) "\t{" -(1013:8-1013:12) " if " --> (576:0-576:10) "\n\t\t\t\t\t\tif " -(1013:12-1013:27) "(iteratorFn ===" --> (576:10-576:25) "(iteratorFn ===" -(1013:27-1013:44) " iterableChildren" --> (576:25-576:42) " iterableChildren" -(1013:44-1013:53) ".entries)" --> (576:42-576:51) ".entries)" -(1013:53-1014:10) " {\n " --> (576:51-577:0) " {" -(1014:10-1014:15) " if (" --> (577:0-577:12) "\n\t\t\t\t\t\t\tif (" -(1014:15-1014:33) "!didWarnAboutMaps)" --> (577:12-577:30) "!didWarnAboutMaps)" -(1014:33-1015:12) " {\n " --> (577:30-578:0) " {" -(1015:12-1015:17) " warn" --> (578:0-578:13) "\n\t\t\t\t\t\t\t\twarn" -(1015:17-1015:63) "('Using Maps as children is not supported. ' +" --> (578:13-578:59) "('Using Maps as children is not supported. ' +" -(1015:63-1015:110) " 'Use an array of keyed ReactElements instead.'" --> (578:59-578:106) " 'Use an array of keyed ReactElements instead.'" -(1015:110-1016:11) ");\n " --> (578:106-579:7) ");\n\t\t\t\t\t\t" -(1016:11-1018:10) "}\n\n " --> (579:7-580:0) "\t}" -(1018:10-1018:29) " didWarnAboutMaps =" --> (580:0-580:26) "\n\t\t\t\t\t\t\tdidWarnAboutMaps =" -(1018:29-1019:9) " true;\n " --> (580:26-581:6) " true;\n\t\t\t\t\t" -(1019:9-1020:7) "}\n " --> (581:6-582:5) "\t}\n\t\t\t\t" -(1020:7-1022:6) "}\n\n " --> (582:5-583:5) "\t}\n\t\t\t\t" -(1022:6-1022:10) " var" --> (583:5-583:9) "\tvar" -(1022:10-1022:21) " iterator =" --> (583:9-583:20) " iterator =" -(1022:21-1022:32) " iteratorFn" --> (583:20-583:31) " iteratorFn" -(1022:32-1022:37) ".call" --> (583:31-583:36) ".call" -(1022:37-1022:54) "(iterableChildren" --> (583:36-583:53) "(iterableChildren" -(1022:54-1023:6) ");\n " --> (583:53-584:5) ");\n\t\t\t\t" -(1023:6-1023:10) " var" --> (584:5-584:9) "\tvar" -(1023:10-1024:6) " step;\n " --> (584:9-585:5) " step;\n\t\t\t\t" -(1024:6-1024:10) " var" --> (585:5-585:9) "\tvar" -(1024:10-1024:15) " ii =" --> (585:9-585:14) " ii =" -(1024:15-1026:6) " 0;\n\n " --> (585:14-586:0) " 0;" -(1026:6-1026:15) " while (!" --> (586:0-586:14) "\n\t\t\t\t\twhile (!" -(1026:15-1026:22) "(step =" --> (586:14-586:21) "(step =" -(1026:22-1026:31) " iterator" --> (586:21-586:30) " iterator" -(1026:31-1026:37) ".next(" --> (586:30-586:36) ".next(" -(1026:37-1026:39) "))" --> (586:36-586:38) "))" -(1026:39-1026:45) ".done)" --> (586:38-586:44) ".done)" -(1026:45-1027:8) " {\n " --> (586:44-587:0) " {" -(1027:8-1027:16) " child =" --> (587:0-587:14) "\n\t\t\t\t\t\tchild =" -(1027:16-1027:21) " step" --> (587:14-587:19) " step" -(1027:21-1028:8) ".value;\n " --> (587:19-588:0) ".value;" -(1028:8-1028:19) " nextName =" --> (588:0-588:17) "\n\t\t\t\t\t\tnextName =" -(1028:19-1028:36) " nextNamePrefix +" --> (588:17-588:34) " nextNamePrefix +" -(1028:36-1028:50) " getElementKey" --> (588:34-588:48) " getElementKey" -(1028:50-1028:57) "(child," --> (588:48-588:55) "(child," -(1028:57-1028:62) " ii++" --> (588:55-588:60) " ii++" -(1028:62-1029:8) ");\n " --> (588:60-589:0) ");" -(1029:8-1029:24) " subtreeCount +=" --> (589:0-589:22) "\n\t\t\t\t\t\tsubtreeCount +=" -(1029:24-1029:37) " mapIntoArray" --> (589:22-589:35) " mapIntoArray" -(1029:37-1029:44) "(child," --> (589:35-589:42) "(child," -(1029:44-1029:51) " array," --> (589:42-589:49) " array," -(1029:51-1029:66) " escapedPrefix," --> (589:49-589:64) " escapedPrefix," -(1029:66-1029:76) " nextName," --> (589:64-589:74) " nextName," -(1029:76-1029:85) " callback" --> (589:74-589:83) " callback" -(1029:85-1030:7) ");\n " --> (589:83-590:5) ");\n\t\t\t\t" -(1030:7-1031:5) "}\n " --> (590:5-591:4) "\t}\n\t\t\t" -(1031:5-1031:15) "} else if " --> (591:4-591:15) "\t} else if " -(1031:15-1031:24) "(type ===" --> (591:15-591:24) "(type ===" -(1031:24-1031:34) " 'object')" --> (591:24-591:34) " 'object')" -(1031:34-1032:6) " {\n " --> (591:34-592:5) " {\n\t\t\t\t" -(1032:6-1032:10) " var" --> (592:5-592:9) "\tvar" -(1032:10-1032:27) " childrenString =" --> (592:9-592:26) " childrenString =" -(1032:27-1032:32) " '' +" --> (592:26-592:31) " '' +" -(1032:32-1034:6) " children;\n\n " --> (592:31-593:5) " children;\n\t\t\t\t" -(1034:6-1035:8) " {\n " --> (593:5-594:6) "\t{\n\t\t\t\t\t" -(1035:8-1036:10) " {\n " --> (594:6-595:0) "\t{" -(1036:10-1036:16) " throw" --> (595:0-595:13) "\n\t\t\t\t\t\t\tthrow" -(1036:16-1036:23) " Error(" --> (595:13-595:19) " Error" -(1036:23-1036:76) " \"Objects are not valid as a React child (found: \" + " --> (595:19-595:72) "('Objects are not valid as a React child (found: ' + " -(1036:76-1036:95) "(childrenString ===" --> (595:72-595:91) "(childrenString ===" -(1036:95-1036:115) " '[object Object]' ?" --> (595:91-595:111) " '[object Object]' ?" -(1036:115-1036:138) " 'object with keys {' +" --> (595:111-595:134) " 'object with keys {' +" -(1036:138-1036:145) " Object" --> (595:134-595:141) " Object" -(1036:145-1036:150) ".keys" --> (595:141-595:146) ".keys" -(1036:150-1036:159) "(children" --> (595:146-595:155) "(children" -(1036:159-1036:160) ")" --> (595:155-595:156) ")" -(1036:160-1036:165) ".join" --> (595:156-595:161) ".join" -(1036:165-1036:170) "(', '" --> (595:161-595:166) "(', '" -(1036:170-1036:173) ") +" --> (595:166-595:169) ") +" -(1036:173-1036:179) " '}' :" --> (595:169-595:175) " '}' :" -(1036:179-1036:197) " childrenString) +" --> (595:175-595:193) " childrenString) +" -(1036:197-1036:274) " \"). If you meant to render a collection of children, use an array instead.\" " --> (595:193-595:269) " '). If you meant to render a collection of children, use an array instead.'" -(1036:274-1037:9) ");\n " --> (595:269-596:6) ");\n\t\t\t\t\t" -(1037:9-1038:7) "}\n " --> (596:6-597:5) "\t}\n\t\t\t\t" -(1038:7-1039:5) "}\n " --> (597:5-598:4) "\t}\n\t\t\t" -(1039:5-1040:3) "}\n " --> (598:4-599:3) "\t}\n\t\t" -(1040:3-1042:2) "}\n\n " --> (599:3-600:0) "\t}" -(1042:2-1042:9) " return" --> (600:0-600:10) "\n\t\t\treturn" -(1042:9-1043:1) " subtreeCount;\n" --> (600:10-601:2) " subtreeCount;\n\t" -(1043:1-1058:0) "}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */" --> (601:2-602:2) "\t}\n\t" -(1058:0-1058:9) "\nfunction" --> (602:2-602:11) "\tfunction" -(1058:9-1058:21) " mapChildren" --> (602:11-602:23) " mapChildren" -(1058:21-1058:31) "(children," --> (602:23-602:33) "(children," -(1058:31-1058:37) " func," --> (602:33-602:39) " func," -(1058:37-1058:46) " context)" --> (602:39-602:48) " context)" -(1058:46-1059:2) " {\n " --> (602:48-603:0) " {" -(1059:2-1059:6) " if " --> (603:0-603:7) "\n\t\t\tif " -(1059:6-1059:18) "(children ==" --> (603:7-603:19) "(children ==" -(1059:18-1059:24) " null)" --> (603:19-603:25) " null)" -(1059:24-1060:4) " {\n " --> (603:25-604:0) " {" -(1060:4-1060:11) " return" --> (604:0-604:11) "\n\t\t\t\treturn" -(1060:11-1061:3) " children;\n " --> (604:11-605:3) " children;\n\t\t" -(1061:3-1063:2) "}\n\n " --> (605:3-606:3) "\t}\n\t\t" -(1063:2-1063:6) " var" --> (606:3-606:7) "\tvar" -(1063:6-1063:15) " result =" --> (606:7-606:16) " result =" -(1063:15-1063:17) " [" --> (606:16-606:18) " [" -(1063:17-1064:2) "];\n " --> (606:18-607:3) "];\n\t\t" -(1064:2-1064:6) " var" --> (607:3-607:7) "\tvar" -(1064:6-1064:14) " count =" --> (607:7-607:15) " count =" -(1064:14-1065:2) " 0;\n " --> (607:15-608:0) " 0;" -(1065:2-1065:15) " mapIntoArray" --> (608:0-608:16) "\n\t\t\tmapIntoArray" -(1065:15-1065:25) "(children," --> (608:16-608:26) "(children," -(1065:25-1065:33) " result," --> (608:26-608:34) " result," -(1065:33-1065:37) " ''," --> (608:34-608:38) " ''," -(1065:37-1065:41) " ''," --> (608:38-608:42) " ''," -(1065:41-1065:51) " function " --> (608:42-608:51) " function" -(1065:51-1065:58) "(child)" --> (608:51-608:58) "(child)" -(1065:58-1066:4) " {\n " --> (608:58-609:0) " {" -(1066:4-1066:11) " return" --> (609:0-609:11) "\n\t\t\t\treturn" -(1066:11-1066:16) " func" --> (609:11-609:16) " func" -(1066:16-1066:21) ".call" --> (609:16-609:21) ".call" -(1066:21-1066:30) "(context," --> (609:21-609:30) "(context," -(1066:30-1066:37) " child," --> (609:30-609:37) " child," -(1066:37-1066:45) " count++" --> (609:37-609:45) " count++" -(1066:45-1067:3) ");\n " --> (609:45-610:3) ");\n\t\t" -(1067:3-1067:4) "}" --> (610:3-610:5) "\t}" -(1067:4-1068:2) ");\n " --> (610:5-611:0) ");" -(1068:2-1068:9) " return" --> (611:0-611:10) "\n\t\t\treturn" -(1068:9-1069:1) " result;\n" --> (611:10-612:2) " result;\n\t" -(1069:1-1081:0) "}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n" --> (612:2-613:2) "\t}\n\t" -(1081:0-1081:9) "\nfunction" --> (613:2-613:11) "\tfunction" -(1081:9-1081:23) " countChildren" --> (613:11-613:25) " countChildren" -(1081:23-1081:33) "(children)" --> (613:25-613:35) "(children)" -(1081:33-1082:2) " {\n " --> (613:35-614:3) " {\n\t\t" -(1082:2-1082:6) " var" --> (614:3-614:7) "\tvar" -(1082:6-1082:10) " n =" --> (614:7-614:11) " n =" -(1082:10-1083:2) " 0;\n " --> (614:11-615:0) " 0;" -(1083:2-1083:14) " mapChildren" --> (615:0-615:15) "\n\t\t\tmapChildren" -(1083:14-1083:24) "(children," --> (615:15-615:25) "(children," -(1083:24-1083:36) " function ()" --> (615:25-615:36) " function()" -(1083:36-1084:4) " {\n " --> (615:36-616:0) " {" -(1084:4-1085:3) " n++; // Don't return anything\n " --> (616:0-617:3) "\n\t\t\t\tn++;\n\t\t" -(1085:3-1085:4) "}" --> (617:3-617:5) "\t}" -(1085:4-1086:2) ");\n " --> (617:5-618:0) ");" -(1086:2-1086:9) " return" --> (618:0-618:10) "\n\t\t\treturn" -(1086:9-1087:1) " n;\n" --> (618:10-619:2) " n;\n\t" -(1087:1-1101:0) "}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */" --> (619:2-620:2) "\t}\n\t" -(1101:0-1101:9) "\nfunction" --> (620:2-620:11) "\tfunction" -(1101:9-1101:25) " forEachChildren" --> (620:11-620:27) " forEachChildren" -(1101:25-1101:35) "(children," --> (620:27-620:37) "(children," -(1101:35-1101:48) " forEachFunc," --> (620:37-620:50) " forEachFunc," -(1101:48-1101:64) " forEachContext)" --> (620:50-620:66) " forEachContext)" -(1101:64-1102:2) " {\n " --> (620:66-621:0) " {" -(1102:2-1102:14) " mapChildren" --> (621:0-621:15) "\n\t\t\tmapChildren" -(1102:14-1102:24) "(children," --> (621:15-621:25) "(children," -(1102:24-1102:36) " function ()" --> (621:25-621:36) " function()" -(1102:36-1103:4) " {\n " --> (621:36-622:0) " {" -(1103:4-1103:16) " forEachFunc" --> (622:0-622:16) "\n\t\t\t\tforEachFunc" -(1103:16-1103:22) ".apply" --> (622:16-622:22) ".apply" -(1103:22-1103:28) "(this," --> (622:22-622:28) "(this," -(1103:28-1103:38) " arguments" --> (622:28-622:38) " arguments" -(1103:38-1104:3) "); // Don't return anything.\n " --> (622:38-623:3) ");\n\t\t" -(1104:3-1104:5) "}," --> (623:3-623:6) "\t}," -(1104:5-1104:20) " forEachContext" --> (623:6-623:21) " forEachContext" -(1104:20-1105:1) ");\n" --> (623:21-624:2) ");\n\t" -(1105:1-1114:0) "}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n" --> (624:2-625:2) "\t}\n\t" -(1114:0-1114:9) "\nfunction" --> (625:2-625:11) "\tfunction" -(1114:9-1114:17) " toArray" --> (625:11-625:19) " toArray" -(1114:17-1114:27) "(children)" --> (625:19-625:29) "(children)" -(1114:27-1115:2) " {\n " --> (625:29-626:0) " {" -(1115:2-1115:9) " return" --> (626:0-626:10) "\n\t\t\treturn" -(1115:9-1115:21) " mapChildren" --> (626:10-626:22) " mapChildren" -(1115:21-1115:31) "(children," --> (626:22-626:32) "(children," -(1115:31-1115:41) " function " --> (626:32-626:41) " function" -(1115:41-1115:48) "(child)" --> (626:41-626:48) "(child)" -(1115:48-1116:4) " {\n " --> (626:48-627:0) " {" -(1116:4-1116:11) " return" --> (627:0-627:11) "\n\t\t\t\treturn" -(1116:11-1117:3) " child;\n " --> (627:11-628:3) " child;\n\t\t" -(1117:3-1117:4) "}" --> (628:3-628:5) "\t}" -(1117:4-1117:8) ") ||" --> (628:5-628:9) ") ||" -(1117:8-1117:10) " [" --> (628:9-628:11) " [" -(1117:10-1118:1) "];\n" --> (628:11-629:2) "];\n\t" -(1118:1-1135:0) "}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n" --> (629:2-630:2) "\t}\n\t" -(1135:0-1135:9) "\nfunction" --> (630:2-630:11) "\tfunction" -(1135:9-1135:19) " onlyChild" --> (630:11-630:21) " onlyChild" -(1135:19-1135:29) "(children)" --> (630:21-630:31) "(children)" -(1135:29-1136:2) " {\n " --> (630:31-631:0) " {" -(1136:2-1136:7) " if (" --> (631:0-631:8) "\n\t\t\tif (" -(1136:7-1136:22) "!isValidElement" --> (631:8-631:23) "!isValidElement" -(1136:22-1136:31) "(children" --> (631:23-631:32) "(children" -(1136:31-1136:33) "))" --> (631:32-631:34) "))" -(1136:33-1137:4) " {\n " --> (631:34-632:4) " {\n\t\t\t" -(1137:4-1138:6) " {\n " --> (632:4-633:0) "\t{" -(1138:6-1138:12) " throw" --> (633:0-633:11) "\n\t\t\t\t\tthrow" -(1138:12-1138:19) " Error(" --> (633:11-633:17) " Error" -(1138:19-1138:92) " \"React.Children.only expected to receive a single React element child.\" " --> (633:17-633:89) "('React.Children.only expected to receive a single React element child.'" -(1138:92-1139:5) ");\n " --> (633:89-634:4) ");\n\t\t\t" -(1139:5-1140:3) "}\n " --> (634:4-635:3) "\t}\n\t\t" -(1140:3-1142:2) "}\n\n " --> (635:3-636:0) "\t}" -(1142:2-1142:9) " return" --> (636:0-636:10) "\n\t\t\treturn" -(1142:9-1143:1) " children;\n" --> (636:10-637:2) " children;\n\t" -(1143:1-1145:0) "}\n" --> (637:2-638:2) "\t}\n\t" -(1145:0-1145:9) "\nfunction" --> (638:2-638:11) "\tfunction" -(1145:9-1145:23) " createContext" --> (638:11-638:25) " createContext" -(1145:23-1145:37) "(defaultValue," --> (638:25-638:39) "(defaultValue," -(1145:37-1145:59) " calculateChangedBits)" --> (638:39-638:61) " calculateChangedBits)" -(1145:59-1146:2) " {\n " --> (638:61-639:0) " {" -(1146:2-1146:6) " if " --> (639:0-639:7) "\n\t\t\tif " -(1146:6-1146:31) "(calculateChangedBits ===" --> (639:7-639:32) "(calculateChangedBits ===" -(1146:31-1146:42) " undefined)" --> (639:32-639:43) " undefined)" -(1146:42-1147:4) " {\n " --> (639:43-640:0) " {" -(1147:4-1147:27) " calculateChangedBits =" --> (640:0-640:27) "\n\t\t\t\tcalculateChangedBits =" -(1147:27-1148:3) " null;\n " --> (640:27-641:3) " null;\n\t\t" -(1148:3-1148:9) "} else" --> (641:3-641:10) "\t} else" -(1148:9-1149:4) " {\n " --> (641:10-642:4) " {\n\t\t\t" -(1149:4-1150:6) " {\n " --> (642:4-643:0) "\t{" -(1150:6-1150:10) " if " --> (643:0-643:9) "\n\t\t\t\t\tif " -(1150:10-1150:35) "(calculateChangedBits !==" --> (643:9-643:34) "(calculateChangedBits !==" -(1150:35-1150:50) " null && typeof" --> (643:34-643:49) " null && typeof" -(1150:50-1150:75) " calculateChangedBits !==" --> (643:49-643:74) " calculateChangedBits !==" -(1150:75-1150:87) " 'function')" --> (643:74-643:86) " 'function')" -(1150:87-1151:8) " {\n " --> (643:86-644:0) " {" -(1151:8-1151:14) " error" --> (644:0-644:12) "\n\t\t\t\t\t\terror" -(1151:14-1151:80) "('createContext: Expected the optional second argument to be a ' +" --> (644:12-644:78) "('createContext: Expected the optional second argument to be a ' +" -(1151:80-1151:114) " 'function. Instead received: %s'," --> (644:78-644:112) " 'function. Instead received: %s'," -(1151:114-1151:135) " calculateChangedBits" --> (644:112-644:133) " calculateChangedBits" -(1151:135-1152:7) ");\n " --> (644:133-645:5) ");\n\t\t\t\t" -(1152:7-1153:5) "}\n " --> (645:5-646:4) "\t}\n\t\t\t" -(1153:5-1154:3) "}\n " --> (646:4-647:3) "\t}\n\t\t" -(1154:3-1156:2) "}\n\n " --> (647:3-648:3) "\t}\n\t\t" -(1156:2-1156:6) " var" --> (648:3-648:7) "\tvar" -(1156:6-1156:16) " context =" --> (648:7-648:17) " context =" -(1156:16-1157:4) " {\n " --> (648:17-649:4) " {\n\t\t\t" -(1157:4-1157:14) " $$typeof:" --> (649:4-649:14) "\t$$typeof:" -(1157:14-1158:4) " REACT_CONTEXT_TYPE,\n " --> (649:14-650:4) " REACT_CONTEXT_TYPE,\n\t\t\t" -(1158:4-1158:27) " _calculateChangedBits:" --> (650:4-650:27) "\t_calculateChangedBits:" -(1158:27-1164:4) " calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n " --> (650:27-651:4) " calculateChangedBits,\n\t\t\t" -(1164:4-1164:19) " _currentValue:" --> (651:4-651:19) "\t_currentValue:" -(1164:19-1165:4) " defaultValue,\n " --> (651:19-652:4) " defaultValue,\n\t\t\t" -(1165:4-1165:20) " _currentValue2:" --> (652:4-652:20) "\t_currentValue2:" -(1165:20-1168:4) " defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n " --> (652:20-653:4) " defaultValue,\n\t\t\t" -(1168:4-1168:18) " _threadCount:" --> (653:4-653:18) "\t_threadCount:" -(1168:18-1170:4) " 0,\n // These are circular\n " --> (653:18-654:4) " 0,\n\t\t\t" -(1170:4-1170:14) " Provider:" --> (654:4-654:14) "\tProvider:" -(1170:14-1171:4) " null,\n " --> (654:14-655:4) " null,\n\t\t\t" -(1171:4-1171:14) " Consumer:" --> (655:4-655:14) "\tConsumer:" -(1171:14-1172:3) " null\n " --> (655:14-656:3) " null\n\t\t" -(1172:3-1173:2) "};\n " --> (656:3-657:0) "\t};" -(1173:2-1173:10) " context" --> (657:0-657:11) "\n\t\t\tcontext" -(1173:10-1173:21) ".Provider =" --> (657:11-657:22) ".Provider =" -(1173:21-1174:4) " {\n " --> (657:22-658:4) " {\n\t\t\t" -(1174:4-1174:14) " $$typeof:" --> (658:4-658:14) "\t$$typeof:" -(1174:14-1175:4) " REACT_PROVIDER_TYPE,\n " --> (658:14-659:4) " REACT_PROVIDER_TYPE,\n\t\t\t" -(1175:4-1175:14) " _context:" --> (659:4-659:14) "\t_context:" -(1175:14-1176:3) " context\n " --> (659:14-660:3) " context\n\t\t" -(1176:3-1177:2) "};\n " --> (660:3-661:3) "\t};\n\t\t" -(1177:2-1177:6) " var" --> (661:3-661:7) "\tvar" -(1177:6-1177:50) " hasWarnedAboutUsingNestedContextConsumers =" --> (661:7-661:51) " hasWarnedAboutUsingNestedContextConsumers =" -(1177:50-1178:2) " false;\n " --> (661:51-662:3) " false;\n\t\t" -(1178:2-1178:6) " var" --> (662:3-662:7) "\tvar" -(1178:6-1178:44) " hasWarnedAboutUsingConsumerProvider =" --> (662:7-662:45) " hasWarnedAboutUsingConsumerProvider =" -(1178:44-1179:2) " false;\n " --> (662:45-663:3) " false;\n\t\t" -(1179:2-1179:6) " var" --> (663:3-663:7) "\tvar" -(1179:6-1179:44) " hasWarnedAboutDisplayNameOnConsumer =" --> (663:7-663:45) " hasWarnedAboutDisplayNameOnConsumer =" -(1179:44-1181:2) " false;\n\n " --> (663:45-664:3) " false;\n\t\t" -(1181:2-1185:4) " {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n " --> (664:3-665:4) "\t{\n\t\t\t" -(1185:4-1185:8) " var" --> (665:4-665:8) "\tvar" -(1185:8-1185:19) " Consumer =" --> (665:8-665:19) " Consumer =" -(1185:19-1186:6) " {\n " --> (665:19-666:5) " {\n\t\t\t\t" -(1186:6-1186:16) " $$typeof:" --> (666:5-666:15) "\t$$typeof:" -(1186:16-1187:6) " REACT_CONTEXT_TYPE,\n " --> (666:15-667:5) " REACT_CONTEXT_TYPE,\n\t\t\t\t" -(1187:6-1187:16) " _context:" --> (667:5-667:15) "\t_context:" -(1187:16-1188:6) " context,\n " --> (667:15-668:5) " context,\n\t\t\t\t" -(1188:6-1188:29) " _calculateChangedBits:" --> (668:5-668:28) "\t_calculateChangedBits:" -(1188:29-1188:37) " context" --> (668:28-668:36) " context" -(1188:37-1189:5) "._calculateChangedBits\n " --> (668:36-669:4) "._calculateChangedBits\n\t\t\t" -(1189:5-1191:4) "}; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n " --> (669:4-670:0) "\t};" -(1191:4-1191:11) " Object" --> (670:0-670:11) "\n\t\t\t\tObject" -(1191:11-1191:28) ".defineProperties" --> (670:11-670:28) ".defineProperties" -(1191:28-1191:38) "(Consumer," --> (670:28-670:38) "(Consumer," -(1191:38-1192:6) " {\n " --> (670:38-671:5) " {\n\t\t\t\t" -(1192:6-1192:16) " Provider:" --> (671:5-671:15) "\tProvider:" -(1192:16-1193:8) " {\n " --> (671:15-672:6) " {\n\t\t\t\t\t" -(1193:8-1193:13) " get:" --> (672:6-672:11) "\tget:" -(1193:13-1193:25) " function ()" --> (672:11-672:22) " function()" -(1193:25-1194:10) " {\n " --> (672:22-673:0) " {" -(1194:10-1194:15) " if (" --> (673:0-673:12) "\n\t\t\t\t\t\t\tif (" -(1194:15-1194:52) "!hasWarnedAboutUsingConsumerProvider)" --> (673:12-673:49) "!hasWarnedAboutUsingConsumerProvider)" -(1194:52-1195:12) " {\n " --> (673:49-674:0) " {" -(1195:12-1195:50) " hasWarnedAboutUsingConsumerProvider =" --> (674:0-674:46) "\n\t\t\t\t\t\t\t\thasWarnedAboutUsingConsumerProvider =" -(1195:50-1197:12) " true;\n\n " --> (674:46-675:0) " true;" -(1197:12-1197:18) " error" --> (675:0-675:14) "\n\t\t\t\t\t\t\t\terror" -(1197:18-1197:101) "('Rendering is not supported and will be removed in ' +" --> (675:14-675:97) "('Rendering is not supported and will be removed in ' +" -(1197:101-1197:178) " 'a future major release. Did you mean to render instead?'" --> (675:97-675:174) " 'a future major release. Did you mean to render instead?'" -(1197:178-1198:11) ");\n " --> (675:174-676:7) ");\n\t\t\t\t\t\t" -(1198:11-1200:10) "}\n\n " --> (676:7-677:0) "\t}" -(1200:10-1200:17) " return" --> (677:0-677:14) "\n\t\t\t\t\t\t\treturn" -(1200:17-1200:25) " context" --> (677:14-677:22) " context" -(1200:25-1201:9) ".Provider;\n " --> (677:22-678:6) ".Provider;\n\t\t\t\t\t" -(1201:9-1202:8) "},\n " --> (678:6-679:6) "\t},\n\t\t\t\t\t" -(1202:8-1202:13) " set:" --> (679:6-679:11) "\tset:" -(1202:13-1202:23) " function " --> (679:11-679:20) " function" -(1202:23-1202:34) "(_Provider)" --> (679:20-679:31) "(_Provider)" -(1202:34-1203:10) " {\n " --> (679:31-680:0) " {" -(1203:10-1203:18) " context" --> (680:0-680:15) "\n\t\t\t\t\t\t\tcontext" -(1203:18-1203:29) ".Provider =" --> (680:15-680:26) ".Provider =" -(1203:29-1204:9) " _Provider;\n " --> (680:26-681:6) " _Provider;\n\t\t\t\t\t" -(1204:9-1205:7) "}\n " --> (681:6-682:5) "\t}\n\t\t\t\t" -(1205:7-1206:6) "},\n " --> (682:5-683:5) "\t},\n\t\t\t\t" -(1206:6-1206:21) " _currentValue:" --> (683:5-683:20) "\t_currentValue:" -(1206:21-1207:8) " {\n " --> (683:20-684:6) " {\n\t\t\t\t\t" -(1207:8-1207:13) " get:" --> (684:6-684:11) "\tget:" -(1207:13-1207:25) " function ()" --> (684:11-684:22) " function()" -(1207:25-1208:10) " {\n " --> (684:22-685:0) " {" -(1208:10-1208:17) " return" --> (685:0-685:14) "\n\t\t\t\t\t\t\treturn" -(1208:17-1208:25) " context" --> (685:14-685:22) " context" -(1208:25-1209:9) "._currentValue;\n " --> (685:22-686:6) "._currentValue;\n\t\t\t\t\t" -(1209:9-1210:8) "},\n " --> (686:6-687:6) "\t},\n\t\t\t\t\t" -(1210:8-1210:13) " set:" --> (687:6-687:11) "\tset:" -(1210:13-1210:23) " function " --> (687:11-687:20) " function" -(1210:23-1210:38) "(_currentValue)" --> (687:20-687:35) "(_currentValue)" -(1210:38-1211:10) " {\n " --> (687:35-688:0) " {" -(1211:10-1211:18) " context" --> (688:0-688:15) "\n\t\t\t\t\t\t\tcontext" -(1211:18-1211:34) "._currentValue =" --> (688:15-688:31) "._currentValue =" -(1211:34-1212:9) " _currentValue;\n " --> (688:31-689:6) " _currentValue;\n\t\t\t\t\t" -(1212:9-1213:7) "}\n " --> (689:6-690:5) "\t}\n\t\t\t\t" -(1213:7-1214:6) "},\n " --> (690:5-691:5) "\t},\n\t\t\t\t" -(1214:6-1214:22) " _currentValue2:" --> (691:5-691:21) "\t_currentValue2:" -(1214:22-1215:8) " {\n " --> (691:21-692:6) " {\n\t\t\t\t\t" -(1215:8-1215:13) " get:" --> (692:6-692:11) "\tget:" -(1215:13-1215:25) " function ()" --> (692:11-692:22) " function()" -(1215:25-1216:10) " {\n " --> (692:22-693:0) " {" -(1216:10-1216:17) " return" --> (693:0-693:14) "\n\t\t\t\t\t\t\treturn" -(1216:17-1216:25) " context" --> (693:14-693:22) " context" -(1216:25-1217:9) "._currentValue2;\n " --> (693:22-694:6) "._currentValue2;\n\t\t\t\t\t" -(1217:9-1218:8) "},\n " --> (694:6-695:6) "\t},\n\t\t\t\t\t" -(1218:8-1218:13) " set:" --> (695:6-695:11) "\tset:" -(1218:13-1218:23) " function " --> (695:11-695:20) " function" -(1218:23-1218:39) "(_currentValue2)" --> (695:20-695:36) "(_currentValue2)" -(1218:39-1219:10) " {\n " --> (695:36-696:0) " {" -(1219:10-1219:18) " context" --> (696:0-696:15) "\n\t\t\t\t\t\t\tcontext" -(1219:18-1219:35) "._currentValue2 =" --> (696:15-696:32) "._currentValue2 =" -(1219:35-1220:9) " _currentValue2;\n " --> (696:32-697:6) " _currentValue2;\n\t\t\t\t\t" -(1220:9-1221:7) "}\n " --> (697:6-698:5) "\t}\n\t\t\t\t" -(1221:7-1222:6) "},\n " --> (698:5-699:5) "\t},\n\t\t\t\t" -(1222:6-1222:20) " _threadCount:" --> (699:5-699:19) "\t_threadCount:" -(1222:20-1223:8) " {\n " --> (699:19-700:6) " {\n\t\t\t\t\t" -(1223:8-1223:13) " get:" --> (700:6-700:11) "\tget:" -(1223:13-1223:25) " function ()" --> (700:11-700:22) " function()" -(1223:25-1224:10) " {\n " --> (700:22-701:0) " {" -(1224:10-1224:17) " return" --> (701:0-701:14) "\n\t\t\t\t\t\t\treturn" -(1224:17-1224:25) " context" --> (701:14-701:22) " context" -(1224:25-1225:9) "._threadCount;\n " --> (701:22-702:6) "._threadCount;\n\t\t\t\t\t" -(1225:9-1226:8) "},\n " --> (702:6-703:6) "\t},\n\t\t\t\t\t" -(1226:8-1226:13) " set:" --> (703:6-703:11) "\tset:" -(1226:13-1226:23) " function " --> (703:11-703:20) " function" -(1226:23-1226:37) "(_threadCount)" --> (703:20-703:34) "(_threadCount)" -(1226:37-1227:10) " {\n " --> (703:34-704:0) " {" -(1227:10-1227:18) " context" --> (704:0-704:15) "\n\t\t\t\t\t\t\tcontext" -(1227:18-1227:33) "._threadCount =" --> (704:15-704:30) "._threadCount =" -(1227:33-1228:9) " _threadCount;\n " --> (704:30-705:6) " _threadCount;\n\t\t\t\t\t" -(1228:9-1229:7) "}\n " --> (705:6-706:5) "\t}\n\t\t\t\t" -(1229:7-1230:6) "},\n " --> (706:5-707:5) "\t},\n\t\t\t\t" -(1230:6-1230:16) " Consumer:" --> (707:5-707:15) "\tConsumer:" -(1230:16-1231:8) " {\n " --> (707:15-707:16) " " -(1231:8-1231:13) " get:" --> (707:16-707:21) "{get:" -(1231:13-1231:25) " function ()" --> (707:21-707:32) " function()" -(1231:25-1232:10) " {\n " --> (707:32-708:0) " {" -(1232:10-1232:15) " if (" --> (708:0-708:11) "\n\t\t\t\t\t\tif (" -(1232:15-1232:58) "!hasWarnedAboutUsingNestedContextConsumers)" --> (708:11-708:54) "!hasWarnedAboutUsingNestedContextConsumers)" -(1232:58-1233:12) " {\n " --> (708:54-709:0) " {" -(1233:12-1233:56) " hasWarnedAboutUsingNestedContextConsumers =" --> (709:0-709:51) "\n\t\t\t\t\t\t\thasWarnedAboutUsingNestedContextConsumers =" -(1233:56-1235:12) " true;\n\n " --> (709:51-710:0) " true;" -(1235:12-1235:18) " error" --> (710:0-710:13) "\n\t\t\t\t\t\t\terror" -(1235:18-1235:101) "('Rendering is not supported and will be removed in ' +" --> (710:13-710:96) "('Rendering is not supported and will be removed in ' +" -(1235:101-1235:178) " 'a future major release. Did you mean to render instead?'" --> (710:96-710:173) " 'a future major release. Did you mean to render instead?'" -(1235:178-1236:11) ");\n " --> (710:173-711:6) ");\n\t\t\t\t\t" -(1236:11-1238:10) "}\n\n " --> (711:6-712:0) "\t}" -(1238:10-1238:17) " return" --> (712:0-712:13) "\n\t\t\t\t\t\treturn" -(1238:17-1238:25) " context" --> (712:13-712:21) " context" -(1238:25-1239:9) ".Consumer;\n " --> (712:21-713:5) ".Consumer;\n\t\t\t\t" -(1239:9-1240:7) "}\n " --> (713:5-713:6) "\t" -(1240:7-1241:6) "},\n " --> (713:6-714:5) "}},\n\t\t\t\t" -(1241:6-1241:19) " displayName:" --> (714:5-714:18) "\tdisplayName:" -(1241:19-1242:8) " {\n " --> (714:18-715:6) " {\n\t\t\t\t\t" -(1242:8-1242:13) " get:" --> (715:6-715:11) "\tget:" -(1242:13-1242:25) " function ()" --> (715:11-715:22) " function()" -(1242:25-1243:10) " {\n " --> (715:22-716:0) " {" -(1243:10-1243:17) " return" --> (716:0-716:14) "\n\t\t\t\t\t\t\treturn" -(1243:17-1243:25) " context" --> (716:14-716:22) " context" -(1243:25-1244:9) ".displayName;\n " --> (716:22-717:6) ".displayName;\n\t\t\t\t\t" -(1244:9-1245:8) "},\n " --> (717:6-718:6) "\t},\n\t\t\t\t\t" -(1245:8-1245:13) " set:" --> (718:6-718:11) "\tset:" -(1245:13-1245:23) " function " --> (718:11-718:20) " function" -(1245:23-1245:36) "(displayName)" --> (718:20-718:33) "(displayName)" -(1245:36-1246:10) " {\n " --> (718:33-719:0) " {" -(1246:10-1246:15) " if (" --> (719:0-719:12) "\n\t\t\t\t\t\t\tif (" -(1246:15-1246:52) "!hasWarnedAboutDisplayNameOnConsumer)" --> (719:12-719:49) "!hasWarnedAboutDisplayNameOnConsumer)" -(1246:52-1247:12) " {\n " --> (719:49-720:0) " {" -(1247:12-1247:17) " warn" --> (720:0-720:13) "\n\t\t\t\t\t\t\t\twarn" -(1247:17-1247:79) "('Setting `displayName` on Context.Consumer has no effect. ' +" --> (720:13-720:75) "('Setting `displayName` on Context.Consumer has no effect. ' +" -(1247:79-1247:157) " \"You should set it directly on the context with Context.displayName = '%s'.\"," --> (720:75-720:153) " \"You should set it directly on the context with Context.displayName = '%s'.\"," -(1247:157-1247:169) " displayName" --> (720:153-720:165) " displayName" -(1247:169-1249:12) ");\n\n " --> (720:165-721:0) ");" -(1249:12-1249:50) " hasWarnedAboutDisplayNameOnConsumer =" --> (721:0-721:46) "\n\t\t\t\t\t\t\t\thasWarnedAboutDisplayNameOnConsumer =" -(1249:50-1250:11) " true;\n " --> (721:46-722:7) " true;\n\t\t\t\t\t\t" -(1250:11-1251:9) "}\n " --> (722:7-723:6) "\t}\n\t\t\t\t\t" -(1251:9-1252:7) "}\n " --> (723:6-724:5) "\t}\n\t\t\t\t" -(1252:7-1253:5) "}\n " --> (724:5-725:4) "\t}\n\t\t\t" -(1253:5-1253:6) "}" --> (725:4-725:6) "\t}" -(1253:6-1255:4) "); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n " --> (725:6-726:0) ");" -(1255:4-1255:12) " context" --> (726:0-726:12) "\n\t\t\t\tcontext" -(1255:12-1255:23) ".Consumer =" --> (726:12-726:23) ".Consumer =" -(1255:23-1256:3) " Consumer;\n " --> (726:23-727:3) " Consumer;\n\t\t" -(1256:3-1258:2) "}\n\n " --> (727:3-728:3) "\t}\n\t\t" -(1258:2-1259:4) " {\n " --> (728:3-729:0) "\t{" -(1259:4-1259:12) " context" --> (729:0-729:12) "\n\t\t\t\tcontext" -(1259:12-1259:31) "._currentRenderer =" --> (729:12-729:31) "._currentRenderer =" -(1259:31-1260:4) " null;\n " --> (729:31-730:0) " null;" -(1260:4-1260:12) " context" --> (730:0-730:12) "\n\t\t\t\tcontext" -(1260:12-1260:32) "._currentRenderer2 =" --> (730:12-730:32) "._currentRenderer2 =" -(1260:32-1261:3) " null;\n " --> (730:32-731:3) " null;\n\t\t" -(1261:3-1263:2) "}\n\n " --> (731:3-732:0) "\t}" -(1263:2-1263:9) " return" --> (732:0-732:10) "\n\t\t\treturn" -(1263:9-1264:1) " context;\n" --> (732:10-733:2) " context;\n\t" -(1264:1-1266:0) "}\n" --> (733:2-734:2) "\t}\n\t" -(1266:0-1266:4) "\nvar" --> (734:2-734:6) "\tvar" -(1266:4-1266:21) " Uninitialized = " --> (734:6-734:23) " Uninitialized = " -(1266:21-1267:0) "-1;" --> (734:23-735:2) "-1;\n\t" -(1267:0-1267:4) "\nvar" --> (735:2-735:6) "\tvar" -(1267:4-1267:14) " Pending =" --> (735:6-735:16) " Pending =" -(1267:14-1268:0) " 0;" --> (735:16-736:2) " 0;\n\t" -(1268:0-1268:4) "\nvar" --> (736:2-736:6) "\tvar" -(1268:4-1268:15) " Resolved =" --> (736:6-736:17) " Resolved =" -(1268:15-1269:0) " 1;" --> (736:17-737:2) " 1;\n\t" -(1269:0-1269:4) "\nvar" --> (737:2-737:6) "\tvar" -(1269:4-1269:15) " Rejected =" --> (737:6-737:17) " Rejected =" -(1269:15-1271:0) " 2;\n" --> (737:17-738:2) " 2;\n\t" -(1271:0-1271:9) "\nfunction" --> (738:2-738:11) "\tfunction" -(1271:9-1271:25) " lazyInitializer" --> (738:11-738:27) " lazyInitializer" -(1271:25-1271:34) "(payload)" --> (738:27-738:36) "(payload)" -(1271:34-1272:2) " {\n " --> (738:36-739:0) " {" -(1272:2-1272:6) " if " --> (739:0-739:7) "\n\t\t\tif " -(1272:6-1272:14) "(payload" --> (739:7-739:15) "(payload" -(1272:14-1272:26) "._status ===" --> (739:15-739:27) "._status ===" -(1272:26-1272:41) " Uninitialized)" --> (739:27-739:42) " Uninitialized)" -(1272:41-1273:4) " {\n " --> (739:42-740:4) " {\n\t\t\t" -(1273:4-1273:8) " var" --> (740:4-740:8) "\tvar" -(1273:8-1273:15) " ctor =" --> (740:8-740:15) " ctor =" -(1273:15-1273:23) " payload" --> (740:15-740:23) " payload" -(1273:23-1274:4) "._result;\n " --> (740:23-741:4) "._result;\n\t\t\t" -(1274:4-1274:8) " var" --> (741:4-741:8) "\tvar" -(1274:8-1274:19) " thenable =" --> (741:8-741:19) " thenable =" -(1274:19-1274:25) " ctor(" --> (741:19-741:25) " ctor(" -(1274:25-1276:4) "); // Transition to the next state.\n\n " --> (741:25-742:4) ");\n\t\t\t" -(1276:4-1276:8) " var" --> (742:4-742:8) "\tvar" -(1276:8-1276:18) " pending =" --> (742:8-742:18) " pending =" -(1276:18-1277:4) " payload;\n " --> (742:18-743:0) " payload;" -(1277:4-1277:12) " pending" --> (743:0-743:12) "\n\t\t\t\tpending" -(1277:12-1277:22) "._status =" --> (743:12-743:22) "._status =" -(1277:22-1278:4) " Pending;\n " --> (743:22-744:0) " Pending;" -(1278:4-1278:12) " pending" --> (744:0-744:12) "\n\t\t\t\tpending" -(1278:12-1278:22) "._result =" --> (744:12-744:22) "._result =" -(1278:22-1279:4) " thenable;\n " --> (744:22-745:0) " thenable;" -(1279:4-1279:13) " thenable" --> (745:0-745:13) "\n\t\t\t\tthenable" -(1279:13-1279:18) ".then" --> (745:13-745:18) ".then" -(1279:18-1279:28) "(function " --> (745:18-745:27) "(function" -(1279:28-1279:42) "(moduleObject)" --> (745:27-745:41) "(moduleObject)" -(1279:42-1280:6) " {\n " --> (745:41-746:0) " {" -(1280:6-1280:10) " if " --> (746:0-746:9) "\n\t\t\t\t\tif " -(1280:10-1280:18) "(payload" --> (746:9-746:17) "(payload" -(1280:18-1280:30) "._status ===" --> (746:17-746:29) "._status ===" -(1280:30-1280:39) " Pending)" --> (746:29-746:38) " Pending)" -(1280:39-1281:8) " {\n " --> (746:38-747:6) " {\n\t\t\t\t\t" -(1281:8-1281:12) " var" --> (747:6-747:10) "\tvar" -(1281:12-1281:28) " defaultExport =" --> (747:10-747:26) " defaultExport =" -(1281:28-1281:41) " moduleObject" --> (747:26-747:39) " moduleObject" -(1281:41-1283:8) ".default;\n\n " --> (747:39-748:6) ".default;\n\t\t\t\t\t" -(1283:8-1284:10) " {\n " --> (748:6-749:0) "\t{" -(1284:10-1284:14) " if " --> (749:0-749:11) "\n\t\t\t\t\t\t\tif " -(1284:14-1284:32) "(defaultExport ===" --> (749:11-749:29) "(defaultExport ===" -(1284:32-1284:43) " undefined)" --> (749:29-749:40) " undefined)" -(1284:43-1285:12) " {\n " --> (749:40-750:0) " {" -(1285:12-1285:18) " error" --> (750:0-750:14) "\n\t\t\t\t\t\t\t\terror" -(1285:18-1285:77) "('lazy: Expected the result of a dynamic import() call. ' +" --> (750:14-750:73) "('lazy: Expected the result of a dynamic import() call. ' +" -(1285:77-1286:12) " 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n " --> (750:73-750:134) " 'Instead received: %s\\n\\nYour code should look like: \\n ' +" -(1286:12-1286:51) " 'const MyComponent = lazy(() => imp' +" --> (750:134-750:173) " 'const MyComponent = lazy(() => imp' +" -(1286:51-1286:76) " \"ort('./MyComponent'))\"," --> (750:173-750:198) " \"ort('./MyComponent'))\"," -(1286:76-1286:89) " moduleObject" --> (750:198-750:211) " moduleObject" -(1286:89-1287:11) ");\n " --> (750:211-751:7) ");\n\t\t\t\t\t\t" -(1287:11-1288:9) "}\n " --> (751:7-752:6) "\t}\n\t\t\t\t\t" -(1288:9-1291:8) "} // Transition to the next state.\n\n\n " --> (752:6-753:6) "\t}\n\t\t\t\t\t" -(1291:8-1291:12) " var" --> (753:6-753:10) "\tvar" -(1291:12-1291:23) " resolved =" --> (753:10-753:21) " resolved =" -(1291:23-1292:8) " payload;\n " --> (753:21-754:0) " payload;" -(1292:8-1292:17) " resolved" --> (754:0-754:15) "\n\t\t\t\t\t\tresolved" -(1292:17-1292:27) "._status =" --> (754:15-754:25) "._status =" -(1292:27-1293:8) " Resolved;\n " --> (754:25-755:0) " Resolved;" -(1293:8-1293:17) " resolved" --> (755:0-755:15) "\n\t\t\t\t\t\tresolved" -(1293:17-1293:27) "._result =" --> (755:15-755:25) "._result =" -(1293:27-1294:7) " defaultExport;\n " --> (755:25-756:5) " defaultExport;\n\t\t\t\t" -(1294:7-1295:5) "}\n " --> (756:5-757:4) "\t}\n\t\t\t" -(1295:5-1295:7) "}," --> (757:4-757:7) "\t}," -(1295:7-1295:17) " function " --> (757:7-757:16) " function" -(1295:17-1295:24) "(error)" --> (757:16-757:23) "(error)" -(1295:24-1296:6) " {\n " --> (757:23-758:0) " {" -(1296:6-1296:10) " if " --> (758:0-758:9) "\n\t\t\t\t\tif " -(1296:10-1296:18) "(payload" --> (758:9-758:17) "(payload" -(1296:18-1296:30) "._status ===" --> (758:17-758:29) "._status ===" -(1296:30-1296:39) " Pending)" --> (758:29-758:38) " Pending)" -(1296:39-1298:8) " {\n // Transition to the next state.\n " --> (758:38-759:6) " {\n\t\t\t\t\t" -(1298:8-1298:12) " var" --> (759:6-759:10) "\tvar" -(1298:12-1298:23) " rejected =" --> (759:10-759:21) " rejected =" -(1298:23-1299:8) " payload;\n " --> (759:21-760:0) " payload;" -(1299:8-1299:17) " rejected" --> (760:0-760:15) "\n\t\t\t\t\t\trejected" -(1299:17-1299:27) "._status =" --> (760:15-760:25) "._status =" -(1299:27-1300:8) " Rejected;\n " --> (760:25-761:0) " Rejected;" -(1300:8-1300:17) " rejected" --> (761:0-761:15) "\n\t\t\t\t\t\trejected" -(1300:17-1300:27) "._result =" --> (761:15-761:25) "._result =" -(1300:27-1301:7) " error;\n " --> (761:25-762:5) " error;\n\t\t\t\t" -(1301:7-1302:5) "}\n " --> (762:5-763:4) "\t}\n\t\t\t" -(1302:5-1302:6) "}" --> (763:4-763:6) "\t}" -(1302:6-1303:3) ");\n " --> (763:6-764:3) ");\n\t\t" -(1303:3-1305:2) "}\n\n " --> (764:3-765:0) "\t}" -(1305:2-1305:6) " if " --> (765:0-765:7) "\n\t\t\tif " -(1305:6-1305:14) "(payload" --> (765:7-765:15) "(payload" -(1305:14-1305:26) "._status ===" --> (765:15-765:27) "._status ===" -(1305:26-1305:36) " Resolved)" --> (765:27-765:37) " Resolved)" -(1305:36-1306:4) " {\n " --> (765:37-766:0) " {" -(1306:4-1306:11) " return" --> (766:0-766:11) "\n\t\t\t\treturn" -(1306:11-1306:19) " payload" --> (766:11-766:19) " payload" -(1306:19-1307:3) "._result;\n " --> (766:19-767:3) "._result;\n\t\t" -(1307:3-1307:9) "} else" --> (767:3-767:10) "\t} else" -(1307:9-1308:4) " {\n " --> (767:10-768:0) " {" -(1308:4-1308:10) " throw" --> (768:0-768:10) "\n\t\t\t\tthrow" -(1308:10-1308:18) " payload" --> (768:10-768:18) " payload" -(1308:18-1309:3) "._result;\n " --> (768:18-769:3) "._result;\n\t\t" -(1309:3-1310:1) "}\n" --> (769:3-770:2) "\t}\n\t" -(1310:1-1312:0) "}\n" --> (770:2-771:2) "\t}\n\t" -(1312:0-1312:9) "\nfunction" --> (771:2-771:11) "\tfunction" -(1312:9-1312:14) " lazy" --> (771:11-771:16) " lazy" -(1312:14-1312:20) "(ctor)" --> (771:16-771:22) "(ctor)" -(1312:20-1313:2) " {\n " --> (771:22-772:3) " {\n\t\t" -(1313:2-1313:6) " var" --> (772:3-772:7) "\tvar" -(1313:6-1313:16) " payload =" --> (772:7-772:17) " payload =" -(1313:16-1315:4) " {\n // We use these fields to store the result.\n " --> (772:17-773:4) " {\n\t\t\t" -(1315:4-1315:14) " _status: " --> (773:4-773:14) "\t_status: " -(1315:14-1316:4) "-1,\n " --> (773:14-774:4) "-1,\n\t\t\t" -(1316:4-1316:13) " _result:" --> (774:4-774:13) "\t_result:" -(1316:13-1317:3) " ctor\n " --> (774:13-775:3) " ctor\n\t\t" -(1317:3-1318:2) "};\n " --> (775:3-776:3) "\t};\n\t\t" -(1318:2-1318:6) " var" --> (776:3-776:7) "\tvar" -(1318:6-1318:17) " lazyType =" --> (776:7-776:18) " lazyType =" -(1318:17-1319:4) " {\n " --> (776:18-777:4) " {\n\t\t\t" -(1319:4-1319:14) " $$typeof:" --> (777:4-777:14) "\t$$typeof:" -(1319:14-1320:4) " REACT_LAZY_TYPE,\n " --> (777:14-778:4) " REACT_LAZY_TYPE,\n\t\t\t" -(1320:4-1320:14) " _payload:" --> (778:4-778:14) "\t_payload:" -(1320:14-1321:4) " payload,\n " --> (778:14-779:4) " payload,\n\t\t\t" -(1321:4-1321:11) " _init:" --> (779:4-779:11) "\t_init:" -(1321:11-1322:3) " lazyInitializer\n " --> (779:11-780:3) " lazyInitializer\n\t\t" -(1322:3-1324:2) "};\n\n " --> (780:3-781:3) "\t};\n\t\t" -(1324:2-1326:4) " {\n // In production, this would just set it on the object.\n " --> (781:3-782:4) "\t{\n\t\t\t" -(1326:4-1326:8) " var" --> (782:4-782:8) "\tvar" -(1326:8-1327:4) " defaultProps;\n " --> (782:8-783:4) " defaultProps;\n\t\t\t" -(1327:4-1327:8) " var" --> (783:4-783:8) "\tvar" -(1327:8-1329:4) " propTypes; // $FlowFixMe\n\n " --> (783:8-784:0) " propTypes;" -(1329:4-1329:11) " Object" --> (784:0-784:11) "\n\t\t\t\tObject" -(1329:11-1329:28) ".defineProperties" --> (784:11-784:28) ".defineProperties" -(1329:28-1329:38) "(lazyType," --> (784:28-784:38) "(lazyType," -(1329:38-1330:6) " {\n " --> (784:38-785:5) " {\n\t\t\t\t" -(1330:6-1330:20) " defaultProps:" --> (785:5-785:19) "\tdefaultProps:" -(1330:20-1331:8) " {\n " --> (785:19-786:6) " {\n\t\t\t\t\t" -(1331:8-1331:22) " configurable:" --> (786:6-786:20) "\tconfigurable:" -(1331:22-1332:8) " true,\n " --> (786:20-787:6) " true,\n\t\t\t\t\t" -(1332:8-1332:13) " get:" --> (787:6-787:11) "\tget:" -(1332:13-1332:25) " function ()" --> (787:11-787:22) " function()" -(1332:25-1333:10) " {\n " --> (787:22-788:0) " {" -(1333:10-1333:17) " return" --> (788:0-788:14) "\n\t\t\t\t\t\t\treturn" -(1333:17-1334:9) " defaultProps;\n " --> (788:14-789:6) " defaultProps;\n\t\t\t\t\t" -(1334:9-1335:8) "},\n " --> (789:6-790:6) "\t},\n\t\t\t\t\t" -(1335:8-1335:13) " set:" --> (790:6-790:11) "\tset:" -(1335:13-1335:23) " function " --> (790:11-790:20) " function" -(1335:23-1335:40) "(newDefaultProps)" --> (790:20-790:37) "(newDefaultProps)" -(1335:40-1336:10) " {\n " --> (790:37-791:0) " {" -(1336:10-1336:16) " error" --> (791:0-791:13) "\n\t\t\t\t\t\t\terror" -(1336:16-1336:86) "('React.lazy(...): It is not supported to assign `defaultProps` to ' +" --> (791:13-791:83) "('React.lazy(...): It is not supported to assign `defaultProps` to ' +" -(1336:86-1336:156) " 'a lazy component import. Either specify them where the component ' +" --> (791:83-791:153) " 'a lazy component import. Either specify them where the component ' +" -(1336:156-1336:212) " 'is defined, or create a wrapping component around it.'" --> (791:153-791:209) " 'is defined, or create a wrapping component around it.'" -(1336:212-1338:10) ");\n\n " --> (791:209-792:0) ");" -(1338:10-1338:25) " defaultProps =" --> (792:0-792:22) "\n\t\t\t\t\t\t\tdefaultProps =" -(1338:25-1341:10) " newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n " --> (792:22-793:0) " newDefaultProps;" -(1341:10-1341:17) " Object" --> (793:0-793:14) "\n\t\t\t\t\t\t\tObject" -(1341:17-1341:32) ".defineProperty" --> (793:14-793:29) ".defineProperty" -(1341:32-1341:42) "(lazyType," --> (793:29-793:39) "(lazyType," -(1341:42-1341:58) " 'defaultProps'," --> (793:39-793:55) " 'defaultProps'," -(1341:58-1342:12) " {\n " --> (793:55-793:56) " " -(1342:12-1342:24) " enumerable:" --> (793:56-793:68) "{enumerable:" -(1342:24-1343:11) " true\n " --> (793:68-793:72) " tru" -(1343:11-1343:12) "}" --> (793:72-793:74) "e}" -(1343:12-1344:9) ");\n " --> (793:74-794:6) ");\n\t\t\t\t\t" -(1344:9-1345:7) "}\n " --> (794:6-795:5) "\t}\n\t\t\t\t" -(1345:7-1346:6) "},\n " --> (795:5-796:5) "\t},\n\t\t\t\t" -(1346:6-1346:17) " propTypes:" --> (796:5-796:16) "\tpropTypes:" -(1346:17-1347:8) " {\n " --> (796:16-797:6) " {\n\t\t\t\t\t" -(1347:8-1347:22) " configurable:" --> (797:6-797:20) "\tconfigurable:" -(1347:22-1348:8) " true,\n " --> (797:20-798:6) " true,\n\t\t\t\t\t" -(1348:8-1348:13) " get:" --> (798:6-798:11) "\tget:" -(1348:13-1348:25) " function ()" --> (798:11-798:22) " function()" -(1348:25-1349:10) " {\n " --> (798:22-799:0) " {" -(1349:10-1349:17) " return" --> (799:0-799:14) "\n\t\t\t\t\t\t\treturn" -(1349:17-1350:9) " propTypes;\n " --> (799:14-800:6) " propTypes;\n\t\t\t\t\t" -(1350:9-1351:8) "},\n " --> (800:6-801:6) "\t},\n\t\t\t\t\t" -(1351:8-1351:13) " set:" --> (801:6-801:11) "\tset:" -(1351:13-1351:23) " function " --> (801:11-801:20) " function" -(1351:23-1351:37) "(newPropTypes)" --> (801:20-801:34) "(newPropTypes)" -(1351:37-1352:10) " {\n " --> (801:34-802:0) " {" -(1352:10-1352:16) " error" --> (802:0-802:13) "\n\t\t\t\t\t\t\terror" -(1352:16-1352:83) "('React.lazy(...): It is not supported to assign `propTypes` to ' +" --> (802:13-802:80) "('React.lazy(...): It is not supported to assign `propTypes` to ' +" -(1352:83-1352:153) " 'a lazy component import. Either specify them where the component ' +" --> (802:80-802:150) " 'a lazy component import. Either specify them where the component ' +" -(1352:153-1352:209) " 'is defined, or create a wrapping component around it.'" --> (802:150-802:206) " 'is defined, or create a wrapping component around it.'" -(1352:209-1354:10) ");\n\n " --> (802:206-803:0) ");" -(1354:10-1354:22) " propTypes =" --> (803:0-803:19) "\n\t\t\t\t\t\t\tpropTypes =" -(1354:22-1357:10) " newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n " --> (803:19-804:0) " newPropTypes;" -(1357:10-1357:17) " Object" --> (804:0-804:14) "\n\t\t\t\t\t\t\tObject" -(1357:17-1357:32) ".defineProperty" --> (804:14-804:29) ".defineProperty" -(1357:32-1357:42) "(lazyType," --> (804:29-804:39) "(lazyType," -(1357:42-1357:55) " 'propTypes'," --> (804:39-804:52) " 'propTypes'," -(1357:55-1358:12) " {\n " --> (804:52-804:53) " " -(1358:12-1358:24) " enumerable:" --> (804:53-804:65) "{enumerable:" -(1358:24-1359:11) " true\n " --> (804:65-804:69) " tru" -(1359:11-1359:12) "}" --> (804:69-804:71) "e}" -(1359:12-1360:9) ");\n " --> (804:71-805:6) ");\n\t\t\t\t\t" -(1360:9-1361:7) "}\n " --> (805:6-806:5) "\t}\n\t\t\t\t" -(1361:7-1362:5) "}\n " --> (806:5-807:4) "\t}\n\t\t\t" -(1362:5-1362:6) "}" --> (807:4-807:6) "\t}" -(1362:6-1363:3) ");\n " --> (807:6-808:3) ");\n\t\t" -(1363:3-1365:2) "}\n\n " --> (808:3-809:0) "\t}" -(1365:2-1365:9) " return" --> (809:0-809:10) "\n\t\t\treturn" -(1365:9-1366:1) " lazyType;\n" --> (809:10-810:2) " lazyType;\n\t" -(1366:1-1368:0) "}\n" --> (810:2-811:2) "\t}\n\t" -(1368:0-1368:9) "\nfunction" --> (811:2-811:11) "\tfunction" -(1368:9-1368:20) " forwardRef" --> (811:11-811:22) " forwardRef" -(1368:20-1368:28) "(render)" --> (811:22-811:30) "(render)" -(1368:28-1369:2) " {\n " --> (811:30-812:3) " {\n\t\t" -(1369:2-1370:4) " {\n " --> (812:3-813:0) "\t{" -(1370:4-1370:8) " if " --> (813:0-813:8) "\n\t\t\t\tif " -(1370:8-1370:18) "(render !=" --> (813:8-813:18) "(render !=" -(1370:18-1370:26) " null &&" --> (813:18-813:26) " null &&" -(1370:26-1370:33) " render" --> (813:26-813:33) " render" -(1370:33-1370:46) ".$$typeof ===" --> (813:33-813:46) ".$$typeof ===" -(1370:46-1370:63) " REACT_MEMO_TYPE)" --> (813:46-813:63) " REACT_MEMO_TYPE)" -(1370:63-1371:6) " {\n " --> (813:63-814:0) " {" -(1371:6-1371:12) " error" --> (814:0-814:11) "\n\t\t\t\t\terror" -(1371:12-1371:77) "('forwardRef requires a render function but received a `memo` ' +" --> (814:11-814:76) "('forwardRef requires a render function but received a `memo` ' +" -(1371:77-1371:131) " 'component. Instead of forwardRef(memo(...)), use ' +" --> (814:76-814:130) " 'component. Instead of forwardRef(memo(...)), use ' +" -(1371:131-1371:156) " 'memo(forwardRef(...)).'" --> (814:130-814:155) " 'memo(forwardRef(...)).'" -(1371:156-1372:5) ");\n " --> (814:155-815:4) ");\n\t\t\t" -(1372:5-1372:22) "} else if (typeof" --> (815:4-815:22) "\t} else if (typeof" -(1372:22-1372:33) " render !==" --> (815:22-815:33) " render !==" -(1372:33-1372:45) " 'function')" --> (815:33-815:45) " 'function')" -(1372:45-1373:6) " {\n " --> (815:45-816:0) " {" -(1373:6-1373:12) " error" --> (816:0-816:11) "\n\t\t\t\t\terror" -(1373:12-1373:71) "('forwardRef requires a render function but was given %s.'," --> (816:11-816:70) "('forwardRef requires a render function but was given %s.'," -(1373:71-1373:82) " render ===" --> (816:70-816:81) " render ===" -(1373:82-1373:89) " null ?" --> (816:81-816:88) " null ?" -(1373:89-1373:105) " 'null' : typeof" --> (816:88-816:104) " 'null' : typeof" -(1373:105-1373:112) " render" --> (816:104-816:111) " render" -(1373:112-1374:5) ");\n " --> (816:111-817:4) ");\n\t\t\t" -(1374:5-1374:11) "} else" --> (817:4-817:11) "\t} else" -(1374:11-1375:6) " {\n " --> (817:11-818:0) " {" -(1375:6-1375:10) " if " --> (818:0-818:9) "\n\t\t\t\t\tif " -(1375:10-1375:17) "(render" --> (818:9-818:16) "(render" -(1375:17-1375:28) ".length !==" --> (818:16-818:27) ".length !==" -(1375:28-1375:33) " 0 &&" --> (818:27-818:32) " 0 &&" -(1375:33-1375:40) " render" --> (818:32-818:39) " render" -(1375:40-1375:51) ".length !==" --> (818:39-818:50) ".length !==" -(1375:51-1375:54) " 2)" --> (818:50-818:53) " 2)" -(1375:54-1376:8) " {\n " --> (818:53-819:0) " {" -(1376:8-1376:14) " error" --> (819:0-819:12) "\n\t\t\t\t\t\terror" -(1376:14-1376:94) "('forwardRef render functions accept exactly two parameters: props and ref. %s'," --> (819:12-819:92) "('forwardRef render functions accept exactly two parameters: props and ref. %s'," -(1376:94-1376:101) " render" --> (819:92-819:99) " render" -(1376:101-1376:112) ".length ===" --> (819:99-819:110) ".length ===" -(1376:112-1376:116) " 1 ?" --> (819:110-819:114) " 1 ?" -(1376:116-1376:161) " 'Did you forget to use the ref parameter?' :" --> (819:114-819:159) " 'Did you forget to use the ref parameter?' :" -(1376:161-1376:207) " 'Any additional parameter will be undefined.'" --> (819:159-819:205) " 'Any additional parameter will be undefined.'" -(1376:207-1377:7) ");\n " --> (819:205-820:5) ");\n\t\t\t\t" -(1377:7-1378:5) "}\n " --> (820:5-821:4) "\t}\n\t\t\t" -(1378:5-1380:4) "}\n\n " --> (821:4-822:0) "\t}" -(1380:4-1380:8) " if " --> (822:0-822:8) "\n\t\t\t\tif " -(1380:8-1380:18) "(render !=" --> (822:8-822:18) "(render !=" -(1380:18-1380:24) " null)" --> (822:18-822:24) " null)" -(1380:24-1381:6) " {\n " --> (822:24-823:0) " {" -(1381:6-1381:10) " if " --> (823:0-823:9) "\n\t\t\t\t\tif " -(1381:10-1381:17) "(render" --> (823:9-823:16) "(render" -(1381:17-1381:33) ".defaultProps !=" --> (823:16-823:32) ".defaultProps !=" -(1381:33-1381:41) " null ||" --> (823:32-823:40) " null ||" -(1381:41-1381:48) " render" --> (823:40-823:47) " render" -(1381:48-1381:61) ".propTypes !=" --> (823:47-823:60) ".propTypes !=" -(1381:61-1381:67) " null)" --> (823:60-823:66) " null)" -(1381:67-1382:8) " {\n " --> (823:66-824:0) " {" -(1382:8-1382:14) " error" --> (824:0-824:12) "\n\t\t\t\t\t\terror" -(1382:14-1382:89) "('forwardRef render functions do not support propTypes or defaultProps. ' +" --> (824:12-824:87) "('forwardRef render functions do not support propTypes or defaultProps. ' +" -(1382:89-1382:136) " 'Did you accidentally pass a React component?'" --> (824:87-824:134) " 'Did you accidentally pass a React component?'" -(1382:136-1383:7) ");\n " --> (824:134-825:5) ");\n\t\t\t\t" -(1383:7-1384:5) "}\n " --> (825:5-826:4) "\t}\n\t\t\t" -(1384:5-1385:3) "}\n " --> (826:4-827:3) "\t}\n\t\t" -(1385:3-1387:2) "}\n\n " --> (827:3-828:3) "\t}\n\t\t" -(1387:2-1387:6) " var" --> (828:3-828:7) "\tvar" -(1387:6-1387:20) " elementType =" --> (828:7-828:21) " elementType =" -(1387:20-1388:4) " {\n " --> (828:21-829:4) " {\n\t\t\t" -(1388:4-1388:14) " $$typeof:" --> (829:4-829:14) "\t$$typeof:" -(1388:14-1389:4) " REACT_FORWARD_REF_TYPE,\n " --> (829:14-830:4) " REACT_FORWARD_REF_TYPE,\n\t\t\t" -(1389:4-1389:12) " render:" --> (830:4-830:12) "\trender:" -(1389:12-1390:3) " render\n " --> (830:12-831:3) " render\n\t\t" -(1390:3-1392:2) "};\n\n " --> (831:3-832:3) "\t};\n\t\t" -(1392:2-1393:4) " {\n " --> (832:3-833:4) "\t{\n\t\t\t" -(1393:4-1393:8) " var" --> (833:4-833:8) "\tvar" -(1393:8-1394:4) " ownName;\n " --> (833:8-834:0) " ownName;" -(1394:4-1394:11) " Object" --> (834:0-834:11) "\n\t\t\t\tObject" -(1394:11-1394:26) ".defineProperty" --> (834:11-834:26) ".defineProperty" -(1394:26-1394:39) "(elementType," --> (834:26-834:39) "(elementType," -(1394:39-1394:54) " 'displayName'," --> (834:39-834:54) " 'displayName'," -(1394:54-1395:6) " {\n " --> (834:54-835:5) " {\n\t\t\t\t" -(1395:6-1395:18) " enumerable:" --> (835:5-835:17) "\tenumerable:" -(1395:18-1396:6) " false,\n " --> (835:17-836:5) " false,\n\t\t\t\t" -(1396:6-1396:20) " configurable:" --> (836:5-836:19) "\tconfigurable:" -(1396:20-1397:6) " true,\n " --> (836:19-837:5) " true,\n\t\t\t\t" -(1397:6-1397:11) " get:" --> (837:5-837:10) "\tget:" -(1397:11-1397:23) " function ()" --> (837:10-837:21) " function()" -(1397:23-1398:8) " {\n " --> (837:21-838:0) " {" -(1398:8-1398:15) " return" --> (838:0-838:13) "\n\t\t\t\t\t\treturn" -(1398:15-1399:7) " ownName;\n " --> (838:13-839:5) " ownName;\n\t\t\t\t" -(1399:7-1400:6) "},\n " --> (839:5-840:5) "\t},\n\t\t\t\t" -(1400:6-1400:11) " set:" --> (840:5-840:10) "\tset:" -(1400:11-1400:21) " function " --> (840:10-840:19) " function" -(1400:21-1400:27) "(name)" --> (840:19-840:25) "(name)" -(1400:27-1401:8) " {\n " --> (840:25-841:0) " {" -(1401:8-1401:18) " ownName =" --> (841:0-841:16) "\n\t\t\t\t\t\townName =" -(1401:18-1403:8) " name;\n\n " --> (841:16-842:0) " name;" -(1403:8-1403:12) " if " --> (842:0-842:10) "\n\t\t\t\t\t\tif " -(1403:12-1403:19) "(render" --> (842:10-842:17) "(render" -(1403:19-1403:34) ".displayName ==" --> (842:17-842:32) ".displayName ==" -(1403:34-1403:40) " null)" --> (842:32-842:38) " null)" -(1403:40-1404:10) " {\n " --> (842:38-843:0) " {" -(1404:10-1404:17) " render" --> (843:0-843:14) "\n\t\t\t\t\t\t\trender" -(1404:17-1404:31) ".displayName =" --> (843:14-843:28) ".displayName =" -(1404:31-1405:9) " name;\n " --> (843:28-844:6) " name;\n\t\t\t\t\t" -(1405:9-1406:7) "}\n " --> (844:6-845:5) "\t}\n\t\t\t\t" -(1406:7-1407:5) "}\n " --> (845:5-846:4) "\t}\n\t\t\t" -(1407:5-1407:6) "}" --> (846:4-846:6) "\t}" -(1407:6-1408:3) ");\n " --> (846:6-847:3) ");\n\t\t" -(1408:3-1410:2) "}\n\n " --> (847:3-848:0) "\t}" -(1410:2-1410:9) " return" --> (848:0-848:10) "\n\t\t\treturn" -(1410:9-1411:1) " elementType;\n" --> (848:10-849:2) " elementType;\n\t" -(1411:1-1415:0) "}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n" --> (849:2-850:2) "\t}\n\t" -(1415:0-1415:4) "\nvar" --> (850:2-850:6) "\tvar" -(1415:4-1415:21) " enableScopeAPI =" --> (850:6-850:23) " enableScopeAPI =" -(1415:21-1417:0) " false; // Experimental Create Event Handle API.\n" --> (850:23-851:2) " false;\n\t" -(1417:0-1417:9) "\nfunction" --> (851:2-851:11) "\tfunction" -(1417:9-1417:28) " isValidElementType" --> (851:11-851:30) " isValidElementType" -(1417:28-1417:34) "(type)" --> (851:30-851:36) "(type)" -(1417:34-1418:2) " {\n " --> (851:36-852:0) " {" -(1418:2-1418:13) " if (typeof" --> (852:0-852:14) "\n\t\t\tif (typeof" -(1418:13-1418:22) " type ===" --> (852:14-852:23) " type ===" -(1418:22-1418:41) " 'string' || typeof" --> (852:23-852:42) " 'string' || typeof" -(1418:41-1418:50) " type ===" --> (852:42-852:51) " type ===" -(1418:50-1418:62) " 'function')" --> (852:51-852:63) " 'function')" -(1418:62-1419:4) " {\n " --> (852:63-853:0) " {" -(1419:4-1419:11) " return" --> (853:0-853:11) "\n\t\t\t\treturn" -(1419:11-1420:3) " true;\n " --> (853:11-854:3) " true;\n\t\t" -(1420:3-1423:2) "} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n " --> (854:3-855:0) "\t}" -(1423:2-1423:6) " if " --> (855:0-855:7) "\n\t\t\tif " -(1423:6-1423:15) "(type ===" --> (855:7-855:16) "(type ===" -(1423:15-1423:23) " exports" --> (855:16-855:24) " exports" -(1423:23-1423:35) ".Fragment ||" --> (855:24-855:36) ".Fragment ||" -(1423:35-1423:44) " type ===" --> (855:36-855:45) " type ===" -(1423:44-1423:52) " exports" --> (855:45-855:53) " exports" -(1423:52-1423:64) ".Profiler ||" --> (855:53-855:65) ".Profiler ||" -(1423:64-1423:73) " type ===" --> (855:65-855:74) " type ===" -(1423:73-1423:106) " REACT_DEBUG_TRACING_MODE_TYPE ||" --> (855:74-855:107) " REACT_DEBUG_TRACING_MODE_TYPE ||" -(1423:106-1423:115) " type ===" --> (855:107-855:116) " type ===" -(1423:115-1423:123) " exports" --> (855:116-855:124) " exports" -(1423:123-1423:137) ".StrictMode ||" --> (855:124-855:138) ".StrictMode ||" -(1423:137-1423:146) " type ===" --> (855:138-855:147) " type ===" -(1423:146-1423:154) " exports" --> (855:147-855:155) " exports" -(1423:154-1423:166) ".Suspense ||" --> (855:155-855:167) ".Suspense ||" -(1423:166-1423:175) " type ===" --> (855:167-855:176) " type ===" -(1423:175-1423:203) " REACT_SUSPENSE_LIST_TYPE ||" --> (855:176-855:204) " REACT_SUSPENSE_LIST_TYPE ||" -(1423:203-1423:212) " type ===" --> (855:204-855:213) " type ===" -(1423:212-1423:240) " REACT_LEGACY_HIDDEN_TYPE ||" --> (855:213-855:241) " REACT_LEGACY_HIDDEN_TYPE ||" -(1423:240-1423:257) " enableScopeAPI )" --> (855:241-855:257) " enableScopeAPI)" -(1423:257-1424:4) " {\n " --> (855:257-856:0) " {" -(1424:4-1424:11) " return" --> (856:0-856:11) "\n\t\t\t\treturn" -(1424:11-1425:3) " true;\n " --> (856:11-857:3) " true;\n\t\t" -(1425:3-1427:2) "}\n\n " --> (857:3-858:0) "\t}" -(1427:2-1427:13) " if (typeof" --> (858:0-858:14) "\n\t\t\tif (typeof" -(1427:13-1427:22) " type ===" --> (858:14-858:23) " type ===" -(1427:22-1427:34) " 'object' &&" --> (858:23-858:35) " 'object' &&" -(1427:34-1427:43) " type !==" --> (858:35-858:44) " type !==" -(1427:43-1427:49) " null)" --> (858:44-858:50) " null)" -(1427:49-1428:4) " {\n " --> (858:50-859:0) " {" -(1428:4-1428:8) " if " --> (859:0-859:8) "\n\t\t\t\tif " -(1428:8-1428:13) "(type" --> (859:8-859:13) "(type" -(1428:13-1428:26) ".$$typeof ===" --> (859:13-859:26) ".$$typeof ===" -(1428:26-1428:45) " REACT_LAZY_TYPE ||" --> (859:26-859:45) " REACT_LAZY_TYPE ||" -(1428:45-1428:50) " type" --> (859:45-859:50) " type" -(1428:50-1428:63) ".$$typeof ===" --> (859:50-859:63) ".$$typeof ===" -(1428:63-1428:82) " REACT_MEMO_TYPE ||" --> (859:63-859:82) " REACT_MEMO_TYPE ||" -(1428:82-1428:87) " type" --> (859:82-859:87) " type" -(1428:87-1428:100) ".$$typeof ===" --> (859:87-859:100) ".$$typeof ===" -(1428:100-1428:123) " REACT_PROVIDER_TYPE ||" --> (859:100-859:123) " REACT_PROVIDER_TYPE ||" -(1428:123-1428:128) " type" --> (859:123-859:128) " type" -(1428:128-1428:141) ".$$typeof ===" --> (859:128-859:141) ".$$typeof ===" -(1428:141-1428:163) " REACT_CONTEXT_TYPE ||" --> (859:141-859:163) " REACT_CONTEXT_TYPE ||" -(1428:163-1428:168) " type" --> (859:163-859:168) " type" -(1428:168-1428:181) ".$$typeof ===" --> (859:168-859:181) ".$$typeof ===" -(1428:181-1428:207) " REACT_FORWARD_REF_TYPE ||" --> (859:181-859:207) " REACT_FORWARD_REF_TYPE ||" -(1428:207-1428:212) " type" --> (859:207-859:212) " type" -(1428:212-1428:225) ".$$typeof ===" --> (859:212-859:225) ".$$typeof ===" -(1428:225-1428:251) " REACT_FUNDAMENTAL_TYPE ||" --> (859:225-859:251) " REACT_FUNDAMENTAL_TYPE ||" -(1428:251-1428:256) " type" --> (859:251-859:256) " type" -(1428:256-1428:269) ".$$typeof ===" --> (859:256-859:269) ".$$typeof ===" -(1428:269-1428:289) " REACT_BLOCK_TYPE ||" --> (859:269-859:289) " REACT_BLOCK_TYPE ||" -(1428:289-1428:294) " type" --> (859:289-859:294) " type" -(1428:294-1428:301) "[0] ===" --> (859:294-859:301) "[0] ===" -(1428:301-1428:326) " REACT_SERVER_BLOCK_TYPE)" --> (859:301-859:326) " REACT_SERVER_BLOCK_TYPE)" -(1428:326-1429:6) " {\n " --> (859:326-860:0) " {" -(1429:6-1429:13) " return" --> (860:0-860:12) "\n\t\t\t\t\treturn" -(1429:13-1430:5) " true;\n " --> (860:12-861:4) " true;\n\t\t\t" -(1430:5-1431:3) "}\n " --> (861:4-862:3) "\t}\n\t\t" -(1431:3-1433:2) "}\n\n " --> (862:3-863:0) "\t}" -(1433:2-1433:9) " return" --> (863:0-863:10) "\n\t\t\treturn" -(1433:9-1434:1) " false;\n" --> (863:10-864:2) " false;\n\t" -(1434:1-1436:0) "}\n" --> (864:2-865:2) "\t}\n\t" -(1436:0-1436:9) "\nfunction" --> (865:2-865:11) "\tfunction" -(1436:9-1436:14) " memo" --> (865:11-865:16) " memo" -(1436:14-1436:20) "(type," --> (865:16-865:22) "(type," -(1436:20-1436:29) " compare)" --> (865:22-865:31) " compare)" -(1436:29-1437:2) " {\n " --> (865:31-866:3) " {\n\t\t" -(1437:2-1438:4) " {\n " --> (866:3-867:0) "\t{" -(1438:4-1438:9) " if (" --> (867:0-867:9) "\n\t\t\t\tif (" -(1438:9-1438:28) "!isValidElementType" --> (867:9-867:28) "!isValidElementType" -(1438:28-1438:33) "(type" --> (867:28-867:33) "(type" -(1438:33-1438:35) "))" --> (867:33-867:35) "))" -(1438:35-1439:6) " {\n " --> (867:35-868:0) " {" -(1439:6-1439:12) " error" --> (868:0-868:11) "\n\t\t\t\t\terror" -(1439:12-1439:71) "('memo: The first argument must be a component. Instead ' +" --> (868:11-868:70) "('memo: The first argument must be a component. Instead ' +" -(1439:71-1439:87) " 'received: %s'," --> (868:70-868:86) " 'received: %s'," -(1439:87-1439:96) " type ===" --> (868:86-868:95) " type ===" -(1439:96-1439:103) " null ?" --> (868:95-868:102) " null ?" -(1439:103-1439:119) " 'null' : typeof" --> (868:102-868:118) " 'null' : typeof" -(1439:119-1439:124) " type" --> (868:118-868:123) " type" -(1439:124-1440:5) ");\n " --> (868:123-869:4) ");\n\t\t\t" -(1440:5-1441:3) "}\n " --> (869:4-870:3) "\t}\n\t\t" -(1441:3-1443:2) "}\n\n " --> (870:3-871:3) "\t}\n\t\t" -(1443:2-1443:6) " var" --> (871:3-871:7) "\tvar" -(1443:6-1443:20) " elementType =" --> (871:7-871:21) " elementType =" -(1443:20-1444:4) " {\n " --> (871:21-872:4) " {\n\t\t\t" -(1444:4-1444:14) " $$typeof:" --> (872:4-872:14) "\t$$typeof:" -(1444:14-1445:4) " REACT_MEMO_TYPE,\n " --> (872:14-873:4) " REACT_MEMO_TYPE,\n\t\t\t" -(1445:4-1445:10) " type:" --> (873:4-873:10) "\ttype:" -(1445:10-1446:4) " type,\n " --> (873:10-874:4) " type,\n\t\t\t" -(1446:4-1446:13) " compare:" --> (874:4-874:13) "\tcompare:" -(1446:13-1446:25) " compare ===" --> (874:13-874:25) " compare ===" -(1446:25-1446:37) " undefined ?" --> (874:25-874:37) " undefined ?" -(1446:37-1446:44) " null :" --> (874:37-874:44) " null :" -(1446:44-1447:3) " compare\n " --> (874:44-875:3) " compare\n\t\t" -(1447:3-1449:2) "};\n\n " --> (875:3-876:3) "\t};\n\t\t" -(1449:2-1450:4) " {\n " --> (876:3-877:4) "\t{\n\t\t\t" -(1450:4-1450:8) " var" --> (877:4-877:8) "\tvar" -(1450:8-1451:4) " ownName;\n " --> (877:8-878:0) " ownName;" -(1451:4-1451:11) " Object" --> (878:0-878:11) "\n\t\t\t\tObject" -(1451:11-1451:26) ".defineProperty" --> (878:11-878:26) ".defineProperty" -(1451:26-1451:39) "(elementType," --> (878:26-878:39) "(elementType," -(1451:39-1451:54) " 'displayName'," --> (878:39-878:54) " 'displayName'," -(1451:54-1452:6) " {\n " --> (878:54-879:5) " {\n\t\t\t\t" -(1452:6-1452:18) " enumerable:" --> (879:5-879:17) "\tenumerable:" -(1452:18-1453:6) " false,\n " --> (879:17-880:5) " false,\n\t\t\t\t" -(1453:6-1453:20) " configurable:" --> (880:5-880:19) "\tconfigurable:" -(1453:20-1454:6) " true,\n " --> (880:19-881:5) " true,\n\t\t\t\t" -(1454:6-1454:11) " get:" --> (881:5-881:10) "\tget:" -(1454:11-1454:23) " function ()" --> (881:10-881:21) " function()" -(1454:23-1455:8) " {\n " --> (881:21-882:0) " {" -(1455:8-1455:15) " return" --> (882:0-882:13) "\n\t\t\t\t\t\treturn" -(1455:15-1456:7) " ownName;\n " --> (882:13-883:5) " ownName;\n\t\t\t\t" -(1456:7-1457:6) "},\n " --> (883:5-884:5) "\t},\n\t\t\t\t" -(1457:6-1457:11) " set:" --> (884:5-884:10) "\tset:" -(1457:11-1457:21) " function " --> (884:10-884:19) " function" -(1457:21-1457:27) "(name)" --> (884:19-884:25) "(name)" -(1457:27-1458:8) " {\n " --> (884:25-885:0) " {" -(1458:8-1458:18) " ownName =" --> (885:0-885:16) "\n\t\t\t\t\t\townName =" -(1458:18-1460:8) " name;\n\n " --> (885:16-886:0) " name;" -(1460:8-1460:12) " if " --> (886:0-886:10) "\n\t\t\t\t\t\tif " -(1460:12-1460:17) "(type" --> (886:10-886:15) "(type" -(1460:17-1460:32) ".displayName ==" --> (886:15-886:30) ".displayName ==" -(1460:32-1460:38) " null)" --> (886:30-886:36) " null)" -(1460:38-1461:10) " {\n " --> (886:36-887:0) " {" -(1461:10-1461:15) " type" --> (887:0-887:12) "\n\t\t\t\t\t\t\ttype" -(1461:15-1461:29) ".displayName =" --> (887:12-887:26) ".displayName =" -(1461:29-1462:9) " name;\n " --> (887:26-888:6) " name;\n\t\t\t\t\t" -(1462:9-1463:7) "}\n " --> (888:6-889:5) "\t}\n\t\t\t\t" -(1463:7-1464:5) "}\n " --> (889:5-890:4) "\t}\n\t\t\t" -(1464:5-1464:6) "}" --> (890:4-890:6) "\t}" -(1464:6-1465:3) ");\n " --> (890:6-891:3) ");\n\t\t" -(1465:3-1467:2) "}\n\n " --> (891:3-892:0) "\t}" -(1467:2-1467:9) " return" --> (892:0-892:10) "\n\t\t\treturn" -(1467:9-1468:1) " elementType;\n" --> (892:10-893:2) " elementType;\n\t" -(1468:1-1470:0) "}\n" --> (893:2-894:2) "\t}\n\t" -(1470:0-1470:9) "\nfunction" --> (894:2-894:11) "\tfunction" -(1470:9-1470:29) " resolveDispatcher()" --> (894:11-894:31) " resolveDispatcher()" -(1470:29-1471:2) " {\n " --> (894:31-895:3) " {\n\t\t" -(1471:2-1471:6) " var" --> (895:3-895:7) "\tvar" -(1471:6-1471:19) " dispatcher =" --> (895:7-895:20) " dispatcher =" -(1471:19-1471:42) " ReactCurrentDispatcher" --> (895:20-895:43) " ReactCurrentDispatcher" -(1471:42-1473:2) ".current;\n\n " --> (895:43-896:0) ".current;" -(1473:2-1473:8) " if (!" --> (896:0-896:9) "\n\t\t\tif (!" -(1473:8-1473:23) "(dispatcher !==" --> (896:9-896:24) "(dispatcher !==" -(1473:23-1473:30) " null))" --> (896:24-896:31) " null))" -(1473:30-1474:4) " {\n " --> (896:31-897:4) " {\n\t\t\t" -(1474:4-1475:6) " {\n " --> (897:4-898:0) "\t{" -(1475:6-1475:12) " throw" --> (898:0-898:11) "\n\t\t\t\t\tthrow" -(1475:12-1475:19) " Error(" --> (898:11-898:17) " Error" -(1475:19-1475:454) " \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.\" " --> (898:17-898:451) "('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.'" -(1475:454-1476:5) ");\n " --> (898:451-899:4) ");\n\t\t\t" -(1476:5-1477:3) "}\n " --> (899:4-900:3) "\t}\n\t\t" -(1477:3-1479:2) "}\n\n " --> (900:3-901:0) "\t}" -(1479:2-1479:9) " return" --> (901:0-901:10) "\n\t\t\treturn" -(1479:9-1480:1) " dispatcher;\n" --> (901:10-902:2) " dispatcher;\n\t" -(1480:1-1482:0) "}\n" --> (902:2-903:2) "\t}\n\t" -(1482:0-1482:9) "\nfunction" --> (903:2-903:11) "\tfunction" -(1482:9-1482:20) " useContext" --> (903:11-903:22) " useContext" -(1482:20-1482:29) "(Context," --> (903:22-903:31) "(Context," -(1482:29-1482:52) " unstable_observedBits)" --> (903:31-903:54) " unstable_observedBits)" -(1482:52-1483:2) " {\n " --> (903:54-904:3) " {\n\t\t" -(1483:2-1483:6) " var" --> (904:3-904:7) "\tvar" -(1483:6-1483:19) " dispatcher =" --> (904:7-904:20) " dispatcher =" -(1483:19-1483:38) " resolveDispatcher(" --> (904:20-904:39) " resolveDispatcher(" -(1483:38-1485:2) ");\n\n " --> (904:39-905:3) ");\n\t\t" -(1485:2-1486:4) " {\n " --> (905:3-906:0) "\t{" -(1486:4-1486:8) " if " --> (906:0-906:8) "\n\t\t\t\tif " -(1486:8-1486:34) "(unstable_observedBits !==" --> (906:8-906:34) "(unstable_observedBits !==" -(1486:34-1486:45) " undefined)" --> (906:34-906:45) " undefined)" -(1486:45-1487:6) " {\n " --> (906:45-907:0) " {" -(1487:6-1487:12) " error" --> (907:0-907:11) "\n\t\t\t\t\terror" -(1487:12-1487:69) "('useContext() second argument is reserved for future ' +" --> (907:11-907:68) "('useContext() second argument is reserved for future ' +" -(1487:69-1487:117) " 'use in React. Passing it is not supported. ' +" --> (907:68-907:116) " 'use in React. Passing it is not supported. ' +" -(1487:117-1487:138) " 'You passed: %s.%s'," --> (907:116-907:137) " 'You passed: %s.%s'," -(1487:138-1487:168) " unstable_observedBits, typeof" --> (907:137-907:167) " unstable_observedBits, typeof" -(1487:168-1487:194) " unstable_observedBits ===" --> (907:167-907:193) " unstable_observedBits ===" -(1487:194-1487:206) " 'number' &&" --> (907:193-907:205) " 'number' &&" -(1487:206-1487:212) " Array" --> (907:205-907:211) " Array" -(1487:212-1487:220) ".isArray" --> (907:211-907:219) ".isArray" -(1487:220-1487:230) "(arguments" --> (907:219-907:229) "(arguments" -(1487:230-1487:233) "[2]" --> (907:229-907:232) "[2]" -(1487:233-1487:236) ") ?" --> (907:232-907:235) ") ?" -(1487:236-1487:281) " '\\n\\nDid you call array.map(useContext)? ' +" --> (907:235-907:280) " '\\n\\nDid you call array.map(useContext)? ' +" -(1487:281-1487:332) " 'Calling Hooks inside a loop is not supported. ' +" --> (907:280-907:331) " 'Calling Hooks inside a loop is not supported. ' +" -(1487:332-1487:390) " 'Learn more at https://reactjs.org/link/rules-of-hooks' :" --> (907:331-907:389) " 'Learn more at https://reactjs.org/link/rules-of-hooks' :" -(1487:390-1487:393) " ''" --> (907:389-907:392) " ''" -(1487:393-1488:5) ");\n " --> (907:392-908:4) ");\n\t\t\t" -(1488:5-1491:4) "} // TODO: add a more generic warning for invalid values.\n\n\n " --> (908:4-909:0) "\t}" -(1491:4-1491:8) " if " --> (909:0-909:8) "\n\t\t\t\tif " -(1491:8-1491:16) "(Context" --> (909:8-909:16) "(Context" -(1491:16-1491:29) "._context !==" --> (909:16-909:29) "._context !==" -(1491:29-1491:40) " undefined)" --> (909:29-909:40) " undefined)" -(1491:40-1492:6) " {\n " --> (909:40-910:5) " {\n\t\t\t\t" -(1492:6-1492:10) " var" --> (910:5-910:9) "\tvar" -(1492:10-1492:24) " realContext =" --> (910:9-910:23) " realContext =" -(1492:24-1492:32) " Context" --> (910:23-910:31) " Context" -(1492:32-1495:6) "._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n " --> (910:31-911:0) "._context;" -(1495:6-1495:10) " if " --> (911:0-911:9) "\n\t\t\t\t\tif " -(1495:10-1495:22) "(realContext" --> (911:9-911:21) "(realContext" -(1495:22-1495:35) ".Consumer ===" --> (911:21-911:34) ".Consumer ===" -(1495:35-1495:44) " Context)" --> (911:34-911:43) " Context)" -(1495:44-1496:8) " {\n " --> (911:43-912:0) " {" -(1496:8-1496:14) " error" --> (912:0-912:12) "\n\t\t\t\t\t\terror" -(1496:14-1496:102) "('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' +" --> (912:12-912:100) "('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' +" -(1496:102-1496:189) " 'removed in a future major release. Did you mean to call useContext(Context) instead?'" --> (912:100-912:187) " 'removed in a future major release. Did you mean to call useContext(Context) instead?'" -(1496:189-1497:7) ");\n " --> (912:187-913:5) ");\n\t\t\t\t" -(1497:7-1497:17) "} else if " --> (913:5-913:16) "\t} else if " -(1497:17-1497:29) "(realContext" --> (913:16-913:28) "(realContext" -(1497:29-1497:42) ".Provider ===" --> (913:28-913:41) ".Provider ===" -(1497:42-1497:51) " Context)" --> (913:41-913:50) " Context)" -(1497:51-1498:8) " {\n " --> (913:50-914:0) " {" -(1498:8-1498:14) " error" --> (914:0-914:12) "\n\t\t\t\t\t\terror" -(1498:14-1498:74) "('Calling useContext(Context.Provider) is not supported. ' +" --> (914:12-914:72) "('Calling useContext(Context.Provider) is not supported. ' +" -(1498:74-1498:126) " 'Did you mean to call useContext(Context) instead?'" --> (914:72-914:124) " 'Did you mean to call useContext(Context) instead?'" -(1498:126-1499:7) ");\n " --> (914:124-915:5) ");\n\t\t\t\t" -(1499:7-1500:5) "}\n " --> (915:5-916:4) "\t}\n\t\t\t" -(1500:5-1501:3) "}\n " --> (916:4-917:3) "\t}\n\t\t" -(1501:3-1503:2) "}\n\n " --> (917:3-918:0) "\t}" -(1503:2-1503:9) " return" --> (918:0-918:10) "\n\t\t\treturn" -(1503:9-1503:20) " dispatcher" --> (918:10-918:21) " dispatcher" -(1503:20-1503:31) ".useContext" --> (918:21-918:32) ".useContext" -(1503:31-1503:40) "(Context," --> (918:32-918:41) "(Context," -(1503:40-1503:62) " unstable_observedBits" --> (918:41-918:63) " unstable_observedBits" -(1503:62-1504:1) ");\n" --> (918:63-919:2) ");\n\t" -(1504:1-1505:0) "}" --> (919:2-920:2) "\t}\n\t" -(1505:0-1505:9) "\nfunction" --> (920:2-920:11) "\tfunction" -(1505:9-1505:18) " useState" --> (920:11-920:20) " useState" -(1505:18-1505:32) "(initialState)" --> (920:20-920:34) "(initialState)" -(1505:32-1506:2) " {\n " --> (920:34-921:3) " {\n\t\t" -(1506:2-1506:6) " var" --> (921:3-921:7) "\tvar" -(1506:6-1506:19) " dispatcher =" --> (921:7-921:20) " dispatcher =" -(1506:19-1506:38) " resolveDispatcher(" --> (921:20-921:39) " resolveDispatcher(" -(1506:38-1507:2) ");\n " --> (921:39-922:0) ");" -(1507:2-1507:9) " return" --> (922:0-922:10) "\n\t\t\treturn" -(1507:9-1507:20) " dispatcher" --> (922:10-922:21) " dispatcher" -(1507:20-1507:29) ".useState" --> (922:21-922:30) ".useState" -(1507:29-1507:42) "(initialState" --> (922:30-922:43) "(initialState" -(1507:42-1508:1) ");\n" --> (922:43-923:2) ");\n\t" -(1508:1-1509:0) "}" --> (923:2-924:2) "\t}\n\t" -(1509:0-1509:9) "\nfunction" --> (924:2-924:11) "\tfunction" -(1509:9-1509:20) " useReducer" --> (924:11-924:22) " useReducer" -(1509:20-1509:29) "(reducer," --> (924:22-924:31) "(reducer," -(1509:29-1509:41) " initialArg," --> (924:31-924:43) " initialArg," -(1509:41-1509:47) " init)" --> (924:43-924:49) " init)" -(1509:47-1510:2) " {\n " --> (924:49-925:3) " {\n\t\t" -(1510:2-1510:6) " var" --> (925:3-925:7) "\tvar" -(1510:6-1510:19) " dispatcher =" --> (925:7-925:20) " dispatcher =" -(1510:19-1510:38) " resolveDispatcher(" --> (925:20-925:39) " resolveDispatcher(" -(1510:38-1511:2) ");\n " --> (925:39-926:0) ");" -(1511:2-1511:9) " return" --> (926:0-926:10) "\n\t\t\treturn" -(1511:9-1511:20) " dispatcher" --> (926:10-926:21) " dispatcher" -(1511:20-1511:31) ".useReducer" --> (926:21-926:32) ".useReducer" -(1511:31-1511:40) "(reducer," --> (926:32-926:41) "(reducer," -(1511:40-1511:52) " initialArg," --> (926:41-926:53) " initialArg," -(1511:52-1511:57) " init" --> (926:53-926:58) " init" -(1511:57-1512:1) ");\n" --> (926:58-927:2) ");\n\t" -(1512:1-1513:0) "}" --> (927:2-928:2) "\t}\n\t" -(1513:0-1513:9) "\nfunction" --> (928:2-928:11) "\tfunction" -(1513:9-1513:16) " useRef" --> (928:11-928:18) " useRef" -(1513:16-1513:30) "(initialValue)" --> (928:18-928:32) "(initialValue)" -(1513:30-1514:2) " {\n " --> (928:32-929:3) " {\n\t\t" -(1514:2-1514:6) " var" --> (929:3-929:7) "\tvar" -(1514:6-1514:19) " dispatcher =" --> (929:7-929:20) " dispatcher =" -(1514:19-1514:38) " resolveDispatcher(" --> (929:20-929:39) " resolveDispatcher(" -(1514:38-1515:2) ");\n " --> (929:39-930:0) ");" -(1515:2-1515:9) " return" --> (930:0-930:10) "\n\t\t\treturn" -(1515:9-1515:20) " dispatcher" --> (930:10-930:21) " dispatcher" -(1515:20-1515:27) ".useRef" --> (930:21-930:28) ".useRef" -(1515:27-1515:40) "(initialValue" --> (930:28-930:41) "(initialValue" -(1515:40-1516:1) ");\n" --> (930:41-931:2) ");\n\t" -(1516:1-1517:0) "}" --> (931:2-932:2) "\t}\n\t" -(1517:0-1517:9) "\nfunction" --> (932:2-932:11) "\tfunction" -(1517:9-1517:19) " useEffect" --> (932:11-932:21) " useEffect" -(1517:19-1517:27) "(create," --> (932:21-932:29) "(create," -(1517:27-1517:33) " deps)" --> (932:29-932:35) " deps)" -(1517:33-1518:2) " {\n " --> (932:35-933:3) " {\n\t\t" -(1518:2-1518:6) " var" --> (933:3-933:7) "\tvar" -(1518:6-1518:19) " dispatcher =" --> (933:7-933:20) " dispatcher =" -(1518:19-1518:38) " resolveDispatcher(" --> (933:20-933:39) " resolveDispatcher(" -(1518:38-1519:2) ");\n " --> (933:39-934:0) ");" -(1519:2-1519:9) " return" --> (934:0-934:10) "\n\t\t\treturn" -(1519:9-1519:20) " dispatcher" --> (934:10-934:21) " dispatcher" -(1519:20-1519:30) ".useEffect" --> (934:21-934:31) ".useEffect" -(1519:30-1519:38) "(create," --> (934:31-934:39) "(create," -(1519:38-1519:43) " deps" --> (934:39-934:44) " deps" -(1519:43-1520:1) ");\n" --> (934:44-935:2) ");\n\t" -(1520:1-1521:0) "}" --> (935:2-936:2) "\t}\n\t" -(1521:0-1521:9) "\nfunction" --> (936:2-936:11) "\tfunction" -(1521:9-1521:25) " useLayoutEffect" --> (936:11-936:27) " useLayoutEffect" -(1521:25-1521:33) "(create," --> (936:27-936:35) "(create," -(1521:33-1521:39) " deps)" --> (936:35-936:41) " deps)" -(1521:39-1522:2) " {\n " --> (936:41-937:3) " {\n\t\t" -(1522:2-1522:6) " var" --> (937:3-937:7) "\tvar" -(1522:6-1522:19) " dispatcher =" --> (937:7-937:20) " dispatcher =" -(1522:19-1522:38) " resolveDispatcher(" --> (937:20-937:39) " resolveDispatcher(" -(1522:38-1523:2) ");\n " --> (937:39-938:0) ");" -(1523:2-1523:9) " return" --> (938:0-938:10) "\n\t\t\treturn" -(1523:9-1523:20) " dispatcher" --> (938:10-938:21) " dispatcher" -(1523:20-1523:36) ".useLayoutEffect" --> (938:21-938:37) ".useLayoutEffect" -(1523:36-1523:44) "(create," --> (938:37-938:45) "(create," -(1523:44-1523:49) " deps" --> (938:45-938:50) " deps" -(1523:49-1524:1) ");\n" --> (938:50-939:2) ");\n\t" -(1524:1-1525:0) "}" --> (939:2-940:2) "\t}\n\t" -(1525:0-1525:9) "\nfunction" --> (940:2-940:11) "\tfunction" -(1525:9-1525:21) " useCallback" --> (940:11-940:23) " useCallback" -(1525:21-1525:31) "(callback," --> (940:23-940:33) "(callback," -(1525:31-1525:37) " deps)" --> (940:33-940:39) " deps)" -(1525:37-1526:2) " {\n " --> (940:39-941:3) " {\n\t\t" -(1526:2-1526:6) " var" --> (941:3-941:7) "\tvar" -(1526:6-1526:19) " dispatcher =" --> (941:7-941:20) " dispatcher =" -(1526:19-1526:38) " resolveDispatcher(" --> (941:20-941:39) " resolveDispatcher(" -(1526:38-1527:2) ");\n " --> (941:39-942:0) ");" -(1527:2-1527:9) " return" --> (942:0-942:10) "\n\t\t\treturn" -(1527:9-1527:20) " dispatcher" --> (942:10-942:21) " dispatcher" -(1527:20-1527:32) ".useCallback" --> (942:21-942:33) ".useCallback" -(1527:32-1527:42) "(callback," --> (942:33-942:43) "(callback," -(1527:42-1527:47) " deps" --> (942:43-942:48) " deps" -(1527:47-1528:1) ");\n" --> (942:48-943:2) ");\n\t" -(1528:1-1529:0) "}" --> (943:2-944:2) "\t}\n\t" -(1529:0-1529:9) "\nfunction" --> (944:2-944:11) "\tfunction" -(1529:9-1529:17) " useMemo" --> (944:11-944:19) " useMemo" -(1529:17-1529:25) "(create," --> (944:19-944:27) "(create," -(1529:25-1529:31) " deps)" --> (944:27-944:33) " deps)" -(1529:31-1530:2) " {\n " --> (944:33-945:3) " {\n\t\t" -(1530:2-1530:6) " var" --> (945:3-945:7) "\tvar" -(1530:6-1530:19) " dispatcher =" --> (945:7-945:20) " dispatcher =" -(1530:19-1530:38) " resolveDispatcher(" --> (945:20-945:39) " resolveDispatcher(" -(1530:38-1531:2) ");\n " --> (945:39-946:0) ");" -(1531:2-1531:9) " return" --> (946:0-946:10) "\n\t\t\treturn" -(1531:9-1531:20) " dispatcher" --> (946:10-946:21) " dispatcher" -(1531:20-1531:28) ".useMemo" --> (946:21-946:29) ".useMemo" -(1531:28-1531:36) "(create," --> (946:29-946:37) "(create," -(1531:36-1531:41) " deps" --> (946:37-946:42) " deps" -(1531:41-1532:1) ");\n" --> (946:42-947:2) ");\n\t" -(1532:1-1533:0) "}" --> (947:2-948:2) "\t}\n\t" -(1533:0-1533:9) "\nfunction" --> (948:2-948:11) "\tfunction" -(1533:9-1533:29) " useImperativeHandle" --> (948:11-948:31) " useImperativeHandle" -(1533:29-1533:34) "(ref," --> (948:31-948:36) "(ref," -(1533:34-1533:42) " create," --> (948:36-948:44) " create," -(1533:42-1533:48) " deps)" --> (948:44-948:50) " deps)" -(1533:48-1534:2) " {\n " --> (948:50-949:3) " {\n\t\t" -(1534:2-1534:6) " var" --> (949:3-949:7) "\tvar" -(1534:6-1534:19) " dispatcher =" --> (949:7-949:20) " dispatcher =" -(1534:19-1534:38) " resolveDispatcher(" --> (949:20-949:39) " resolveDispatcher(" -(1534:38-1535:2) ");\n " --> (949:39-950:0) ");" -(1535:2-1535:9) " return" --> (950:0-950:10) "\n\t\t\treturn" -(1535:9-1535:20) " dispatcher" --> (950:10-950:21) " dispatcher" -(1535:20-1535:40) ".useImperativeHandle" --> (950:21-950:41) ".useImperativeHandle" -(1535:40-1535:45) "(ref," --> (950:41-950:46) "(ref," -(1535:45-1535:53) " create," --> (950:46-950:54) " create," -(1535:53-1535:58) " deps" --> (950:54-950:59) " deps" -(1535:58-1536:1) ");\n" --> (950:59-951:2) ");\n\t" -(1536:1-1537:0) "}" --> (951:2-952:2) "\t}\n\t" -(1537:0-1537:9) "\nfunction" --> (952:2-952:11) "\tfunction" -(1537:9-1537:23) " useDebugValue" --> (952:11-952:25) " useDebugValue" -(1537:23-1537:30) "(value," --> (952:25-952:32) "(value," -(1537:30-1537:43) " formatterFn)" --> (952:32-952:45) " formatterFn)" -(1537:43-1538:2) " {\n " --> (952:45-953:3) " {\n\t\t" -(1538:2-1539:4) " {\n " --> (953:3-954:4) "\t{\n\t\t\t" -(1539:4-1539:8) " var" --> (954:4-954:8) "\tvar" -(1539:8-1539:21) " dispatcher =" --> (954:8-954:21) " dispatcher =" -(1539:21-1539:40) " resolveDispatcher(" --> (954:21-954:40) " resolveDispatcher(" -(1539:40-1540:4) ");\n " --> (954:40-955:0) ");" -(1540:4-1540:11) " return" --> (955:0-955:11) "\n\t\t\t\treturn" -(1540:11-1540:22) " dispatcher" --> (955:11-955:22) " dispatcher" -(1540:22-1540:36) ".useDebugValue" --> (955:22-955:36) ".useDebugValue" -(1540:36-1540:43) "(value," --> (955:36-955:43) "(value," -(1540:43-1540:55) " formatterFn" --> (955:43-955:55) " formatterFn" -(1540:55-1541:3) ");\n " --> (955:55-956:3) ");\n\t\t" -(1541:3-1542:1) "}\n" --> (956:3-957:2) "\t}\n\t" -(1542:1-1548:0) "}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method." --> (957:2-958:2) "\t}\n\t" -(1548:0-1548:4) "\nvar" --> (958:2-958:6) "\tvar" -(1548:4-1548:20) " disabledDepth =" --> (958:6-958:22) " disabledDepth =" -(1548:20-1549:0) " 0;" --> (958:22-959:2) " 0;\n\t" -(1549:0-1549:4) "\nvar" --> (959:2-959:6) "\tvar" -(1549:4-1550:0) " prevLog;" --> (959:6-960:2) " prevLog;\n\t" -(1550:0-1550:4) "\nvar" --> (960:2-960:6) "\tvar" -(1550:4-1551:0) " prevInfo;" --> (960:6-961:2) " prevInfo;\n\t" -(1551:0-1551:4) "\nvar" --> (961:2-961:6) "\tvar" -(1551:4-1552:0) " prevWarn;" --> (961:6-962:2) " prevWarn;\n\t" -(1552:0-1552:4) "\nvar" --> (962:2-962:6) "\tvar" -(1552:4-1553:0) " prevError;" --> (962:6-963:2) " prevError;\n\t" -(1553:0-1553:4) "\nvar" --> (963:2-963:6) "\tvar" -(1553:4-1554:0) " prevGroup;" --> (963:6-964:2) " prevGroup;\n\t" -(1554:0-1554:4) "\nvar" --> (964:2-964:6) "\tvar" -(1554:4-1555:0) " prevGroupCollapsed;" --> (964:6-965:2) " prevGroupCollapsed;\n\t" -(1555:0-1555:4) "\nvar" --> (965:2-965:6) "\tvar" -(1555:4-1557:0) " prevGroupEnd;\n" --> (965:6-966:2) " prevGroupEnd;\n\t" -(1557:0-1557:9) "\nfunction" --> (966:2-966:11) "\tfunction" -(1557:9-1557:23) " disabledLog()" --> (966:11-966:25) " disabledLog()" -(1557:23-1557:25) " {" --> (966:25-966:26) " " -(1557:25-1559:0) "}\n" --> (966:26-967:0) "{}" -(1559:0-1559:12) "\ndisabledLog" --> (967:0-967:14) "\n\t\tdisabledLog" -(1559:12-1559:33) ".__reactDisabledLog =" --> (967:14-967:35) ".__reactDisabledLog =" -(1559:33-1560:0) " true;" --> (967:35-968:2) " true;\n\t" -(1560:0-1560:9) "\nfunction" --> (968:2-968:11) "\tfunction" -(1560:9-1560:23) " disableLogs()" --> (968:11-968:25) " disableLogs()" -(1560:23-1561:2) " {\n " --> (968:25-969:3) " {\n\t\t" -(1561:2-1562:4) " {\n " --> (969:3-970:0) "\t{" -(1562:4-1562:8) " if " --> (970:0-970:8) "\n\t\t\t\tif " -(1562:8-1562:26) "(disabledDepth ===" --> (970:8-970:26) "(disabledDepth ===" -(1562:26-1562:29) " 0)" --> (970:26-970:29) " 0)" -(1562:29-1564:6) " {\n /* eslint-disable react-internal/no-production-logging */\n " --> (970:29-971:0) " {" -(1564:6-1564:16) " prevLog =" --> (971:0-971:15) "\n\t\t\t\t\tprevLog =" -(1564:16-1564:24) " console" --> (971:15-971:23) " console" -(1564:24-1565:6) ".log;\n " --> (971:23-972:0) ".log;" -(1565:6-1565:17) " prevInfo =" --> (972:0-972:16) "\n\t\t\t\t\tprevInfo =" -(1565:17-1565:25) " console" --> (972:16-972:24) " console" -(1565:25-1566:6) ".info;\n " --> (972:24-973:0) ".info;" -(1566:6-1566:17) " prevWarn =" --> (973:0-973:16) "\n\t\t\t\t\tprevWarn =" -(1566:17-1566:25) " console" --> (973:16-973:24) " console" -(1566:25-1567:6) ".warn;\n " --> (973:24-974:0) ".warn;" -(1567:6-1567:18) " prevError =" --> (974:0-974:17) "\n\t\t\t\t\tprevError =" -(1567:18-1567:26) " console" --> (974:17-974:25) " console" -(1567:26-1568:6) ".error;\n " --> (974:25-975:0) ".error;" -(1568:6-1568:18) " prevGroup =" --> (975:0-975:17) "\n\t\t\t\t\tprevGroup =" -(1568:18-1568:26) " console" --> (975:17-975:25) " console" -(1568:26-1569:6) ".group;\n " --> (975:25-976:0) ".group;" -(1569:6-1569:27) " prevGroupCollapsed =" --> (976:0-976:26) "\n\t\t\t\t\tprevGroupCollapsed =" -(1569:27-1569:35) " console" --> (976:26-976:34) " console" -(1569:35-1570:6) ".groupCollapsed;\n " --> (976:34-977:0) ".groupCollapsed;" -(1570:6-1570:21) " prevGroupEnd =" --> (977:0-977:20) "\n\t\t\t\t\tprevGroupEnd =" -(1570:21-1570:29) " console" --> (977:20-977:28) " console" -(1570:29-1572:6) ".groupEnd; // https://github.com/facebook/react/issues/19099\n\n " --> (977:28-978:5) ".groupEnd;\n\t\t\t\t" -(1572:6-1572:10) " var" --> (978:5-978:9) "\tvar" -(1572:10-1572:18) " props =" --> (978:9-978:17) " props =" -(1572:18-1573:8) " {\n " --> (978:17-979:6) " {\n\t\t\t\t\t" -(1573:8-1573:22) " configurable:" --> (979:6-979:20) "\tconfigurable:" -(1573:22-1574:8) " true,\n " --> (979:20-980:6) " true,\n\t\t\t\t\t" -(1574:8-1574:20) " enumerable:" --> (980:6-980:18) "\tenumerable:" -(1574:20-1575:8) " true,\n " --> (980:18-981:6) " true,\n\t\t\t\t\t" -(1575:8-1575:15) " value:" --> (981:6-981:13) "\tvalue:" -(1575:15-1576:8) " disabledLog,\n " --> (981:13-982:6) " disabledLog,\n\t\t\t\t\t" -(1576:8-1576:18) " writable:" --> (982:6-982:16) "\twritable:" -(1576:18-1577:7) " true\n " --> (982:16-983:5) " true\n\t\t\t\t" -(1577:7-1579:6) "}; // $FlowFixMe Flow thinks console is immutable.\n\n " --> (983:5-984:0) "\t};" -(1579:6-1579:13) " Object" --> (984:0-984:12) "\n\t\t\t\t\tObject" -(1579:13-1579:30) ".defineProperties" --> (984:12-984:29) ".defineProperties" -(1579:30-1579:39) "(console," --> (984:29-984:38) "(console," -(1579:39-1580:8) " {\n " --> (984:38-985:6) " {\n\t\t\t\t\t" -(1580:8-1580:14) " info:" --> (985:6-985:12) "\tinfo:" -(1580:14-1581:8) " props,\n " --> (985:12-986:6) " props,\n\t\t\t\t\t" -(1581:8-1581:13) " log:" --> (986:6-986:11) "\tlog:" -(1581:13-1582:8) " props,\n " --> (986:11-987:6) " props,\n\t\t\t\t\t" -(1582:8-1582:14) " warn:" --> (987:6-987:12) "\twarn:" -(1582:14-1583:8) " props,\n " --> (987:12-988:6) " props,\n\t\t\t\t\t" -(1583:8-1583:15) " error:" --> (988:6-988:13) "\terror:" -(1583:15-1584:8) " props,\n " --> (988:13-989:6) " props,\n\t\t\t\t\t" -(1584:8-1584:15) " group:" --> (989:6-989:13) "\tgroup:" -(1584:15-1585:8) " props,\n " --> (989:13-990:6) " props,\n\t\t\t\t\t" -(1585:8-1585:24) " groupCollapsed:" --> (990:6-990:22) "\tgroupCollapsed:" -(1585:24-1586:8) " props,\n " --> (990:22-991:6) " props,\n\t\t\t\t\t" -(1586:8-1586:18) " groupEnd:" --> (991:6-991:16) "\tgroupEnd:" -(1586:18-1587:7) " props\n " --> (991:16-992:5) " props\n\t\t\t\t" -(1587:7-1587:8) "}" --> (992:5-992:7) "\t}" -(1587:8-1589:5) ");\n /* eslint-enable react-internal/no-production-logging */\n " --> (992:7-993:4) ");\n\t\t\t" -(1589:5-1591:4) "}\n\n " --> (993:4-994:0) "\t}" -(1591:4-1592:3) " disabledDepth++;\n " --> (994:0-995:3) "\n\t\t\t\tdisabledDepth++;\n\t\t" -(1592:3-1593:1) "}\n" --> (995:3-996:2) "\t}\n\t" -(1593:1-1594:0) "}" --> (996:2-997:2) "\t}\n\t" -(1594:0-1594:9) "\nfunction" --> (997:2-997:11) "\tfunction" -(1594:9-1594:24) " reenableLogs()" --> (997:11-997:26) " reenableLogs()" -(1594:24-1595:2) " {\n " --> (997:26-998:3) " {\n\t\t" -(1595:2-1596:4) " {\n " --> (998:3-999:0) "\t{" -(1596:4-1598:4) " disabledDepth--;\n\n " --> (999:0-1000:0) "\n\t\t\t\tdisabledDepth--;" -(1598:4-1598:8) " if " --> (1000:0-1000:8) "\n\t\t\t\tif " -(1598:8-1598:26) "(disabledDepth ===" --> (1000:8-1000:26) "(disabledDepth ===" -(1598:26-1598:29) " 0)" --> (1000:26-1000:29) " 0)" -(1598:29-1600:6) " {\n /* eslint-disable react-internal/no-production-logging */\n " --> (1000:29-1001:5) " {\n\t\t\t\t" -(1600:6-1600:10) " var" --> (1001:5-1001:9) "\tvar" -(1600:10-1600:18) " props =" --> (1001:9-1001:17) " props =" -(1600:18-1601:8) " {\n " --> (1001:17-1002:6) " {\n\t\t\t\t\t" -(1601:8-1601:22) " configurable:" --> (1002:6-1002:20) "\tconfigurable:" -(1601:22-1602:8) " true,\n " --> (1002:20-1003:6) " true,\n\t\t\t\t\t" -(1602:8-1602:20) " enumerable:" --> (1003:6-1003:18) "\tenumerable:" -(1602:20-1603:8) " true,\n " --> (1003:18-1004:6) " true,\n\t\t\t\t\t" -(1603:8-1603:18) " writable:" --> (1004:6-1004:16) "\twritable:" -(1603:18-1604:7) " true\n " --> (1004:16-1005:5) " true\n\t\t\t\t" -(1604:7-1606:6) "}; // $FlowFixMe Flow thinks console is immutable.\n\n " --> (1005:5-1006:0) "\t};" -(1606:6-1606:13) " Object" --> (1006:0-1006:12) "\n\t\t\t\t\tObject" -(1606:13-1606:30) ".defineProperties" --> (1006:12-1006:29) ".defineProperties" -(1606:30-1606:39) "(console," --> (1006:29-1006:38) "(console," -(1606:39-1607:8) " {\n " --> (1006:38-1007:6) " {\n\t\t\t\t\t" -(1607:8-1607:13) " log:" --> (1007:6-1007:11) "\tlog:" -(1607:13-1607:21) " _assign" --> (1007:11-1007:19) " _assign" -(1607:21-1607:23) "({" --> (1007:19-1007:20) "(" -(1607:23-1607:25) "}," --> (1007:20-1007:23) "{}," -(1607:25-1607:32) " props," --> (1007:23-1007:30) " props," -(1607:32-1608:10) " {\n " --> (1007:30-1007:31) " " -(1608:10-1608:17) " value:" --> (1007:31-1007:38) "{value:" -(1608:17-1609:9) " prevLog\n " --> (1007:38-1007:45) " prevLo" -(1609:9-1609:10) "}" --> (1007:45-1007:47) "g}" -(1609:10-1610:8) "),\n " --> (1007:47-1008:6) "),\n\t\t\t\t\t" -(1610:8-1610:14) " info:" --> (1008:6-1008:12) "\tinfo:" -(1610:14-1610:22) " _assign" --> (1008:12-1008:20) " _assign" -(1610:22-1610:24) "({" --> (1008:20-1008:21) "(" -(1610:24-1610:26) "}," --> (1008:21-1008:24) "{}," -(1610:26-1610:33) " props," --> (1008:24-1008:31) " props," -(1610:33-1611:10) " {\n " --> (1008:31-1008:32) " " -(1611:10-1611:17) " value:" --> (1008:32-1008:39) "{value:" -(1611:17-1612:9) " prevInfo\n " --> (1008:39-1008:47) " prevInf" -(1612:9-1612:10) "}" --> (1008:47-1008:49) "o}" -(1612:10-1613:8) "),\n " --> (1008:49-1009:6) "),\n\t\t\t\t\t" -(1613:8-1613:14) " warn:" --> (1009:6-1009:12) "\twarn:" -(1613:14-1613:22) " _assign" --> (1009:12-1009:20) " _assign" -(1613:22-1613:24) "({" --> (1009:20-1009:21) "(" -(1613:24-1613:26) "}," --> (1009:21-1009:24) "{}," -(1613:26-1613:33) " props," --> (1009:24-1009:31) " props," -(1613:33-1614:10) " {\n " --> (1009:31-1009:32) " " -(1614:10-1614:17) " value:" --> (1009:32-1009:39) "{value:" -(1614:17-1615:9) " prevWarn\n " --> (1009:39-1009:47) " prevWar" -(1615:9-1615:10) "}" --> (1009:47-1009:49) "n}" -(1615:10-1616:8) "),\n " --> (1009:49-1010:6) "),\n\t\t\t\t\t" -(1616:8-1616:15) " error:" --> (1010:6-1010:13) "\terror:" -(1616:15-1616:23) " _assign" --> (1010:13-1010:21) " _assign" -(1616:23-1616:25) "({" --> (1010:21-1010:22) "(" -(1616:25-1616:27) "}," --> (1010:22-1010:25) "{}," -(1616:27-1616:34) " props," --> (1010:25-1010:32) " props," -(1616:34-1617:10) " {\n " --> (1010:32-1010:33) " " -(1617:10-1617:17) " value:" --> (1010:33-1010:40) "{value:" -(1617:17-1618:9) " prevError\n " --> (1010:40-1010:49) " prevErro" -(1618:9-1618:10) "}" --> (1010:49-1010:51) "r}" -(1618:10-1619:8) "),\n " --> (1010:51-1011:6) "),\n\t\t\t\t\t" -(1619:8-1619:15) " group:" --> (1011:6-1011:13) "\tgroup:" -(1619:15-1619:23) " _assign" --> (1011:13-1011:21) " _assign" -(1619:23-1619:25) "({" --> (1011:21-1011:22) "(" -(1619:25-1619:27) "}," --> (1011:22-1011:25) "{}," -(1619:27-1619:34) " props," --> (1011:25-1011:32) " props," -(1619:34-1620:10) " {\n " --> (1011:32-1011:33) " " -(1620:10-1620:17) " value:" --> (1011:33-1011:40) "{value:" -(1620:17-1621:9) " prevGroup\n " --> (1011:40-1011:49) " prevGrou" -(1621:9-1621:10) "}" --> (1011:49-1011:51) "p}" -(1621:10-1622:8) "),\n " --> (1011:51-1012:6) "),\n\t\t\t\t\t" -(1622:8-1622:24) " groupCollapsed:" --> (1012:6-1012:22) "\tgroupCollapsed:" -(1622:24-1622:32) " _assign" --> (1012:22-1012:30) " _assign" -(1622:32-1622:34) "({" --> (1012:30-1012:31) "(" -(1622:34-1622:36) "}," --> (1012:31-1012:34) "{}," -(1622:36-1622:43) " props," --> (1012:34-1012:41) " props," -(1622:43-1623:10) " {\n " --> (1012:41-1012:42) " " -(1623:10-1623:17) " value:" --> (1012:42-1012:49) "{value:" -(1623:17-1624:9) " prevGroupCollapsed\n " --> (1012:49-1012:67) " prevGroupCollapse" -(1624:9-1624:10) "}" --> (1012:67-1012:69) "d}" -(1624:10-1625:8) "),\n " --> (1012:69-1013:6) "),\n\t\t\t\t\t" -(1625:8-1625:18) " groupEnd:" --> (1013:6-1013:16) "\tgroupEnd:" -(1625:18-1625:26) " _assign" --> (1013:16-1013:24) " _assign" -(1625:26-1625:28) "({" --> (1013:24-1013:25) "(" -(1625:28-1625:30) "}," --> (1013:25-1013:28) "{}," -(1625:30-1625:37) " props," --> (1013:28-1013:35) " props," -(1625:37-1626:10) " {\n " --> (1013:35-1013:36) " " -(1626:10-1626:17) " value:" --> (1013:36-1013:43) "{value:" -(1626:17-1627:9) " prevGroupEnd\n " --> (1013:43-1013:55) " prevGroupEn" -(1627:9-1627:10) "}" --> (1013:55-1013:57) "d}" -(1627:10-1628:7) ")\n " --> (1013:57-1014:5) ")\n\t\t\t\t" -(1628:7-1628:8) "}" --> (1014:5-1014:7) "\t}" -(1628:8-1630:5) ");\n /* eslint-enable react-internal/no-production-logging */\n " --> (1014:7-1015:4) ");\n\t\t\t" -(1630:5-1632:4) "}\n\n " --> (1015:4-1016:0) "\t}" -(1632:4-1632:8) " if " --> (1016:0-1016:8) "\n\t\t\t\tif " -(1632:8-1632:24) "(disabledDepth <" --> (1016:8-1016:24) "(disabledDepth <" -(1632:24-1632:27) " 0)" --> (1016:24-1016:27) " 0)" -(1632:27-1633:6) " {\n " --> (1016:27-1017:0) " {" -(1633:6-1633:12) " error" --> (1017:0-1017:11) "\n\t\t\t\t\terror" -(1633:12-1633:48) "('disabledDepth fell below zero. ' +" --> (1017:11-1017:47) "('disabledDepth fell below zero. ' +" -(1633:48-1633:96) " 'This is a bug in React. Please file an issue.'" --> (1017:47-1017:95) " 'This is a bug in React. Please file an issue.'" -(1633:96-1634:5) ");\n " --> (1017:95-1018:4) ");\n\t\t\t" -(1634:5-1635:3) "}\n " --> (1018:4-1019:3) "\t}\n\t\t" -(1635:3-1636:1) "}\n" --> (1019:3-1020:2) "\t}\n\t" -(1636:1-1638:0) "}\n" --> (1020:2-1021:2) "\t}\n\t" -(1638:0-1638:4) "\nvar" --> (1021:2-1021:6) "\tvar" -(1638:4-1638:31) " ReactCurrentDispatcher$1 =" --> (1021:6-1021:33) " ReactCurrentDispatcher$1 =" -(1638:31-1638:52) " ReactSharedInternals" --> (1021:33-1021:54) " ReactSharedInternals" -(1638:52-1639:0) ".ReactCurrentDispatcher;" --> (1021:54-1022:2) ".ReactCurrentDispatcher;\n\t" -(1639:0-1639:4) "\nvar" --> (1022:2-1022:6) "\tvar" -(1639:4-1640:0) " prefix;" --> (1022:6-1023:2) " prefix;\n\t" -(1640:0-1640:9) "\nfunction" --> (1023:2-1023:11) "\tfunction" -(1640:9-1640:39) " describeBuiltInComponentFrame" --> (1023:11-1023:41) " describeBuiltInComponentFrame" -(1640:39-1640:45) "(name," --> (1023:41-1023:47) "(name," -(1640:45-1640:53) " source," --> (1023:47-1023:55) " source," -(1640:53-1640:62) " ownerFn)" --> (1023:55-1023:64) " ownerFn)" -(1640:62-1641:2) " {\n " --> (1023:64-1024:3) " {\n\t\t" -(1641:2-1642:4) " {\n " --> (1024:3-1025:0) "\t{" -(1642:4-1642:8) " if " --> (1025:0-1025:8) "\n\t\t\t\tif " -(1642:8-1642:19) "(prefix ===" --> (1025:8-1025:19) "(prefix ===" -(1642:19-1642:30) " undefined)" --> (1025:19-1025:30) " undefined)" -(1642:30-1644:6) " {\n // Extract the VM specific prefix used by each line.\n " --> (1025:30-1026:0) " {" -(1644:6-1644:10) " try" --> (1026:0-1026:9) "\n\t\t\t\t\ttry" -(1644:10-1645:8) " {\n " --> (1026:9-1027:0) " {" -(1645:8-1645:14) " throw" --> (1027:0-1027:12) "\n\t\t\t\t\t\tthrow" -(1645:14-1645:21) " Error(" --> (1027:12-1027:19) " Error(" -(1645:21-1646:7) ");\n " --> (1027:19-1028:5) ");\n\t\t\t\t" -(1646:7-1646:15) "} catch " --> (1028:5-1028:14) "\t} catch " -(1646:15-1646:18) "(x)" --> (1028:14-1028:17) "(x)" -(1646:18-1647:8) " {\n " --> (1028:17-1029:6) " {\n\t\t\t\t\t" -(1647:8-1647:12) " var" --> (1029:6-1029:10) "\tvar" -(1647:12-1647:20) " match =" --> (1029:10-1029:18) " match =" -(1647:20-1647:22) " x" --> (1029:18-1029:20) " x" -(1647:22-1647:28) ".stack" --> (1029:20-1029:26) ".stack" -(1647:28-1647:34) ".trim(" --> (1029:26-1029:32) ".trim(" -(1647:34-1647:35) ")" --> (1029:32-1029:33) ")" -(1647:35-1647:41) ".match" --> (1029:33-1029:39) ".match" -(1647:41-1647:56) "(/\\n( *(at )?)/" --> (1029:39-1029:54) "(/\\n( *(at )?)/" -(1647:56-1648:8) ");\n " --> (1029:54-1030:0) ");" -(1648:8-1648:17) " prefix =" --> (1030:0-1030:15) "\n\t\t\t\t\t\tprefix =" -(1648:17-1648:26) " match &&" --> (1030:15-1030:24) " match &&" -(1648:26-1648:32) " match" --> (1030:24-1030:30) " match" -(1648:32-1648:38) "[1] ||" --> (1030:30-1030:36) "[1] ||" -(1648:38-1649:7) " '';\n " --> (1030:36-1031:5) " '';\n\t\t\t\t" -(1649:7-1650:5) "}\n " --> (1031:5-1032:4) "\t}\n\t\t\t" -(1650:5-1653:4) "} // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n " --> (1032:4-1033:0) "\t}" -(1653:4-1653:11) " return" --> (1033:0-1033:11) "\n\t\t\t\treturn" -(1653:11-1653:18) " '\\n' +" --> (1033:11-1033:18) " '\\n' +" -(1653:18-1653:27) " prefix +" --> (1033:18-1033:27) " prefix +" -(1653:27-1654:3) " name;\n " --> (1033:27-1034:3) " name;\n\t\t" -(1654:3-1655:1) "}\n" --> (1034:3-1035:2) "\t}\n\t" -(1655:1-1656:0) "}" --> (1035:2-1036:2) "\t}\n\t" -(1656:0-1656:4) "\nvar" --> (1036:2-1036:6) "\tvar" -(1656:4-1656:14) " reentry =" --> (1036:6-1036:16) " reentry =" -(1656:14-1657:0) " false;" --> (1036:16-1037:2) " false;\n\t" -(1657:0-1657:4) "\nvar" --> (1037:2-1037:6) "\tvar" -(1657:4-1659:0) " componentFrameCache;\n" --> (1037:6-1038:2) " componentFrameCache;\n\t" -(1659:0-1660:2) "\n{\n " --> (1038:2-1039:3) "\t{\n\t\t" -(1660:2-1660:6) " var" --> (1039:3-1039:7) "\tvar" -(1660:6-1660:31) " PossiblyWeakMap = typeof" --> (1039:7-1039:32) " PossiblyWeakMap = typeof" -(1660:31-1660:43) " WeakMap ===" --> (1039:32-1039:44) " WeakMap ===" -(1660:43-1660:56) " 'function' ?" --> (1039:44-1039:57) " 'function' ?" -(1660:56-1660:66) " WeakMap :" --> (1039:57-1039:67) " WeakMap :" -(1660:66-1661:2) " Map;\n " --> (1039:67-1040:0) " Map;" -(1661:2-1661:24) " componentFrameCache =" --> (1040:0-1040:25) "\n\t\t\tcomponentFrameCache =" -(1661:24-1661:28) " new" --> (1040:25-1040:29) " new" -(1661:28-1662:1) " PossiblyWeakMap();\n" --> (1040:29-1041:2) " PossiblyWeakMap();\n\t" -(1662:1-1664:0) "}\n" --> (1041:2-1042:2) "\t}\n\t" -(1664:0-1664:9) "\nfunction" --> (1042:2-1042:11) "\tfunction" -(1664:9-1664:38) " describeNativeComponentFrame" --> (1042:11-1042:40) " describeNativeComponentFrame" -(1664:38-1664:42) "(fn," --> (1042:40-1042:44) "(fn," -(1664:42-1664:53) " construct)" --> (1042:44-1042:55) " construct)" -(1664:53-1666:2) " {\n // If something asked for a stack inside a fake render, it should get ignored.\n " --> (1042:55-1043:0) " {" -(1666:2-1666:7) " if (" --> (1043:0-1043:8) "\n\t\t\tif (" -(1666:7-1666:13) "!fn ||" --> (1043:8-1043:14) "!fn ||" -(1666:13-1666:22) " reentry)" --> (1043:14-1043:23) " reentry)" -(1666:22-1667:4) " {\n " --> (1043:23-1044:0) " {" -(1667:4-1667:11) " return" --> (1044:0-1044:11) "\n\t\t\t\treturn" -(1667:11-1668:3) " '';\n " --> (1044:11-1045:3) " '';\n\t\t" -(1668:3-1670:2) "}\n\n " --> (1045:3-1046:3) "\t}\n\t\t" -(1670:2-1671:4) " {\n " --> (1046:3-1047:4) "\t{\n\t\t\t" -(1671:4-1671:8) " var" --> (1047:4-1047:8) "\tvar" -(1671:8-1671:16) " frame =" --> (1047:8-1047:16) " frame =" -(1671:16-1671:36) " componentFrameCache" --> (1047:16-1047:36) " componentFrameCache" -(1671:36-1671:40) ".get" --> (1047:36-1047:40) ".get" -(1671:40-1671:43) "(fn" --> (1047:40-1047:43) "(fn" -(1671:43-1673:4) ");\n\n " --> (1047:43-1048:0) ");" -(1673:4-1673:8) " if " --> (1048:0-1048:8) "\n\t\t\t\tif " -(1673:8-1673:18) "(frame !==" --> (1048:8-1048:18) "(frame !==" -(1673:18-1673:29) " undefined)" --> (1048:18-1048:29) " undefined)" -(1673:29-1674:6) " {\n " --> (1048:29-1049:0) " {" -(1674:6-1674:13) " return" --> (1049:0-1049:12) "\n\t\t\t\t\treturn" -(1674:13-1675:5) " frame;\n " --> (1049:12-1050:4) " frame;\n\t\t\t" -(1675:5-1676:3) "}\n " --> (1050:4-1051:3) "\t}\n\t\t" -(1676:3-1678:2) "}\n\n " --> (1051:3-1052:3) "\t}\n\t\t" -(1678:2-1678:6) " var" --> (1052:3-1052:7) "\tvar" -(1678:6-1679:2) " control;\n " --> (1052:7-1053:0) " control;" -(1679:2-1679:12) " reentry =" --> (1053:0-1053:13) "\n\t\t\treentry =" -(1679:12-1680:2) " true;\n " --> (1053:13-1054:3) " true;\n\t\t" -(1680:2-1680:6) " var" --> (1054:3-1054:7) "\tvar" -(1680:6-1680:34) " previousPrepareStackTrace =" --> (1054:7-1054:35) " previousPrepareStackTrace =" -(1680:34-1680:40) " Error" --> (1054:35-1054:41) " Error" -(1680:40-1682:2) ".prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n " --> (1054:41-1055:0) ".prepareStackTrace;" -(1682:2-1682:8) " Error" --> (1055:0-1055:9) "\n\t\t\tError" -(1682:8-1682:28) ".prepareStackTrace =" --> (1055:9-1055:29) ".prepareStackTrace =" -(1682:28-1683:2) " undefined;\n " --> (1055:29-1056:3) " undefined;\n\t\t" -(1683:2-1683:6) " var" --> (1056:3-1056:7) "\tvar" -(1683:6-1685:2) " previousDispatcher;\n\n " --> (1056:7-1057:3) " previousDispatcher;\n\t\t" -(1685:2-1686:4) " {\n " --> (1057:3-1058:0) "\t{" -(1686:4-1686:25) " previousDispatcher =" --> (1058:0-1058:25) "\n\t\t\t\tpreviousDispatcher =" -(1686:25-1686:50) " ReactCurrentDispatcher$1" --> (1058:25-1058:50) " ReactCurrentDispatcher$1" -(1686:50-1689:4) ".current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n " --> (1058:50-1059:0) ".current;" -(1689:4-1689:29) " ReactCurrentDispatcher$1" --> (1059:0-1059:29) "\n\t\t\t\tReactCurrentDispatcher$1" -(1689:29-1689:39) ".current =" --> (1059:29-1059:39) ".current =" -(1689:39-1690:4) " null;\n " --> (1059:39-1060:0) " null;" -(1690:4-1690:17) " disableLogs(" --> (1060:0-1060:17) "\n\t\t\t\tdisableLogs(" -(1690:17-1691:3) ");\n " --> (1060:17-1061:3) ");\n\t\t" -(1691:3-1693:2) "}\n\n " --> (1061:3-1062:0) "\t}" -(1693:2-1693:6) " try" --> (1062:0-1062:7) "\n\t\t\ttry" -(1693:6-1695:4) " {\n // This should throw.\n " --> (1062:7-1063:0) " {" -(1695:4-1695:8) " if " --> (1063:0-1063:8) "\n\t\t\t\tif " -(1695:8-1695:19) "(construct)" --> (1063:8-1063:19) "(construct)" -(1695:19-1697:6) " {\n // Something should be setting the props in the constructor.\n " --> (1063:19-1064:5) " {\n\t\t\t\t" -(1697:6-1697:10) " var" --> (1064:5-1064:9) "\tvar" -(1697:10-1697:17) " Fake =" --> (1064:9-1064:16) " Fake =" -(1697:17-1697:29) " function ()" --> (1064:16-1064:27) " function()" -(1697:29-1698:8) " {\n " --> (1064:27-1065:0) " {" -(1698:8-1698:14) " throw" --> (1065:0-1065:12) "\n\t\t\t\t\t\tthrow" -(1698:14-1698:21) " Error(" --> (1065:12-1065:19) " Error(" -(1698:21-1699:7) ");\n " --> (1065:19-1066:5) ");\n\t\t\t\t" -(1699:7-1702:6) "}; // $FlowFixMe\n\n\n " --> (1066:5-1067:0) "\t};" -(1702:6-1702:13) " Object" --> (1067:0-1067:12) "\n\t\t\t\t\tObject" -(1702:13-1702:28) ".defineProperty" --> (1067:12-1067:27) ".defineProperty" -(1702:28-1702:33) "(Fake" --> (1067:27-1067:32) "(Fake" -(1702:33-1702:44) ".prototype," --> (1067:32-1067:43) ".prototype," -(1702:44-1702:53) " 'props'," --> (1067:43-1067:52) " 'props'," -(1702:53-1703:8) " {\n " --> (1067:52-1067:53) " " -(1703:8-1703:13) " set:" --> (1067:53-1067:58) "{set:" -(1703:13-1703:25) " function ()" --> (1067:58-1067:69) " function()" -(1703:25-1706:10) " {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n " --> (1067:69-1068:0) " {" -(1706:10-1706:16) " throw" --> (1068:0-1068:12) "\n\t\t\t\t\t\tthrow" -(1706:16-1706:23) " Error(" --> (1068:12-1068:19) " Error(" -(1706:23-1707:9) ");\n " --> (1068:19-1069:5) ");\n\t\t\t\t" -(1707:9-1708:7) "}\n " --> (1069:5-1069:6) "\t" -(1708:7-1708:8) "}" --> (1069:6-1069:8) "}}" -(1708:8-1710:6) ");\n\n " --> (1069:8-1070:0) ");" -(1710:6-1710:17) " if (typeof" --> (1070:0-1070:16) "\n\t\t\t\t\tif (typeof" -(1710:17-1710:29) " Reflect ===" --> (1070:16-1070:28) " Reflect ===" -(1710:29-1710:41) " 'object' &&" --> (1070:28-1070:40) " 'object' &&" -(1710:41-1710:49) " Reflect" --> (1070:40-1070:48) " Reflect" -(1710:49-1710:60) ".construct)" --> (1070:48-1070:59) ".construct)" -(1710:60-1713:8) " {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n " --> (1070:59-1071:0) " {" -(1713:8-1713:12) " try" --> (1071:0-1071:10) "\n\t\t\t\t\t\ttry" -(1713:12-1714:10) " {\n " --> (1071:10-1072:0) " {" -(1714:10-1714:18) " Reflect" --> (1072:0-1072:15) "\n\t\t\t\t\t\t\tReflect" -(1714:18-1714:28) ".construct" --> (1072:15-1072:25) ".construct" -(1714:28-1714:34) "(Fake," --> (1072:25-1072:31) "(Fake," -(1714:34-1714:36) " [" --> (1072:31-1072:33) " [" -(1714:36-1714:37) "]" --> (1072:33-1072:34) "]" -(1714:37-1715:9) ");\n " --> (1072:34-1073:6) ");\n\t\t\t\t\t" -(1715:9-1715:17) "} catch " --> (1073:6-1073:15) "\t} catch " -(1715:17-1715:20) "(x)" --> (1073:15-1073:18) "(x)" -(1715:20-1716:10) " {\n " --> (1073:18-1074:0) " {" -(1716:10-1716:20) " control =" --> (1074:0-1074:17) "\n\t\t\t\t\t\t\tcontrol =" -(1716:20-1717:9) " x;\n " --> (1074:17-1075:6) " x;\n\t\t\t\t\t" -(1717:9-1719:8) "}\n\n " --> (1075:6-1076:0) "\t}" -(1719:8-1719:16) " Reflect" --> (1076:0-1076:14) "\n\t\t\t\t\t\tReflect" -(1719:16-1719:26) ".construct" --> (1076:14-1076:24) ".construct" -(1719:26-1719:30) "(fn," --> (1076:24-1076:28) "(fn," -(1719:30-1719:32) " [" --> (1076:28-1076:30) " [" -(1719:32-1719:34) "]," --> (1076:30-1076:32) "]," -(1719:34-1719:39) " Fake" --> (1076:32-1076:37) " Fake" -(1719:39-1720:7) ");\n " --> (1076:37-1077:5) ");\n\t\t\t\t" -(1720:7-1720:13) "} else" --> (1077:5-1077:12) "\t} else" -(1720:13-1721:8) " {\n " --> (1077:12-1078:0) " {" -(1721:8-1721:12) " try" --> (1078:0-1078:10) "\n\t\t\t\t\t\ttry" -(1721:12-1722:10) " {\n " --> (1078:10-1079:0) " {" -(1722:10-1722:15) " Fake" --> (1079:0-1079:12) "\n\t\t\t\t\t\t\tFake" -(1722:15-1722:21) ".call(" --> (1079:12-1079:18) ".call(" -(1722:21-1723:9) ");\n " --> (1079:18-1080:6) ");\n\t\t\t\t\t" -(1723:9-1723:17) "} catch " --> (1080:6-1080:15) "\t} catch " -(1723:17-1723:20) "(x)" --> (1080:15-1080:18) "(x)" -(1723:20-1724:10) " {\n " --> (1080:18-1081:0) " {" -(1724:10-1724:20) " control =" --> (1081:0-1081:17) "\n\t\t\t\t\t\t\tcontrol =" -(1724:20-1725:9) " x;\n " --> (1081:17-1082:6) " x;\n\t\t\t\t\t" -(1725:9-1727:8) "}\n\n " --> (1082:6-1083:0) "\t}" -(1727:8-1727:11) " fn" --> (1083:0-1083:9) "\n\t\t\t\t\t\tfn" -(1727:11-1727:16) ".call" --> (1083:9-1083:14) ".call" -(1727:16-1727:21) "(Fake" --> (1083:14-1083:19) "(Fake" -(1727:21-1727:31) ".prototype" --> (1083:19-1083:29) ".prototype" -(1727:31-1728:7) ");\n " --> (1083:29-1084:5) ");\n\t\t\t\t" -(1728:7-1729:5) "}\n " --> (1084:5-1085:4) "\t}\n\t\t\t" -(1729:5-1729:11) "} else" --> (1085:4-1085:11) "\t} else" -(1729:11-1730:6) " {\n " --> (1085:11-1086:0) " {" -(1730:6-1730:10) " try" --> (1086:0-1086:9) "\n\t\t\t\t\ttry" -(1730:10-1731:8) " {\n " --> (1086:9-1087:0) " {" -(1731:8-1731:14) " throw" --> (1087:0-1087:12) "\n\t\t\t\t\t\tthrow" -(1731:14-1731:21) " Error(" --> (1087:12-1087:19) " Error(" -(1731:21-1732:7) ");\n " --> (1087:19-1088:5) ");\n\t\t\t\t" -(1732:7-1732:15) "} catch " --> (1088:5-1088:14) "\t} catch " -(1732:15-1732:18) "(x)" --> (1088:14-1088:17) "(x)" -(1732:18-1733:8) " {\n " --> (1088:17-1089:0) " {" -(1733:8-1733:18) " control =" --> (1089:0-1089:16) "\n\t\t\t\t\t\tcontrol =" -(1733:18-1734:7) " x;\n " --> (1089:16-1090:5) " x;\n\t\t\t\t" -(1734:7-1736:6) "}\n\n " --> (1090:5-1091:0) "\t}" -(1736:6-1736:10) " fn(" --> (1091:0-1091:9) "\n\t\t\t\t\tfn(" -(1736:10-1737:5) ");\n " --> (1091:9-1092:4) ");\n\t\t\t" -(1737:5-1738:3) "}\n " --> (1092:4-1093:3) "\t}\n\t\t" -(1738:3-1738:11) "} catch " --> (1093:3-1093:12) "\t} catch " -(1738:11-1738:19) "(sample)" --> (1093:12-1093:20) "(sample)" -(1738:19-1740:4) " {\n // This is inlined manually because closure doesn't do it for us.\n " --> (1093:20-1094:0) " {" -(1740:4-1740:8) " if " --> (1094:0-1094:8) "\n\t\t\t\tif " -(1740:8-1740:18) "(sample &&" --> (1094:8-1094:18) "(sample &&" -(1740:18-1740:36) " control && typeof" --> (1094:18-1094:36) " control && typeof" -(1740:36-1740:43) " sample" --> (1094:36-1094:43) " sample" -(1740:43-1740:53) ".stack ===" --> (1094:43-1094:53) ".stack ===" -(1740:53-1740:63) " 'string')" --> (1094:53-1094:63) " 'string')" -(1740:63-1743:6) " {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n " --> (1094:63-1095:5) " {\n\t\t\t\t" -(1743:6-1743:10) " var" --> (1095:5-1095:9) "\tvar" -(1743:10-1743:24) " sampleLines =" --> (1095:9-1095:23) " sampleLines =" -(1743:24-1743:31) " sample" --> (1095:23-1095:30) " sample" -(1743:31-1743:37) ".stack" --> (1095:30-1095:36) ".stack" -(1743:37-1743:43) ".split" --> (1095:36-1095:42) ".split" -(1743:43-1743:48) "('\\n'" --> (1095:42-1095:47) "('\\n'" -(1743:48-1744:6) ");\n " --> (1095:47-1096:5) ");\n\t\t\t\t" -(1744:6-1744:10) " var" --> (1096:5-1096:9) "\tvar" -(1744:10-1744:25) " controlLines =" --> (1096:9-1096:24) " controlLines =" -(1744:25-1744:33) " control" --> (1096:24-1096:32) " control" -(1744:33-1744:39) ".stack" --> (1096:32-1096:38) ".stack" -(1744:39-1744:45) ".split" --> (1096:38-1096:44) ".split" -(1744:45-1744:50) "('\\n'" --> (1096:44-1096:49) "('\\n'" -(1744:50-1745:6) ");\n " --> (1096:49-1097:5) ");\n\t\t\t\t" -(1745:6-1745:10) " var" --> (1097:5-1097:9) "\tvar" -(1745:10-1745:14) " s =" --> (1097:9-1097:13) " s =" -(1745:14-1745:26) " sampleLines" --> (1097:13-1097:25) " sampleLines" -(1745:26-1745:35) ".length -" --> (1097:25-1097:34) ".length -" -(1745:35-1746:6) " 1;\n " --> (1097:34-1098:5) " 1;\n\t\t\t\t" -(1746:6-1746:10) " var" --> (1098:5-1098:9) "\tvar" -(1746:10-1746:14) " c =" --> (1098:9-1098:13) " c =" -(1746:14-1746:27) " controlLines" --> (1098:13-1098:26) " controlLines" -(1746:27-1746:36) ".length -" --> (1098:26-1098:35) ".length -" -(1746:36-1748:6) " 1;\n\n " --> (1098:35-1099:0) " 1;" -(1748:6-1748:13) " while " --> (1099:0-1099:12) "\n\t\t\t\t\twhile " -(1748:13-1748:18) "(s >=" --> (1099:12-1099:17) "(s >=" -(1748:18-1748:23) " 1 &&" --> (1099:17-1099:22) " 1 &&" -(1748:23-1748:28) " c >=" --> (1099:22-1099:27) " c >=" -(1748:28-1748:33) " 0 &&" --> (1099:27-1099:32) " 0 &&" -(1748:33-1748:45) " sampleLines" --> (1099:32-1099:44) " sampleLines" -(1748:45-1748:52) "[s] !==" --> (1099:44-1099:51) "[s] !==" -(1748:52-1748:65) " controlLines" --> (1099:51-1099:64) " controlLines" -(1748:65-1748:69) "[c])" --> (1099:64-1099:68) "[c])" -(1748:69-1755:8) " {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n " --> (1099:68-1100:0) " {" -(1755:8-1756:7) " c--;\n " --> (1100:0-1101:5) "\n\t\t\t\t\t\tc--;\n\t\t\t\t" -(1756:7-1758:6) "}\n\n " --> (1101:5-1102:0) "\t}" -(1758:6-1758:13) " for (;" --> (1102:0-1102:12) "\n\t\t\t\t\tfor (;" -(1758:13-1758:18) " s >=" --> (1102:12-1102:17) " s >=" -(1758:18-1758:23) " 1 &&" --> (1102:17-1102:22) " 1 &&" -(1758:23-1758:28) " c >=" --> (1102:22-1102:27) " c >=" -(1758:28-1758:31) " 0;" --> (1102:27-1102:30) " 0;" -(1758:31-1758:36) " s--," --> (1102:30-1102:35) " s--," -(1758:36-1758:41) " c--)" --> (1102:35-1102:40) " c--)" -(1758:41-1761:8) " {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n " --> (1102:40-1103:0) " {" -(1761:8-1761:12) " if " --> (1103:0-1103:10) "\n\t\t\t\t\t\tif " -(1761:12-1761:24) "(sampleLines" --> (1103:10-1103:22) "(sampleLines" -(1761:24-1761:31) "[s] !==" --> (1103:22-1103:29) "[s] !==" -(1761:31-1761:44) " controlLines" --> (1103:29-1103:42) " controlLines" -(1761:44-1761:48) "[c])" --> (1103:42-1103:46) "[c])" -(1761:48-1767:10) " {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n " --> (1103:46-1104:0) " {" -(1767:10-1767:14) " if " --> (1104:0-1104:11) "\n\t\t\t\t\t\t\tif " -(1767:14-1767:20) "(s !==" --> (1104:11-1104:17) "(s !==" -(1767:20-1767:25) " 1 ||" --> (1104:17-1104:22) " 1 ||" -(1767:25-1767:31) " c !==" --> (1104:22-1104:28) " c !==" -(1767:31-1767:34) " 1)" --> (1104:28-1104:31) " 1)" -(1767:34-1768:12) " {\n " --> (1104:31-1105:0) " {" -(1768:12-1768:15) " do" --> (1105:0-1105:11) "\n\t\t\t\t\t\t\t\tdo" -(1768:15-1769:14) " {\n " --> (1105:11-1106:0) " {" -(1769:14-1770:14) " s--;\n " --> (1106:0-1107:0) "\n\t\t\t\t\t\t\t\t\ts--;" -(1770:14-1773:14) " c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n " --> (1107:0-1108:0) "\n\t\t\t\t\t\t\t\t\tc--;" -(1773:14-1773:18) " if " --> (1108:0-1108:13) "\n\t\t\t\t\t\t\t\t\tif " -(1773:18-1773:22) "(c <" --> (1108:13-1108:17) "(c <" -(1773:22-1773:27) " 0 ||" --> (1108:17-1108:22) " 0 ||" -(1773:27-1773:39) " sampleLines" --> (1108:22-1108:34) " sampleLines" -(1773:39-1773:46) "[s] !==" --> (1108:34-1108:41) "[s] !==" -(1773:46-1773:59) " controlLines" --> (1108:41-1108:54) " controlLines" -(1773:59-1773:63) "[c])" --> (1108:54-1108:58) "[c])" -(1773:63-1775:16) " {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n " --> (1108:58-1109:10) " {\n\t\t\t\t\t\t\t\t\t" -(1775:16-1775:20) " var" --> (1109:10-1109:14) "\tvar" -(1775:20-1775:29) " _frame =" --> (1109:14-1109:23) " _frame =" -(1775:29-1775:36) " '\\n' +" --> (1109:23-1109:30) " '\\n' +" -(1775:36-1775:48) " sampleLines" --> (1109:30-1109:42) " sampleLines" -(1775:48-1775:51) "[s]" --> (1109:42-1109:45) "[s]" -(1775:51-1775:59) ".replace" --> (1109:45-1109:53) ".replace" -(1775:59-1775:71) "(' at new '," --> (1109:53-1109:65) "(' at new '," -(1775:71-1775:78) " ' at '" --> (1109:65-1109:72) " ' at '" -(1775:78-1777:16) ");\n\n " --> (1109:72-1110:10) ");\n\t\t\t\t\t\t\t\t\t" -(1777:16-1778:18) " {\n " --> (1110:10-1111:0) "\t{" -(1778:18-1778:29) " if (typeof" --> (1111:0-1111:22) "\n\t\t\t\t\t\t\t\t\t\t\tif (typeof" -(1778:29-1778:36) " fn ===" --> (1111:22-1111:29) " fn ===" -(1778:36-1778:48) " 'function')" --> (1111:29-1111:41) " 'function')" -(1778:48-1779:20) " {\n " --> (1111:41-1112:0) " {" -(1779:20-1779:40) " componentFrameCache" --> (1112:0-1112:32) "\n\t\t\t\t\t\t\t\t\t\t\t\tcomponentFrameCache" -(1779:40-1779:44) ".set" --> (1112:32-1112:36) ".set" -(1779:44-1779:48) "(fn," --> (1112:36-1112:40) "(fn," -(1779:48-1779:55) " _frame" --> (1112:40-1112:47) " _frame" -(1779:55-1780:19) ");\n " --> (1112:47-1113:11) ");\n\t\t\t\t\t\t\t\t\t\t" -(1780:19-1781:17) "}\n " --> (1113:11-1114:10) "\t}\n\t\t\t\t\t\t\t\t\t" -(1781:17-1784:16) "} // Return the line we found.\n\n\n " --> (1114:10-1115:0) "\t}" -(1784:16-1784:23) " return" --> (1115:0-1115:17) "\n\t\t\t\t\t\t\t\t\t\treturn" -(1784:23-1785:15) " _frame;\n " --> (1115:17-1116:9) " _frame;\n\t\t\t\t\t\t\t\t" -(1785:15-1786:13) "}\n " --> (1116:9-1117:8) "\t}\n\t\t\t\t\t\t\t" -(1786:13-1786:21) "} while " --> (1117:8-1117:17) "\t} while " -(1786:21-1786:26) "(s >=" --> (1117:17-1117:22) "(s >=" -(1786:26-1786:31) " 1 &&" --> (1117:22-1117:27) " 1 &&" -(1786:31-1786:36) " c >=" --> (1117:27-1117:32) " c >=" -(1786:36-1787:11) " 0);\n " --> (1117:32-1118:7) " 0);\n\t\t\t\t\t\t" -(1787:11-1789:10) "}\n\n " --> (1118:7-1119:0) "\t}" -(1789:10-1790:9) " break;\n " --> (1119:0-1120:6) "\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t" -(1790:9-1791:7) "}\n " --> (1120:6-1121:5) "\t}\n\t\t\t\t" -(1791:7-1792:5) "}\n " --> (1121:5-1122:4) "\t}\n\t\t\t" -(1792:5-1793:3) "}\n " --> (1122:4-1123:3) "\t}\n\t\t" -(1793:3-1793:12) "} finally" --> (1123:3-1124:9) "\t}\n finally" -(1793:12-1794:4) " {\n " --> (1124:9-1125:0) " {" -(1794:4-1794:14) " reentry =" --> (1125:0-1125:14) "\n\t\t\t\treentry =" -(1794:14-1796:4) " false;\n\n " --> (1125:14-1126:4) " false;\n\t\t\t" -(1796:4-1797:6) " {\n " --> (1126:4-1127:0) "\t{" -(1797:6-1797:31) " ReactCurrentDispatcher$1" --> (1127:0-1127:30) "\n\t\t\t\t\tReactCurrentDispatcher$1" -(1797:31-1797:41) ".current =" --> (1127:30-1127:40) ".current =" -(1797:41-1798:6) " previousDispatcher;\n " --> (1127:40-1128:0) " previousDispatcher;" -(1798:6-1798:20) " reenableLogs(" --> (1128:0-1128:19) "\n\t\t\t\t\treenableLogs(" -(1798:20-1799:5) ");\n " --> (1128:19-1129:4) ");\n\t\t\t" -(1799:5-1801:4) "}\n\n " --> (1129:4-1130:0) "\t}" -(1801:4-1801:10) " Error" --> (1130:0-1130:10) "\n\t\t\t\tError" -(1801:10-1801:30) ".prepareStackTrace =" --> (1130:10-1130:30) ".prepareStackTrace =" -(1801:30-1802:3) " previousPrepareStackTrace;\n " --> (1130:30-1131:3) " previousPrepareStackTrace;\n\t\t" -(1802:3-1805:2) "} // Fallback to just using the name if we couldn't make it throw.\n\n\n " --> (1131:3-1132:3) "\t}\n\t\t" -(1805:2-1805:6) " var" --> (1132:3-1132:7) "\tvar" -(1805:6-1805:13) " name =" --> (1132:7-1132:14) " name =" -(1805:13-1805:18) " fn ?" --> (1132:14-1132:19) " fn ?" -(1805:18-1805:21) " fn" --> (1132:19-1132:22) " fn" -(1805:21-1805:36) ".displayName ||" --> (1132:22-1132:37) ".displayName ||" -(1805:36-1805:39) " fn" --> (1132:37-1132:40) " fn" -(1805:39-1805:46) ".name :" --> (1132:40-1132:47) ".name :" -(1805:46-1806:2) " '';\n " --> (1132:47-1133:3) " '';\n\t\t" -(1806:2-1806:6) " var" --> (1133:3-1133:7) "\tvar" -(1806:6-1806:23) " syntheticFrame =" --> (1133:7-1133:24) " syntheticFrame =" -(1806:23-1806:30) " name ?" --> (1133:24-1133:31) " name ?" -(1806:30-1806:60) " describeBuiltInComponentFrame" --> (1133:31-1133:61) " describeBuiltInComponentFrame" -(1806:60-1806:65) "(name" --> (1133:61-1133:66) "(name" -(1806:65-1806:68) ") :" --> (1133:66-1133:69) ") :" -(1806:68-1808:2) " '';\n\n " --> (1133:69-1134:3) " '';\n\t\t" -(1808:2-1809:4) " {\n " --> (1134:3-1135:0) "\t{" -(1809:4-1809:15) " if (typeof" --> (1135:0-1135:15) "\n\t\t\t\tif (typeof" -(1809:15-1809:22) " fn ===" --> (1135:15-1135:22) " fn ===" -(1809:22-1809:34) " 'function')" --> (1135:22-1135:34) " 'function')" -(1809:34-1810:6) " {\n " --> (1135:34-1136:0) " {" -(1810:6-1810:26) " componentFrameCache" --> (1136:0-1136:25) "\n\t\t\t\t\tcomponentFrameCache" -(1810:26-1810:30) ".set" --> (1136:25-1136:29) ".set" -(1810:30-1810:34) "(fn," --> (1136:29-1136:33) "(fn," -(1810:34-1810:49) " syntheticFrame" --> (1136:33-1136:48) " syntheticFrame" -(1810:49-1811:5) ");\n " --> (1136:48-1137:4) ");\n\t\t\t" -(1811:5-1812:3) "}\n " --> (1137:4-1138:3) "\t}\n\t\t" -(1812:3-1814:2) "}\n\n " --> (1138:3-1139:0) "\t}" -(1814:2-1814:9) " return" --> (1139:0-1139:10) "\n\t\t\treturn" -(1814:9-1815:1) " syntheticFrame;\n" --> (1139:10-1140:2) " syntheticFrame;\n\t" -(1815:1-1816:0) "}" --> (1140:2-1141:2) "\t}\n\t" -(1816:0-1816:9) "\nfunction" --> (1141:2-1141:11) "\tfunction" -(1816:9-1816:40) " describeFunctionComponentFrame" --> (1141:11-1141:42) " describeFunctionComponentFrame" -(1816:40-1816:44) "(fn," --> (1141:42-1141:46) "(fn," -(1816:44-1816:52) " source," --> (1141:46-1141:54) " source," -(1816:52-1816:61) " ownerFn)" --> (1141:54-1141:63) " ownerFn)" -(1816:61-1817:2) " {\n " --> (1141:63-1142:3) " {\n\t\t" -(1817:2-1818:4) " {\n " --> (1142:3-1143:0) "\t{" -(1818:4-1818:11) " return" --> (1143:0-1143:11) "\n\t\t\t\treturn" -(1818:11-1818:40) " describeNativeComponentFrame" --> (1143:11-1143:40) " describeNativeComponentFrame" -(1818:40-1818:44) "(fn," --> (1143:40-1143:44) "(fn," -(1818:44-1818:50) " false" --> (1143:44-1143:50) " false" -(1818:50-1819:3) ");\n " --> (1143:50-1144:3) ");\n\t\t" -(1819:3-1820:1) "}\n" --> (1144:3-1145:2) "\t}\n\t" -(1820:1-1822:0) "}\n" --> (1145:2-1146:2) "\t}\n\t" -(1822:0-1822:9) "\nfunction" --> (1146:2-1146:11) "\tfunction" -(1822:9-1822:25) " shouldConstruct" --> (1146:11-1146:27) " shouldConstruct" -(1822:25-1822:36) "(Component)" --> (1146:27-1146:38) "(Component)" -(1822:36-1823:2) " {\n " --> (1146:38-1147:3) " {\n\t\t" -(1823:2-1823:6) " var" --> (1147:3-1147:7) "\tvar" -(1823:6-1823:18) " prototype =" --> (1147:7-1147:19) " prototype =" -(1823:18-1823:28) " Component" --> (1147:19-1147:29) " Component" -(1823:28-1824:2) ".prototype;\n " --> (1147:29-1148:0) ".prototype;" -(1824:2-1824:12) " return !!" --> (1148:0-1148:13) "\n\t\t\treturn !!" -(1824:12-1824:25) "(prototype &&" --> (1148:13-1148:26) "(prototype &&" -(1824:25-1824:35) " prototype" --> (1148:26-1148:36) " prototype" -(1824:35-1825:1) ".isReactComponent);\n" --> (1148:36-1149:2) ".isReactComponent);\n\t" -(1825:1-1827:0) "}\n" --> (1149:2-1150:2) "\t}\n\t" -(1827:0-1827:9) "\nfunction" --> (1150:2-1150:11) "\tfunction" -(1827:9-1827:46) " describeUnknownElementTypeFrameInDEV" --> (1150:11-1150:48) " describeUnknownElementTypeFrameInDEV" -(1827:46-1827:52) "(type," --> (1150:48-1150:54) "(type," -(1827:52-1827:60) " source," --> (1150:54-1150:62) " source," -(1827:60-1827:69) " ownerFn)" --> (1150:62-1150:71) " ownerFn)" -(1827:69-1829:2) " {\n\n " --> (1150:71-1151:0) " {" -(1829:2-1829:6) " if " --> (1151:0-1151:7) "\n\t\t\tif " -(1829:6-1829:14) "(type ==" --> (1151:7-1151:15) "(type ==" -(1829:14-1829:20) " null)" --> (1151:15-1151:21) " null)" -(1829:20-1830:4) " {\n " --> (1151:21-1152:0) " {" -(1830:4-1830:11) " return" --> (1152:0-1152:11) "\n\t\t\t\treturn" -(1830:11-1831:3) " '';\n " --> (1152:11-1153:3) " '';\n\t\t" -(1831:3-1833:2) "}\n\n " --> (1153:3-1154:0) "\t}" -(1833:2-1833:13) " if (typeof" --> (1154:0-1154:14) "\n\t\t\tif (typeof" -(1833:13-1833:22) " type ===" --> (1154:14-1154:23) " type ===" -(1833:22-1833:34) " 'function')" --> (1154:23-1154:35) " 'function')" -(1833:34-1834:4) " {\n " --> (1154:35-1155:4) " {\n\t\t\t" -(1834:4-1835:6) " {\n " --> (1155:4-1156:0) "\t{" -(1835:6-1835:13) " return" --> (1156:0-1156:12) "\n\t\t\t\t\treturn" -(1835:13-1835:42) " describeNativeComponentFrame" --> (1156:12-1156:41) " describeNativeComponentFrame" -(1835:42-1835:48) "(type," --> (1156:41-1156:47) "(type," -(1835:48-1835:64) " shouldConstruct" --> (1156:47-1156:63) " shouldConstruct" -(1835:64-1835:69) "(type" --> (1156:63-1156:68) "(type" -(1835:69-1835:70) ")" --> (1156:68-1156:69) ")" -(1835:70-1836:5) ");\n " --> (1156:69-1157:4) ");\n\t\t\t" -(1836:5-1837:3) "}\n " --> (1157:4-1158:3) "\t}\n\t\t" -(1837:3-1839:2) "}\n\n " --> (1158:3-1159:0) "\t}" -(1839:2-1839:13) " if (typeof" --> (1159:0-1159:14) "\n\t\t\tif (typeof" -(1839:13-1839:22) " type ===" --> (1159:14-1159:23) " type ===" -(1839:22-1839:32) " 'string')" --> (1159:23-1159:33) " 'string')" -(1839:32-1840:4) " {\n " --> (1159:33-1160:0) " {" -(1840:4-1840:11) " return" --> (1160:0-1160:11) "\n\t\t\t\treturn" -(1840:11-1840:41) " describeBuiltInComponentFrame" --> (1160:11-1160:41) " describeBuiltInComponentFrame" -(1840:41-1840:46) "(type" --> (1160:41-1160:46) "(type" -(1840:46-1841:3) ");\n " --> (1160:46-1161:3) ");\n\t\t" -(1841:3-1843:2) "}\n\n " --> (1161:3-1162:0) "\t}" -(1843:2-1843:10) " switch " --> (1162:0-1162:11) "\n\t\t\tswitch " -(1843:10-1843:2) " switch " --> (1162:11-1162:17) "(type)" -(1843:2-1844:4) " switch (type) {\n " --> (1162:17-1163:0) " {" -(1844:4-1844:9) " case" --> (1163:0-1163:9) "\n\t\t\t\tcase" -(1844:9-1844:17) " exports" --> (1163:9-1163:17) " exports" -(1844:17-1845:6) ".Suspense:\n " --> (1163:17-1163:26) ".Suspense" -(1845:6-1845:13) " return" --> (1163:26-1163:34) ": return" -(1845:13-1845:43) " describeBuiltInComponentFrame" --> (1163:34-1163:64) " describeBuiltInComponentFrame" -(1845:43-1845:54) "('Suspense'" --> (1163:64-1163:75) "('Suspense'" -(1845:54-1847:4) ");\n\n " --> (1163:75-1164:0) ");" -(1847:4-1847:9) " case" --> (1164:0-1164:9) "\n\t\t\t\tcase" -(1847:9-1848:6) " REACT_SUSPENSE_LIST_TYPE:\n " --> (1164:9-1164:34) " REACT_SUSPENSE_LIST_TYPE" -(1848:6-1848:13) " return" --> (1164:34-1164:42) ": return" -(1848:13-1848:43) " describeBuiltInComponentFrame" --> (1164:42-1164:72) " describeBuiltInComponentFrame" -(1848:43-1848:58) "('SuspenseList'" --> (1164:72-1164:87) "('SuspenseList'" -(1848:58-1849:3) ");\n " --> (1164:87-1165:3) ");\n\t\t" -(1849:3-1851:2) "}\n\n " --> (1165:3-1166:0) "\t}" -(1851:2-1851:13) " if (typeof" --> (1166:0-1166:14) "\n\t\t\tif (typeof" -(1851:13-1851:22) " type ===" --> (1166:14-1166:23) " type ===" -(1851:22-1851:32) " 'object')" --> (1166:23-1166:33) " 'object')" -(1851:32-1852:4) " {\n " --> (1166:33-1167:0) " {" -(1852:4-1852:12) " switch " --> (1167:0-1167:12) "\n\t\t\t\tswitch " -(1852:12-1852:17) "(type" --> (1167:12-1167:17) "(type" -(1852:17-1852:4) " switch (type" --> (1167:17-1167:27) ".$$typeof)" -(1852:4-1853:6) " switch (type.$$typeof) {\n " --> (1167:27-1168:0) " {" -(1853:6-1853:11) " case" --> (1168:0-1168:10) "\n\t\t\t\t\tcase" -(1853:11-1854:8) " REACT_FORWARD_REF_TYPE:\n " --> (1168:10-1168:33) " REACT_FORWARD_REF_TYPE" -(1854:8-1854:15) " return" --> (1168:33-1168:41) ": return" -(1854:15-1854:46) " describeFunctionComponentFrame" --> (1168:41-1168:72) " describeFunctionComponentFrame" -(1854:46-1854:51) "(type" --> (1168:72-1168:77) "(type" -(1854:51-1854:58) ".render" --> (1168:77-1168:84) ".render" -(1854:58-1856:6) ");\n\n " --> (1168:84-1169:0) ");" -(1856:6-1856:11) " case" --> (1169:0-1169:10) "\n\t\t\t\t\tcase" -(1856:11-1858:8) " REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n " --> (1169:10-1169:26) " REACT_MEMO_TYPE" -(1858:8-1858:15) " return" --> (1169:26-1169:34) ": return" -(1858:15-1858:52) " describeUnknownElementTypeFrameInDEV" --> (1169:34-1169:71) " describeUnknownElementTypeFrameInDEV" -(1858:52-1858:57) "(type" --> (1169:71-1169:76) "(type" -(1858:57-1858:63) ".type," --> (1169:76-1169:82) ".type," -(1858:63-1858:71) " source," --> (1169:82-1169:90) " source," -(1858:71-1858:79) " ownerFn" --> (1169:90-1169:98) " ownerFn" -(1858:79-1860:6) ");\n\n " --> (1169:98-1170:0) ");" -(1860:6-1860:11) " case" --> (1170:0-1170:10) "\n\t\t\t\t\tcase" -(1860:11-1861:8) " REACT_BLOCK_TYPE:\n " --> (1170:10-1170:27) " REACT_BLOCK_TYPE" -(1861:8-1861:15) " return" --> (1170:27-1170:35) ": return" -(1861:15-1861:46) " describeFunctionComponentFrame" --> (1170:35-1170:66) " describeFunctionComponentFrame" -(1861:46-1861:51) "(type" --> (1170:66-1170:71) "(type" -(1861:51-1861:59) "._render" --> (1170:71-1170:79) "._render" -(1861:59-1863:6) ");\n\n " --> (1170:79-1171:0) ");" -(1863:6-1863:11) " case" --> (1171:0-1171:10) "\n\t\t\t\t\tcase" -(1863:11-1864:8) " REACT_LAZY_TYPE:\n " --> (1171:10-1171:27) " REACT_LAZY_TYPE:" -(1864:8-1865:10) " {\n " --> (1171:27-1172:6) " {\n\t\t\t\t\t" -(1865:10-1865:14) " var" --> (1172:6-1172:10) "\tvar" -(1865:14-1865:30) " lazyComponent =" --> (1172:10-1172:26) " lazyComponent =" -(1865:30-1866:10) " type;\n " --> (1172:26-1173:6) " type;\n\t\t\t\t\t" -(1866:10-1866:14) " var" --> (1173:6-1173:10) "\tvar" -(1866:14-1866:24) " payload =" --> (1173:10-1173:20) " payload =" -(1866:24-1866:38) " lazyComponent" --> (1173:20-1173:34) " lazyComponent" -(1866:38-1867:10) "._payload;\n " --> (1173:34-1174:6) "._payload;\n\t\t\t\t\t" -(1867:10-1867:14) " var" --> (1174:6-1174:10) "\tvar" -(1867:14-1867:21) " init =" --> (1174:10-1174:17) " init =" -(1867:21-1867:35) " lazyComponent" --> (1174:17-1174:31) " lazyComponent" -(1867:35-1869:10) "._init;\n\n " --> (1174:31-1175:0) "._init;" -(1869:10-1869:14) " try" --> (1175:0-1175:10) "\n\t\t\t\t\t\ttry" -(1869:14-1871:12) " {\n // Lazy may contain any component type so we recursively resolve it.\n " --> (1175:10-1176:0) " {" -(1871:12-1871:19) " return" --> (1176:0-1176:14) "\n\t\t\t\t\t\t\treturn" -(1871:19-1871:56) " describeUnknownElementTypeFrameInDEV" --> (1176:14-1176:51) " describeUnknownElementTypeFrameInDEV" -(1871:56-1871:61) "(init" --> (1176:51-1176:56) "(init" -(1871:61-1871:69) "(payload" --> (1176:56-1176:64) "(payload" -(1871:69-1871:71) ")," --> (1176:64-1176:66) ")," -(1871:71-1871:79) " source," --> (1176:66-1176:74) " source," -(1871:79-1871:87) " ownerFn" --> (1176:74-1176:82) " ownerFn" -(1871:87-1872:11) ");\n " --> (1176:82-1177:6) ");\n\t\t\t\t\t" -(1872:11-1872:19) "} catch " --> (1177:6-1177:15) "\t} catch " -(1872:19-1872:22) "(x)" --> (1177:15-1177:18) "(x)" -(1872:22-1872:24) " {" --> (1177:18-1177:19) " " -(1872:24-1873:9) "}\n " --> (1177:19-1178:5) "{}\n\t\t\t\t" -(1873:9-1874:5) "}\n " --> (1178:5-1179:4) "\t}\n\t\t\t" -(1874:5-1875:3) "}\n " --> (1179:4-1180:3) "\t}\n\t\t" -(1875:3-1877:2) "}\n\n " --> (1180:3-1181:0) "\t}" -(1877:2-1877:9) " return" --> (1181:0-1181:10) "\n\t\t\treturn" -(1877:9-1878:1) " '';\n" --> (1181:10-1182:2) " '';\n\t" -(1878:1-1880:0) "}\n" --> (1182:2-1183:2) "\t}\n\t" -(1880:0-1880:4) "\nvar" --> (1183:2-1183:6) "\tvar" -(1880:4-1880:25) " loggedTypeFailures =" --> (1183:6-1183:27) " loggedTypeFailures =" -(1880:25-1880:27) " {" --> (1183:27-1183:28) " " -(1880:27-1881:0) "};" --> (1183:28-1184:2) "{};\n\t" -(1881:0-1881:4) "\nvar" --> (1184:2-1184:6) "\tvar" -(1881:4-1881:31) " ReactDebugCurrentFrame$1 =" --> (1184:6-1184:33) " ReactDebugCurrentFrame$1 =" -(1881:31-1881:52) " ReactSharedInternals" --> (1184:33-1184:54) " ReactSharedInternals" -(1881:52-1883:0) ".ReactDebugCurrentFrame;\n" --> (1184:54-1185:2) ".ReactDebugCurrentFrame;\n\t" -(1883:0-1883:9) "\nfunction" --> (1185:2-1185:11) "\tfunction" -(1883:9-1883:39) " setCurrentlyValidatingElement" --> (1185:11-1185:41) " setCurrentlyValidatingElement" -(1883:39-1883:48) "(element)" --> (1185:41-1185:50) "(element)" -(1883:48-1884:2) " {\n " --> (1185:50-1186:3) " {\n\t\t" -(1884:2-1885:4) " {\n " --> (1186:3-1187:0) "\t{" -(1885:4-1885:8) " if " --> (1187:0-1187:8) "\n\t\t\t\tif " -(1885:8-1885:17) "(element)" --> (1187:8-1187:17) "(element)" -(1885:17-1886:6) " {\n " --> (1187:17-1188:5) " {\n\t\t\t\t" -(1886:6-1886:10) " var" --> (1188:5-1188:9) "\tvar" -(1886:10-1886:18) " owner =" --> (1188:9-1188:17) " owner =" -(1886:18-1886:26) " element" --> (1188:17-1188:25) " element" -(1886:26-1887:6) "._owner;\n " --> (1188:25-1189:5) "._owner;\n\t\t\t\t" -(1887:6-1887:10) " var" --> (1189:5-1189:9) "\tvar" -(1887:10-1887:18) " stack =" --> (1189:9-1189:17) " stack =" -(1887:18-1887:55) " describeUnknownElementTypeFrameInDEV" --> (1189:17-1189:54) " describeUnknownElementTypeFrameInDEV" -(1887:55-1887:63) "(element" --> (1189:54-1189:62) "(element" -(1887:63-1887:69) ".type," --> (1189:62-1189:68) ".type," -(1887:69-1887:77) " element" --> (1189:68-1189:76) " element" -(1887:77-1887:86) "._source," --> (1189:76-1189:85) "._source," -(1887:86-1887:94) " owner ?" --> (1189:85-1189:93) " owner ?" -(1887:94-1887:100) " owner" --> (1189:93-1189:99) " owner" -(1887:100-1887:107) ".type :" --> (1189:99-1189:106) ".type :" -(1887:107-1887:112) " null" --> (1189:106-1189:111) " null" -(1887:112-1888:6) ");\n " --> (1189:111-1190:0) ");" -(1888:6-1888:31) " ReactDebugCurrentFrame$1" --> (1190:0-1190:30) "\n\t\t\t\t\tReactDebugCurrentFrame$1" -(1888:31-1888:50) ".setExtraStackFrame" --> (1190:30-1190:49) ".setExtraStackFrame" -(1888:50-1888:56) "(stack" --> (1190:49-1190:55) "(stack" -(1888:56-1889:5) ");\n " --> (1190:55-1191:4) ");\n\t\t\t" -(1889:5-1889:11) "} else" --> (1191:4-1191:11) "\t} else" -(1889:11-1890:6) " {\n " --> (1191:11-1192:0) " {" -(1890:6-1890:31) " ReactDebugCurrentFrame$1" --> (1192:0-1192:30) "\n\t\t\t\t\tReactDebugCurrentFrame$1" -(1890:31-1890:50) ".setExtraStackFrame" --> (1192:30-1192:49) ".setExtraStackFrame" -(1890:50-1890:55) "(null" --> (1192:49-1192:54) "(null" -(1890:55-1891:5) ");\n " --> (1192:54-1193:4) ");\n\t\t\t" -(1891:5-1892:3) "}\n " --> (1193:4-1194:3) "\t}\n\t\t" -(1892:3-1893:1) "}\n" --> (1194:3-1195:2) "\t}\n\t" -(1893:1-1895:0) "}\n" --> (1195:2-1196:2) "\t}\n\t" -(1895:0-1895:9) "\nfunction" --> (1196:2-1196:11) "\tfunction" -(1895:9-1895:24) " checkPropTypes" --> (1196:11-1196:26) " checkPropTypes" -(1895:24-1895:35) "(typeSpecs," --> (1196:26-1196:37) "(typeSpecs," -(1895:35-1895:43) " values," --> (1196:37-1196:45) " values," -(1895:43-1895:53) " location," --> (1196:45-1196:55) " location," -(1895:53-1895:68) " componentName," --> (1196:55-1196:70) " componentName," -(1895:68-1895:77) " element)" --> (1196:70-1196:79) " element)" -(1895:77-1896:2) " {\n " --> (1196:79-1197:3) " {\n\t\t" -(1896:2-1898:4) " {\n // $FlowFixMe This is okay but Flow doesn't know it.\n " --> (1197:3-1198:4) "\t{\n\t\t\t" -(1898:4-1898:8) " var" --> (1198:4-1198:8) "\tvar" -(1898:8-1898:14) " has =" --> (1198:8-1198:14) " has =" -(1898:14-1898:23) " Function" --> (1198:14-1198:23) " Function" -(1898:23-1898:28) ".call" --> (1198:23-1198:28) ".call" -(1898:28-1898:33) ".bind" --> (1198:28-1198:33) ".bind" -(1898:33-1898:40) "(Object" --> (1198:33-1198:40) "(Object" -(1898:40-1898:50) ".prototype" --> (1198:40-1198:50) ".prototype" -(1898:50-1898:65) ".hasOwnProperty" --> (1198:50-1198:65) ".hasOwnProperty" -(1898:65-1900:4) ");\n\n " --> (1198:65-1199:0) ");" -(1900:4-1900:9) " for " --> (1199:0-1199:9) "\n\t\t\t\tfor " -(1900:9-1900:13) "(var" --> (1199:9-1199:13) "(var" -(1900:13-1900:29) " typeSpecName in" --> (1199:13-1199:29) " typeSpecName in" -(1900:29-1900:40) " typeSpecs)" --> (1199:29-1199:40) " typeSpecs)" -(1900:40-1901:6) " {\n " --> (1199:40-1200:0) " {" -(1901:6-1901:10) " if " --> (1200:0-1200:9) "\n\t\t\t\t\tif " -(1901:10-1901:14) "(has" --> (1200:9-1200:13) "(has" -(1901:14-1901:25) "(typeSpecs," --> (1200:13-1200:24) "(typeSpecs," -(1901:25-1901:38) " typeSpecName" --> (1200:24-1200:37) " typeSpecName" -(1901:38-1901:40) "))" --> (1200:37-1200:39) "))" -(1901:40-1902:8) " {\n " --> (1200:39-1201:6) " {\n\t\t\t\t\t" -(1902:8-1902:12) " var" --> (1201:6-1201:10) "\tvar" -(1902:12-1902:27) " error$1 = void" --> (1201:10-1201:25) " error$1 = void" -(1902:27-1906:8) " 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n " --> (1201:25-1202:0) " 0;" -(1906:8-1906:12) " try" --> (1202:0-1202:10) "\n\t\t\t\t\t\ttry" -(1906:12-1909:10) " {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n " --> (1202:10-1203:0) " {" -(1909:10-1909:21) " if (typeof" --> (1203:0-1203:18) "\n\t\t\t\t\t\t\tif (typeof" -(1909:21-1909:31) " typeSpecs" --> (1203:18-1203:28) " typeSpecs" -(1909:31-1909:49) "[typeSpecName] !==" --> (1203:28-1203:46) "[typeSpecName] !==" -(1909:49-1909:61) " 'function')" --> (1203:46-1203:58) " 'function')" -(1909:61-1910:12) " {\n " --> (1203:58-1204:8) " {\n\t\t\t\t\t\t\t" -(1910:12-1910:16) " var" --> (1204:8-1204:12) "\tvar" -(1910:16-1910:22) " err =" --> (1204:12-1204:18) " err =" -(1910:22-1910:29) " Error(" --> (1204:18-1204:25) " Error(" -(1910:29-1910:46) "(componentName ||" --> (1204:25-1204:42) "(componentName ||" -(1910:46-1910:63) " 'React class') +" --> (1204:42-1204:59) " 'React class') +" -(1910:63-1910:70) " ': ' +" --> (1204:59-1204:66) " ': ' +" -(1910:70-1910:81) " location +" --> (1204:66-1204:77) " location +" -(1910:81-1910:93) " ' type `' +" --> (1204:77-1204:89) " ' type `' +" -(1910:93-1910:108) " typeSpecName +" --> (1204:89-1204:104) " typeSpecName +" -(1910:108-1910:127) " '` is invalid; ' +" --> (1204:104-1204:123) " '` is invalid; ' +" -(1910:127-1910:215) " 'it must be a function, usually from the `prop-types` package, but received `' + typeof" --> (1204:123-1204:211) " 'it must be a function, usually from the `prop-types` package, but received `' + typeof" -(1910:215-1910:225) " typeSpecs" --> (1204:211-1204:221) " typeSpecs" -(1910:225-1910:241) "[typeSpecName] +" --> (1204:221-1204:237) "[typeSpecName] +" -(1910:241-1910:248) " '`.' +" --> (1204:237-1204:244) " '`.' +" -(1910:248-1910:344) " 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'" --> (1204:244-1204:340) " 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'" -(1910:344-1911:12) ");\n " --> (1204:340-1205:0) ");" -(1911:12-1911:16) " err" --> (1205:0-1205:12) "\n\t\t\t\t\t\t\t\terr" -(1911:16-1911:23) ".name =" --> (1205:12-1205:19) ".name =" -(1911:23-1912:12) " 'Invariant Violation';\n " --> (1205:19-1206:0) " 'Invariant Violation';" -(1912:12-1912:18) " throw" --> (1206:0-1206:14) "\n\t\t\t\t\t\t\t\tthrow" -(1912:18-1913:11) " err;\n " --> (1206:14-1207:7) " err;\n\t\t\t\t\t\t" -(1913:11-1915:10) "}\n\n " --> (1207:7-1208:0) "\t}" -(1915:10-1915:20) " error$1 =" --> (1208:0-1208:17) "\n\t\t\t\t\t\t\terror$1 =" -(1915:20-1915:30) " typeSpecs" --> (1208:17-1208:27) " typeSpecs" -(1915:30-1915:44) "[typeSpecName]" --> (1208:27-1208:41) "[typeSpecName]" -(1915:44-1915:52) "(values," --> (1208:41-1208:49) "(values," -(1915:52-1915:66) " typeSpecName," --> (1208:49-1208:63) " typeSpecName," -(1915:66-1915:81) " componentName," --> (1208:63-1208:78) " componentName," -(1915:81-1915:91) " location," --> (1208:78-1208:88) " location," -(1915:91-1915:97) " null," --> (1208:88-1208:94) " null," -(1915:97-1915:144) " 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'" --> (1208:94-1208:141) " 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'" -(1915:144-1916:9) ");\n " --> (1208:141-1209:6) ");\n\t\t\t\t\t" -(1916:9-1916:17) "} catch " --> (1209:6-1209:15) "\t} catch " -(1916:17-1916:21) "(ex)" --> (1209:15-1209:19) "(ex)" -(1916:21-1917:10) " {\n " --> (1209:19-1210:0) " {" -(1917:10-1917:20) " error$1 =" --> (1210:0-1210:17) "\n\t\t\t\t\t\t\terror$1 =" -(1917:20-1918:9) " ex;\n " --> (1210:17-1211:6) " ex;\n\t\t\t\t\t" -(1918:9-1920:8) "}\n\n " --> (1211:6-1212:0) "\t}" -(1920:8-1920:12) " if " --> (1212:0-1212:10) "\n\t\t\t\t\t\tif " -(1920:12-1920:25) "(error$1 && !" --> (1212:10-1212:23) "(error$1 && !" -(1920:25-1920:44) "(error$1 instanceof" --> (1212:23-1212:42) "(error$1 instanceof" -(1920:44-1920:52) " Error))" --> (1212:42-1212:50) " Error))" -(1920:52-1921:10) " {\n " --> (1212:50-1213:0) " {" -(1921:10-1921:40) " setCurrentlyValidatingElement" --> (1213:0-1213:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" -(1921:40-1921:48) "(element" --> (1213:37-1213:45) "(element" -(1921:48-1923:10) ");\n\n " --> (1213:45-1214:0) ");" -(1923:10-1923:16) " error" --> (1214:0-1214:13) "\n\t\t\t\t\t\t\terror" -(1923:16-1923:49) "('%s: type specification of %s' +" --> (1214:13-1214:46) "('%s: type specification of %s' +" -(1923:49-1923:89) " ' `%s` is invalid; the type checker ' +" --> (1214:46-1214:86) " ' `%s` is invalid; the type checker ' +" -(1923:89-1923:155) " 'function must return `null` or an `Error` but returned a %s. ' +" --> (1214:86-1214:152) " 'function must return `null` or an `Error` but returned a %s. ' +" -(1923:155-1923:223) " 'You may have forgotten to pass an argument to the type checker ' +" --> (1214:152-1214:220) " 'You may have forgotten to pass an argument to the type checker ' +" -(1923:223-1923:290) " 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +" --> (1214:220-1214:287) " 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +" -(1923:290-1923:325) " 'shape all require an argument).'," --> (1214:287-1214:322) " 'shape all require an argument).'," -(1923:325-1923:342) " componentName ||" --> (1214:322-1214:339) " componentName ||" -(1923:342-1923:357) " 'React class'," --> (1214:339-1214:354) " 'React class'," -(1923:357-1923:367) " location," --> (1214:354-1214:364) " location," -(1923:367-1923:388) " typeSpecName, typeof" --> (1214:364-1214:385) " typeSpecName, typeof" -(1923:388-1923:396) " error$1" --> (1214:385-1214:393) " error$1" -(1923:396-1925:10) ");\n\n " --> (1214:393-1215:0) ");" -(1925:10-1925:40) " setCurrentlyValidatingElement" --> (1215:0-1215:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" -(1925:40-1925:45) "(null" --> (1215:37-1215:42) "(null" -(1925:45-1926:9) ");\n " --> (1215:42-1216:6) ");\n\t\t\t\t\t" -(1926:9-1928:8) "}\n\n " --> (1216:6-1217:0) "\t}" -(1928:8-1928:12) " if " --> (1217:0-1217:10) "\n\t\t\t\t\t\tif " -(1928:12-1928:31) "(error$1 instanceof" --> (1217:10-1217:29) "(error$1 instanceof" -(1928:31-1928:42) " Error && !" --> (1217:29-1217:40) " Error && !" -(1928:42-1928:50) "(error$1" --> (1217:40-1217:48) "(error$1" -(1928:50-1928:61) ".message in" --> (1217:48-1217:59) ".message in" -(1928:61-1928:82) " loggedTypeFailures))" --> (1217:59-1217:80) " loggedTypeFailures))" -(1928:82-1931:10) " {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n " --> (1217:80-1218:0) " {" -(1931:10-1931:29) " loggedTypeFailures" --> (1218:0-1218:26) "\n\t\t\t\t\t\t\tloggedTypeFailures" -(1931:29-1931:37) "[error$1" --> (1218:26-1218:34) "[error$1" -(1931:37-1931:48) ".message] =" --> (1218:34-1218:45) ".message] =" -(1931:48-1932:10) " true;\n " --> (1218:45-1219:0) " true;" -(1932:10-1932:40) " setCurrentlyValidatingElement" --> (1219:0-1219:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" -(1932:40-1932:48) "(element" --> (1219:37-1219:45) "(element" -(1932:48-1934:10) ");\n\n " --> (1219:45-1220:0) ");" -(1934:10-1934:16) " error" --> (1220:0-1220:13) "\n\t\t\t\t\t\t\terror" -(1934:16-1934:38) "('Failed %s type: %s'," --> (1220:13-1220:35) "('Failed %s type: %s'," -(1934:38-1934:48) " location," --> (1220:35-1220:45) " location," -(1934:48-1934:56) " error$1" --> (1220:45-1220:53) " error$1" -(1934:56-1934:64) ".message" --> (1220:53-1220:61) ".message" -(1934:64-1936:10) ");\n\n " --> (1220:61-1221:0) ");" -(1936:10-1936:40) " setCurrentlyValidatingElement" --> (1221:0-1221:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" -(1936:40-1936:45) "(null" --> (1221:37-1221:42) "(null" -(1936:45-1937:9) ");\n " --> (1221:42-1222:6) ");\n\t\t\t\t\t" -(1937:9-1938:7) "}\n " --> (1222:6-1223:5) "\t}\n\t\t\t\t" -(1938:7-1939:5) "}\n " --> (1223:5-1224:4) "\t}\n\t\t\t" -(1939:5-1940:3) "}\n " --> (1224:4-1225:3) "\t}\n\t\t" -(1940:3-1941:1) "}\n" --> (1225:3-1226:2) "\t}\n\t" -(1941:1-1943:0) "}\n" --> (1226:2-1227:2) "\t}\n\t" -(1943:0-1943:9) "\nfunction" --> (1227:2-1227:11) "\tfunction" -(1943:9-1943:41) " setCurrentlyValidatingElement$1" --> (1227:11-1227:43) " setCurrentlyValidatingElement$1" -(1943:41-1943:50) "(element)" --> (1227:43-1227:52) "(element)" -(1943:50-1944:2) " {\n " --> (1227:52-1228:3) " {\n\t\t" -(1944:2-1945:4) " {\n " --> (1228:3-1229:0) "\t{" -(1945:4-1945:8) " if " --> (1229:0-1229:8) "\n\t\t\t\tif " -(1945:8-1945:17) "(element)" --> (1229:8-1229:17) "(element)" -(1945:17-1946:6) " {\n " --> (1229:17-1230:5) " {\n\t\t\t\t" -(1946:6-1946:10) " var" --> (1230:5-1230:9) "\tvar" -(1946:10-1946:18) " owner =" --> (1230:9-1230:17) " owner =" -(1946:18-1946:26) " element" --> (1230:17-1230:25) " element" -(1946:26-1947:6) "._owner;\n " --> (1230:25-1231:5) "._owner;\n\t\t\t\t" -(1947:6-1947:10) " var" --> (1231:5-1231:9) "\tvar" -(1947:10-1947:18) " stack =" --> (1231:9-1231:17) " stack =" -(1947:18-1947:55) " describeUnknownElementTypeFrameInDEV" --> (1231:17-1231:54) " describeUnknownElementTypeFrameInDEV" -(1947:55-1947:63) "(element" --> (1231:54-1231:62) "(element" -(1947:63-1947:69) ".type," --> (1231:62-1231:68) ".type," -(1947:69-1947:77) " element" --> (1231:68-1231:76) " element" -(1947:77-1947:86) "._source," --> (1231:76-1231:85) "._source," -(1947:86-1947:94) " owner ?" --> (1231:85-1231:93) " owner ?" -(1947:94-1947:100) " owner" --> (1231:93-1231:99) " owner" -(1947:100-1947:107) ".type :" --> (1231:99-1231:106) ".type :" -(1947:107-1947:112) " null" --> (1231:106-1231:111) " null" -(1947:112-1948:6) ");\n " --> (1231:111-1232:0) ");" -(1948:6-1948:25) " setExtraStackFrame" --> (1232:0-1232:24) "\n\t\t\t\t\tsetExtraStackFrame" -(1948:25-1948:31) "(stack" --> (1232:24-1232:30) "(stack" -(1948:31-1949:5) ");\n " --> (1232:30-1233:4) ");\n\t\t\t" -(1949:5-1949:11) "} else" --> (1233:4-1233:11) "\t} else" -(1949:11-1950:6) " {\n " --> (1233:11-1234:0) " {" -(1950:6-1950:25) " setExtraStackFrame" --> (1234:0-1234:24) "\n\t\t\t\t\tsetExtraStackFrame" -(1950:25-1950:30) "(null" --> (1234:24-1234:29) "(null" -(1950:30-1951:5) ");\n " --> (1234:29-1235:4) ");\n\t\t\t" -(1951:5-1952:3) "}\n " --> (1235:4-1236:3) "\t}\n\t\t" -(1952:3-1953:1) "}\n" --> (1236:3-1237:2) "\t}\n\t" -(1953:1-1955:0) "}\n" --> (1237:2-1238:2) "\t}\n\t" -(1955:0-1955:4) "\nvar" --> (1238:2-1238:6) "\tvar" -(1955:4-1957:0) " propTypesMisspellWarningShown;\n" --> (1238:6-1239:2) " propTypesMisspellWarningShown;\n\t" -(1957:0-1958:2) "\n{\n " --> (1239:2-1240:0) "\t{" -(1958:2-1958:34) " propTypesMisspellWarningShown =" --> (1240:0-1240:35) "\n\t\t\tpropTypesMisspellWarningShown =" -(1958:34-1959:1) " false;\n" --> (1240:35-1241:2) " false;\n\t" -(1959:1-1961:0) "}\n" --> (1241:2-1242:2) "\t}\n\t" -(1961:0-1961:9) "\nfunction" --> (1242:2-1242:11) "\tfunction" -(1961:9-1961:39) " getDeclarationErrorAddendum()" --> (1242:11-1242:41) " getDeclarationErrorAddendum()" -(1961:39-1962:2) " {\n " --> (1242:41-1243:0) " {" -(1962:2-1962:6) " if " --> (1243:0-1243:7) "\n\t\t\tif " -(1962:6-1962:24) "(ReactCurrentOwner" --> (1243:7-1243:25) "(ReactCurrentOwner" -(1962:24-1962:33) ".current)" --> (1243:25-1243:34) ".current)" -(1962:33-1963:4) " {\n " --> (1243:34-1244:4) " {\n\t\t\t" -(1963:4-1963:8) " var" --> (1244:4-1244:8) "\tvar" -(1963:8-1963:15) " name =" --> (1244:8-1244:15) " name =" -(1963:15-1963:32) " getComponentName" --> (1244:15-1244:32) " getComponentName" -(1963:32-1963:50) "(ReactCurrentOwner" --> (1244:32-1244:50) "(ReactCurrentOwner" -(1963:50-1963:58) ".current" --> (1244:50-1244:58) ".current" -(1963:58-1963:63) ".type" --> (1244:58-1244:63) ".type" -(1963:63-1965:4) ");\n\n " --> (1244:63-1245:0) ");" -(1965:4-1965:8) " if " --> (1245:0-1245:8) "\n\t\t\t\tif " -(1965:8-1965:14) "(name)" --> (1245:8-1245:14) "(name)" -(1965:14-1966:6) " {\n " --> (1245:14-1246:0) " {" -(1966:6-1966:13) " return" --> (1246:0-1246:12) "\n\t\t\t\t\treturn" -(1966:13-1966:50) " '\\n\\nCheck the render method of `' +" --> (1246:12-1246:49) " '\\n\\nCheck the render method of `' +" -(1966:50-1966:57) " name +" --> (1246:49-1246:56) " name +" -(1966:57-1967:5) " '`.';\n " --> (1246:56-1247:4) " '`.';\n\t\t\t" -(1967:5-1968:3) "}\n " --> (1247:4-1248:3) "\t}\n\t\t" -(1968:3-1970:2) "}\n\n " --> (1248:3-1249:0) "\t}" -(1970:2-1970:9) " return" --> (1249:0-1249:10) "\n\t\t\treturn" -(1970:9-1971:1) " '';\n" --> (1249:10-1250:2) " '';\n\t" -(1971:1-1973:0) "}\n" --> (1250:2-1251:2) "\t}\n\t" -(1973:0-1973:9) "\nfunction" --> (1251:2-1251:11) "\tfunction" -(1973:9-1973:36) " getSourceInfoErrorAddendum" --> (1251:11-1251:38) " getSourceInfoErrorAddendum" -(1973:36-1973:44) "(source)" --> (1251:38-1251:46) "(source)" -(1973:44-1974:2) " {\n " --> (1251:46-1252:0) " {" -(1974:2-1974:6) " if " --> (1252:0-1252:7) "\n\t\t\tif " -(1974:6-1974:17) "(source !==" --> (1252:7-1252:18) "(source !==" -(1974:17-1974:28) " undefined)" --> (1252:18-1252:29) " undefined)" -(1974:28-1975:4) " {\n " --> (1252:29-1253:4) " {\n\t\t\t" -(1975:4-1975:8) " var" --> (1253:4-1253:8) "\tvar" -(1975:8-1975:19) " fileName =" --> (1253:8-1253:19) " fileName =" -(1975:19-1975:26) " source" --> (1253:19-1253:26) " source" -(1975:26-1975:35) ".fileName" --> (1253:26-1253:35) ".fileName" -(1975:35-1975:43) ".replace" --> (1253:35-1253:43) ".replace" -(1975:43-1975:56) "(/^.*[\\\\\\/]/," --> (1253:43-1253:56) "(/^.*[\\\\\\/]/," -(1975:56-1975:59) " ''" --> (1253:56-1253:59) " ''" -(1975:59-1976:4) ");\n " --> (1253:59-1254:4) ");\n\t\t\t" -(1976:4-1976:8) " var" --> (1254:4-1254:8) "\tvar" -(1976:8-1976:21) " lineNumber =" --> (1254:8-1254:21) " lineNumber =" -(1976:21-1976:28) " source" --> (1254:21-1254:28) " source" -(1976:28-1977:4) ".lineNumber;\n " --> (1254:28-1255:0) ".lineNumber;" -(1977:4-1977:11) " return" --> (1255:0-1255:11) "\n\t\t\t\treturn" -(1977:11-1977:39) " '\\n\\nCheck your code at ' +" --> (1255:11-1255:39) " '\\n\\nCheck your code at ' +" -(1977:39-1977:50) " fileName +" --> (1255:39-1255:50) " fileName +" -(1977:50-1977:56) " ':' +" --> (1255:50-1255:56) " ':' +" -(1977:56-1977:69) " lineNumber +" --> (1255:56-1255:69) " lineNumber +" -(1977:69-1978:3) " '.';\n " --> (1255:69-1256:3) " '.';\n\t\t" -(1978:3-1980:2) "}\n\n " --> (1256:3-1257:0) "\t}" -(1980:2-1980:9) " return" --> (1257:0-1257:10) "\n\t\t\treturn" -(1980:9-1981:1) " '';\n" --> (1257:10-1258:2) " '';\n\t" -(1981:1-1983:0) "}\n" --> (1258:2-1259:2) "\t}\n\t" -(1983:0-1983:9) "\nfunction" --> (1259:2-1259:11) "\tfunction" -(1983:9-1983:44) " getSourceInfoErrorAddendumForProps" --> (1259:11-1259:46) " getSourceInfoErrorAddendumForProps" -(1983:44-1983:58) "(elementProps)" --> (1259:46-1259:60) "(elementProps)" -(1983:58-1984:2) " {\n " --> (1259:60-1260:0) " {" -(1984:2-1984:6) " if " --> (1260:0-1260:7) "\n\t\t\tif " -(1984:6-1984:23) "(elementProps !==" --> (1260:7-1260:24) "(elementProps !==" -(1984:23-1984:31) " null &&" --> (1260:24-1260:32) " null &&" -(1984:31-1984:48) " elementProps !==" --> (1260:32-1260:49) " elementProps !==" -(1984:48-1984:59) " undefined)" --> (1260:49-1260:60) " undefined)" -(1984:59-1985:4) " {\n " --> (1260:60-1261:0) " {" -(1985:4-1985:11) " return" --> (1261:0-1261:11) "\n\t\t\t\treturn" -(1985:11-1985:38) " getSourceInfoErrorAddendum" --> (1261:11-1261:38) " getSourceInfoErrorAddendum" -(1985:38-1985:51) "(elementProps" --> (1261:38-1261:51) "(elementProps" -(1985:51-1985:60) ".__source" --> (1261:51-1261:60) ".__source" -(1985:60-1986:3) ");\n " --> (1261:60-1262:3) ");\n\t\t" -(1986:3-1988:2) "}\n\n " --> (1262:3-1263:0) "\t}" -(1988:2-1988:9) " return" --> (1263:0-1263:10) "\n\t\t\treturn" -(1988:9-1989:1) " '';\n" --> (1263:10-1264:2) " '';\n\t" -(1989:1-1997:0) "}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n" --> (1264:2-1265:2) "\t}\n\t" -(1997:0-1997:4) "\nvar" --> (1265:2-1265:6) "\tvar" -(1997:4-1997:28) " ownerHasKeyUseWarning =" --> (1265:6-1265:30) " ownerHasKeyUseWarning =" -(1997:28-1997:30) " {" --> (1265:30-1265:31) " " -(1997:30-1999:0) "};\n" --> (1265:31-1266:2) "{};\n\t" -(1999:0-1999:9) "\nfunction" --> (1266:2-1266:11) "\tfunction" -(1999:9-1999:38) " getCurrentComponentErrorInfo" --> (1266:11-1266:40) " getCurrentComponentErrorInfo" -(1999:38-1999:50) "(parentType)" --> (1266:40-1266:52) "(parentType)" -(1999:50-2000:2) " {\n " --> (1266:52-1267:3) " {\n\t\t" -(2000:2-2000:6) " var" --> (1267:3-1267:7) "\tvar" -(2000:6-2000:13) " info =" --> (1267:7-1267:14) " info =" -(2000:13-2000:42) " getDeclarationErrorAddendum(" --> (1267:14-1267:43) " getDeclarationErrorAddendum(" -(2000:42-2002:2) ");\n\n " --> (1267:43-1268:0) ");" -(2002:2-2002:7) " if (" --> (1268:0-1268:8) "\n\t\t\tif (" -(2002:7-2002:13) "!info)" --> (1268:8-1268:14) "!info)" -(2002:13-2003:4) " {\n " --> (1268:14-1269:4) " {\n\t\t\t" -(2003:4-2003:8) " var" --> (1269:4-1269:8) "\tvar" -(2003:8-2003:28) " parentName = typeof" --> (1269:8-1269:28) " parentName = typeof" -(2003:28-2003:43) " parentType ===" --> (1269:28-1269:43) " parentType ===" -(2003:43-2003:54) " 'string' ?" --> (1269:43-1269:54) " 'string' ?" -(2003:54-2003:67) " parentType :" --> (1269:54-1269:67) " parentType :" -(2003:67-2003:78) " parentType" --> (1269:67-1269:78) " parentType" -(2003:78-2003:93) ".displayName ||" --> (1269:78-1269:93) ".displayName ||" -(2003:93-2003:104) " parentType" --> (1269:93-1269:104) " parentType" -(2003:104-2005:4) ".name;\n\n " --> (1269:104-1270:0) ".name;" -(2005:4-2005:8) " if " --> (1270:0-1270:8) "\n\t\t\t\tif " -(2005:8-2005:20) "(parentName)" --> (1270:8-1270:20) "(parentName)" -(2005:20-2006:6) " {\n " --> (1270:20-1271:0) " {" -(2006:6-2006:13) " info =" --> (1271:0-1271:12) "\n\t\t\t\t\tinfo =" -(2006:13-2006:61) " \"\\n\\nCheck the top-level render call using <\" +" --> (1271:12-1271:60) " '\\n\\nCheck the top-level render call using <' +" -(2006:61-2006:74) " parentName +" --> (1271:60-1271:73) " parentName +" -(2006:74-2007:5) " \">.\";\n " --> (1271:73-1272:4) " '>.';\n\t\t\t" -(2007:5-2008:3) "}\n " --> (1272:4-1273:3) "\t}\n\t\t" -(2008:3-2010:2) "}\n\n " --> (1273:3-1274:0) "\t}" -(2010:2-2010:9) " return" --> (1274:0-1274:10) "\n\t\t\treturn" -(2010:9-2011:1) " info;\n" --> (1274:10-1275:2) " info;\n\t" -(2011:1-2025:0) "}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n" --> (1275:2-1276:2) "\t}\n\t" -(2025:0-2025:9) "\nfunction" --> (1276:2-1276:11) "\tfunction" -(2025:9-2025:29) " validateExplicitKey" --> (1276:11-1276:31) " validateExplicitKey" -(2025:29-2025:38) "(element," --> (1276:31-1276:40) "(element," -(2025:38-2025:50) " parentType)" --> (1276:40-1276:52) " parentType)" -(2025:50-2026:2) " {\n " --> (1276:52-1277:0) " {" -(2026:2-2026:7) " if (" --> (1277:0-1277:8) "\n\t\t\tif (" -(2026:7-2026:15) "!element" --> (1277:8-1277:16) "!element" -(2026:15-2026:25) "._store ||" --> (1277:16-1277:26) "._store ||" -(2026:25-2026:33) " element" --> (1277:26-1277:34) " element" -(2026:33-2026:40) "._store" --> (1277:34-1277:41) "._store" -(2026:40-2026:53) ".validated ||" --> (1277:41-1277:54) ".validated ||" -(2026:53-2026:61) " element" --> (1277:54-1277:62) " element" -(2026:61-2026:68) ".key !=" --> (1277:62-1277:69) ".key !=" -(2026:68-2026:74) " null)" --> (1277:69-1277:75) " null)" -(2026:74-2027:4) " {\n " --> (1277:75-1278:0) " {" -(2027:4-2028:3) " return;\n " --> (1278:0-1279:3) "\n\t\t\t\treturn;\n\t\t" -(2028:3-2030:2) "}\n\n " --> (1279:3-1280:0) "\t}" -(2030:2-2030:10) " element" --> (1280:0-1280:11) "\n\t\t\telement" -(2030:10-2030:17) "._store" --> (1280:11-1280:18) "._store" -(2030:17-2030:29) ".validated =" --> (1280:18-1280:30) ".validated =" -(2030:29-2031:2) " true;\n " --> (1280:30-1281:3) " true;\n\t\t" -(2031:2-2031:6) " var" --> (1281:3-1281:7) "\tvar" -(2031:6-2031:34) " currentComponentErrorInfo =" --> (1281:7-1281:35) " currentComponentErrorInfo =" -(2031:34-2031:63) " getCurrentComponentErrorInfo" --> (1281:35-1281:64) " getCurrentComponentErrorInfo" -(2031:63-2031:74) "(parentType" --> (1281:64-1281:75) "(parentType" -(2031:74-2033:2) ");\n\n " --> (1281:75-1282:0) ");" -(2033:2-2033:6) " if " --> (1282:0-1282:7) "\n\t\t\tif " -(2033:6-2033:28) "(ownerHasKeyUseWarning" --> (1282:7-1282:29) "(ownerHasKeyUseWarning" -(2033:28-2033:56) "[currentComponentErrorInfo])" --> (1282:29-1282:57) "[currentComponentErrorInfo])" -(2033:56-2034:4) " {\n " --> (1282:57-1283:0) " {" -(2034:4-2035:3) " return;\n " --> (1283:0-1284:3) "\n\t\t\t\treturn;\n\t\t" -(2035:3-2037:2) "}\n\n " --> (1284:3-1285:0) "\t}" -(2037:2-2037:24) " ownerHasKeyUseWarning" --> (1285:0-1285:25) "\n\t\t\townerHasKeyUseWarning" -(2037:24-2037:53) "[currentComponentErrorInfo] =" --> (1285:25-1285:54) "[currentComponentErrorInfo] =" -(2037:53-2041:2) " true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n " --> (1285:54-1286:3) " true;\n\t\t" -(2041:2-2041:6) " var" --> (1286:3-1286:7) "\tvar" -(2041:6-2041:19) " childOwner =" --> (1286:7-1286:20) " childOwner =" -(2041:19-2043:2) " '';\n\n " --> (1286:20-1287:0) " '';" -(2043:2-2043:6) " if " --> (1287:0-1287:7) "\n\t\t\tif " -(2043:6-2043:17) "(element &&" --> (1287:7-1287:18) "(element &&" -(2043:17-2043:25) " element" --> (1287:18-1287:26) " element" -(2043:25-2043:35) "._owner &&" --> (1287:26-1287:36) "._owner &&" -(2043:35-2043:43) " element" --> (1287:36-1287:44) " element" -(2043:43-2043:54) "._owner !==" --> (1287:44-1287:55) "._owner !==" -(2043:54-2043:72) " ReactCurrentOwner" --> (1287:55-1287:73) " ReactCurrentOwner" -(2043:72-2043:81) ".current)" --> (1287:73-1287:82) ".current)" -(2043:81-2045:4) " {\n // Give the component that originally created this child.\n " --> (1287:82-1288:0) " {" -(2045:4-2045:17) " childOwner =" --> (1288:0-1288:17) "\n\t\t\t\tchildOwner =" -(2045:17-2045:50) " \" It was passed a child from \" +" --> (1288:17-1288:50) " ' It was passed a child from ' +" -(2045:50-2045:67) " getComponentName" --> (1288:50-1288:67) " getComponentName" -(2045:67-2045:75) "(element" --> (1288:67-1288:75) "(element" -(2045:75-2045:82) "._owner" --> (1288:75-1288:82) "._owner" -(2045:82-2045:87) ".type" --> (1288:82-1288:87) ".type" -(2045:87-2045:90) ") +" --> (1288:87-1288:90) ") +" -(2045:90-2046:3) " \".\";\n " --> (1288:90-1289:3) " '.';\n\t\t" -(2046:3-2048:2) "}\n\n " --> (1289:3-1290:3) "\t}\n\t\t" -(2048:2-2049:4) " {\n " --> (1290:3-1291:0) "\t{" -(2049:4-2049:36) " setCurrentlyValidatingElement$1" --> (1291:0-1291:36) "\n\t\t\t\tsetCurrentlyValidatingElement$1" -(2049:36-2049:44) "(element" --> (1291:36-1291:44) "(element" -(2049:44-2051:4) ");\n\n " --> (1291:44-1292:0) ");" -(2051:4-2051:10) " error" --> (1292:0-1292:10) "\n\t\t\t\terror" -(2051:10-2051:68) "('Each child in a list should have a unique \"key\" prop.' +" --> (1292:10-1292:68) "('Each child in a list should have a unique \"key\" prop.' +" -(2051:68-2051:140) " '%s%s See https://reactjs.org/link/warning-keys for more information.'," --> (1292:68-1292:140) " '%s%s See https://reactjs.org/link/warning-keys for more information.'," -(2051:140-2051:167) " currentComponentErrorInfo," --> (1292:140-1292:167) " currentComponentErrorInfo," -(2051:167-2051:178) " childOwner" --> (1292:167-1292:178) " childOwner" -(2051:178-2053:4) ");\n\n " --> (1292:178-1293:0) ");" -(2053:4-2053:36) " setCurrentlyValidatingElement$1" --> (1293:0-1293:36) "\n\t\t\t\tsetCurrentlyValidatingElement$1" -(2053:36-2053:41) "(null" --> (1293:36-1293:41) "(null" -(2053:41-2054:3) ");\n " --> (1293:41-1294:3) ");\n\t\t" -(2054:3-2055:1) "}\n" --> (1294:3-1295:2) "\t}\n\t" -(2055:1-2067:0) "}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n" --> (1295:2-1296:2) "\t}\n\t" -(2067:0-2067:9) "\nfunction" --> (1296:2-1296:11) "\tfunction" -(2067:9-2067:27) " validateChildKeys" --> (1296:11-1296:29) " validateChildKeys" -(2067:27-2067:33) "(node," --> (1296:29-1296:35) "(node," -(2067:33-2067:45) " parentType)" --> (1296:35-1296:47) " parentType)" -(2067:45-2068:2) " {\n " --> (1296:47-1297:0) " {" -(2068:2-2068:13) " if (typeof" --> (1297:0-1297:14) "\n\t\t\tif (typeof" -(2068:13-2068:22) " node !==" --> (1297:14-1297:23) " node !==" -(2068:22-2068:32) " 'object')" --> (1297:23-1297:33) " 'object')" -(2068:32-2069:4) " {\n " --> (1297:33-1298:0) " {" -(2069:4-2070:3) " return;\n " --> (1298:0-1299:3) "\n\t\t\t\treturn;\n\t\t" -(2070:3-2072:2) "}\n\n " --> (1299:3-1300:0) "\t}" -(2072:2-2072:6) " if " --> (1300:0-1300:7) "\n\t\t\tif " -(2072:6-2072:12) "(Array" --> (1300:7-1300:13) "(Array" -(2072:12-2072:20) ".isArray" --> (1300:13-1300:21) ".isArray" -(2072:20-2072:25) "(node" --> (1300:21-1300:26) "(node" -(2072:25-2072:27) "))" --> (1300:26-1300:28) "))" -(2072:27-2073:4) " {\n " --> (1300:28-1301:0) " {" -(2073:4-2073:9) " for " --> (1301:0-1301:9) "\n\t\t\t\tfor " -(2073:9-2073:13) "(var" --> (1301:9-1301:13) "(var" -(2073:13-2073:17) " i =" --> (1301:13-1301:17) " i =" -(2073:17-2073:20) " 0;" --> (1301:17-1301:20) " 0;" -(2073:20-2073:24) " i <" --> (1301:20-1301:24) " i <" -(2073:24-2073:29) " node" --> (1301:24-1301:29) " node" -(2073:29-2073:37) ".length;" --> (1301:29-1301:37) ".length;" -(2073:37-2073:42) " i++)" --> (1301:37-1301:42) " i++)" -(2073:42-2074:6) " {\n " --> (1301:42-1302:5) " {\n\t\t\t\t" -(2074:6-2074:10) " var" --> (1302:5-1302:9) "\tvar" -(2074:10-2074:18) " child =" --> (1302:9-1302:17) " child =" -(2074:18-2074:23) " node" --> (1302:17-1302:22) " node" -(2074:23-2076:6) "[i];\n\n " --> (1302:22-1303:0) "[i];" -(2076:6-2076:10) " if " --> (1303:0-1303:9) "\n\t\t\t\t\tif " -(2076:10-2076:25) "(isValidElement" --> (1303:9-1303:24) "(isValidElement" -(2076:25-2076:31) "(child" --> (1303:24-1303:30) "(child" -(2076:31-2076:33) "))" --> (1303:30-1303:32) "))" -(2076:33-2077:8) " {\n " --> (1303:32-1304:0) " {" -(2077:8-2077:28) " validateExplicitKey" --> (1304:0-1304:26) "\n\t\t\t\t\t\tvalidateExplicitKey" -(2077:28-2077:35) "(child," --> (1304:26-1304:33) "(child," -(2077:35-2077:46) " parentType" --> (1304:33-1304:44) " parentType" -(2077:46-2078:7) ");\n " --> (1304:44-1305:5) ");\n\t\t\t\t" -(2078:7-2079:5) "}\n " --> (1305:5-1306:4) "\t}\n\t\t\t" -(2079:5-2080:3) "}\n " --> (1306:4-1307:3) "\t}\n\t\t" -(2080:3-2080:13) "} else if " --> (1307:3-1307:14) "\t} else if " -(2080:13-2080:28) "(isValidElement" --> (1307:14-1307:29) "(isValidElement" -(2080:28-2080:33) "(node" --> (1307:29-1307:34) "(node" -(2080:33-2080:35) "))" --> (1307:34-1307:36) "))" -(2080:35-2082:4) " {\n // This element was passed in a valid location.\n " --> (1307:36-1308:0) " {" -(2082:4-2082:8) " if " --> (1308:0-1308:8) "\n\t\t\t\tif " -(2082:8-2082:13) "(node" --> (1308:8-1308:13) "(node" -(2082:13-2082:21) "._store)" --> (1308:13-1308:21) "._store)" -(2082:21-2083:6) " {\n " --> (1308:21-1309:0) " {" -(2083:6-2083:11) " node" --> (1309:0-1309:10) "\n\t\t\t\t\tnode" -(2083:11-2083:18) "._store" --> (1309:10-1309:17) "._store" -(2083:18-2083:30) ".validated =" --> (1309:17-1309:29) ".validated =" -(2083:30-2084:5) " true;\n " --> (1309:29-1310:4) " true;\n\t\t\t" -(2084:5-2085:3) "}\n " --> (1310:4-1311:3) "\t}\n\t\t" -(2085:3-2085:13) "} else if " --> (1311:3-1311:14) "\t} else if " -(2085:13-2085:19) "(node)" --> (1311:14-1311:20) "(node)" -(2085:19-2086:4) " {\n " --> (1311:20-1312:4) " {\n\t\t\t" -(2086:4-2086:8) " var" --> (1312:4-1312:8) "\tvar" -(2086:8-2086:21) " iteratorFn =" --> (1312:8-1312:21) " iteratorFn =" -(2086:21-2086:35) " getIteratorFn" --> (1312:21-1312:35) " getIteratorFn" -(2086:35-2086:40) "(node" --> (1312:35-1312:40) "(node" -(2086:40-2088:4) ");\n\n " --> (1312:40-1313:0) ");" -(2088:4-2088:15) " if (typeof" --> (1313:0-1313:15) "\n\t\t\t\tif (typeof" -(2088:15-2088:30) " iteratorFn ===" --> (1313:15-1313:30) " iteratorFn ===" -(2088:30-2088:42) " 'function')" --> (1313:30-1313:42) " 'function')" -(2088:42-2091:6) " {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n " --> (1313:42-1314:0) " {" -(2091:6-2091:10) " if " --> (1314:0-1314:9) "\n\t\t\t\t\tif " -(2091:10-2091:25) "(iteratorFn !==" --> (1314:9-1314:24) "(iteratorFn !==" -(2091:25-2091:30) " node" --> (1314:24-1314:29) " node" -(2091:30-2091:39) ".entries)" --> (1314:29-1314:38) ".entries)" -(2091:39-2092:8) " {\n " --> (1314:38-1315:6) " {\n\t\t\t\t\t" -(2092:8-2092:12) " var" --> (1315:6-1315:10) "\tvar" -(2092:12-2092:23) " iterator =" --> (1315:10-1315:21) " iterator =" -(2092:23-2092:34) " iteratorFn" --> (1315:21-1315:32) " iteratorFn" -(2092:34-2092:39) ".call" --> (1315:32-1315:37) ".call" -(2092:39-2092:44) "(node" --> (1315:37-1315:42) "(node" -(2092:44-2093:8) ");\n " --> (1315:42-1316:6) ");\n\t\t\t\t\t" -(2093:8-2093:12) " var" --> (1316:6-1316:10) "\tvar" -(2093:12-2095:8) " step;\n\n " --> (1316:10-1317:0) " step;" -(2095:8-2095:17) " while (!" --> (1317:0-1317:15) "\n\t\t\t\t\t\twhile (!" -(2095:17-2095:24) "(step =" --> (1317:15-1317:22) "(step =" -(2095:24-2095:33) " iterator" --> (1317:22-1317:31) " iterator" -(2095:33-2095:39) ".next(" --> (1317:31-1317:37) ".next(" -(2095:39-2095:41) "))" --> (1317:37-1317:39) "))" -(2095:41-2095:47) ".done)" --> (1317:39-1317:45) ".done)" -(2095:47-2096:10) " {\n " --> (1317:45-1318:0) " {" -(2096:10-2096:14) " if " --> (1318:0-1318:11) "\n\t\t\t\t\t\t\tif " -(2096:14-2096:29) "(isValidElement" --> (1318:11-1318:26) "(isValidElement" -(2096:29-2096:34) "(step" --> (1318:26-1318:31) "(step" -(2096:34-2096:40) ".value" --> (1318:31-1318:37) ".value" -(2096:40-2096:42) "))" --> (1318:37-1318:39) "))" -(2096:42-2097:12) " {\n " --> (1318:39-1319:0) " {" -(2097:12-2097:32) " validateExplicitKey" --> (1319:0-1319:28) "\n\t\t\t\t\t\t\t\tvalidateExplicitKey" -(2097:32-2097:37) "(step" --> (1319:28-1319:33) "(step" -(2097:37-2097:44) ".value," --> (1319:33-1319:40) ".value," -(2097:44-2097:55) " parentType" --> (1319:40-1319:51) " parentType" -(2097:55-2098:11) ");\n " --> (1319:51-1320:7) ");\n\t\t\t\t\t\t" -(2098:11-2099:9) "}\n " --> (1320:7-1321:6) "\t}\n\t\t\t\t\t" -(2099:9-2100:7) "}\n " --> (1321:6-1322:5) "\t}\n\t\t\t\t" -(2100:7-2101:5) "}\n " --> (1322:5-1323:4) "\t}\n\t\t\t" -(2101:5-2102:3) "}\n " --> (1323:4-1324:3) "\t}\n\t\t" -(2102:3-2103:1) "}\n" --> (1324:3-1325:2) "\t}\n\t" -(2103:1-2112:0) "}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n" --> (1325:2-1326:2) "\t}\n\t" -(2112:0-2112:9) "\nfunction" --> (1326:2-1326:11) "\tfunction" -(2112:9-2112:27) " validatePropTypes" --> (1326:11-1326:29) " validatePropTypes" -(2112:27-2112:36) "(element)" --> (1326:29-1326:38) "(element)" -(2112:36-2113:2) " {\n " --> (1326:38-1327:3) " {\n\t\t" -(2113:2-2114:4) " {\n " --> (1327:3-1328:4) "\t{\n\t\t\t" -(2114:4-2114:8) " var" --> (1328:4-1328:8) "\tvar" -(2114:8-2114:15) " type =" --> (1328:8-1328:15) " type =" -(2114:15-2114:23) " element" --> (1328:15-1328:23) " element" -(2114:23-2116:4) ".type;\n\n " --> (1328:23-1329:0) ".type;" -(2116:4-2116:8) " if " --> (1329:0-1329:8) "\n\t\t\t\tif " -(2116:8-2116:17) "(type ===" --> (1329:8-1329:17) "(type ===" -(2116:17-2116:25) " null ||" --> (1329:17-1329:25) " null ||" -(2116:25-2116:34) " type ===" --> (1329:25-1329:34) " type ===" -(2116:34-2116:54) " undefined || typeof" --> (1329:34-1329:54) " undefined || typeof" -(2116:54-2116:63) " type ===" --> (1329:54-1329:63) " type ===" -(2116:63-2116:73) " 'string')" --> (1329:63-1329:73) " 'string')" -(2116:73-2117:6) " {\n " --> (1329:73-1330:0) " {" -(2117:6-2118:5) " return;\n " --> (1330:0-1331:4) "\n\t\t\t\t\treturn;\n\t\t\t" -(2118:5-2120:4) "}\n\n " --> (1331:4-1332:4) "\t}\n\t\t\t" -(2120:4-2120:8) " var" --> (1332:4-1332:8) "\tvar" -(2120:8-2122:4) " propTypes;\n\n " --> (1332:8-1333:0) " propTypes;" -(2122:4-2122:15) " if (typeof" --> (1333:0-1333:15) "\n\t\t\t\tif (typeof" -(2122:15-2122:24) " type ===" --> (1333:15-1333:24) " type ===" -(2122:24-2122:36) " 'function')" --> (1333:24-1333:36) " 'function')" -(2122:36-2123:6) " {\n " --> (1333:36-1334:0) " {" -(2123:6-2123:18) " propTypes =" --> (1334:0-1334:17) "\n\t\t\t\t\tpropTypes =" -(2123:18-2123:23) " type" --> (1334:17-1334:22) " type" -(2123:23-2124:5) ".propTypes;\n " --> (1334:22-1335:4) ".propTypes;\n\t\t\t" -(2124:5-2124:22) "} else if (typeof" --> (1335:4-1335:22) "\t} else if (typeof" -(2124:22-2124:31) " type ===" --> (1335:22-1335:31) " type ===" -(2124:31-2124:44) " 'object' && " --> (1335:31-1335:44) " 'object' && " -(2124:44-2124:49) "(type" --> (1335:44-1335:49) "(type" -(2124:49-2124:62) ".$$typeof ===" --> (1335:49-1335:62) ".$$typeof ===" -(2124:62-2126:4) " REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n " --> (1335:62-1335:88) " REACT_FORWARD_REF_TYPE ||" -(2126:4-2126:9) " type" --> (1335:88-1335:93) " type" -(2126:9-2126:22) ".$$typeof ===" --> (1335:93-1335:106) ".$$typeof ===" -(2126:22-2126:40) " REACT_MEMO_TYPE))" --> (1335:106-1335:124) " REACT_MEMO_TYPE))" -(2126:40-2127:6) " {\n " --> (1335:124-1336:0) " {" -(2127:6-2127:18) " propTypes =" --> (1336:0-1336:17) "\n\t\t\t\t\tpropTypes =" -(2127:18-2127:23) " type" --> (1336:17-1336:22) " type" -(2127:23-2128:5) ".propTypes;\n " --> (1336:22-1337:4) ".propTypes;\n\t\t\t" -(2128:5-2128:11) "} else" --> (1337:4-1337:11) "\t} else" -(2128:11-2129:6) " {\n " --> (1337:11-1338:0) " {" -(2129:6-2130:5) " return;\n " --> (1338:0-1339:4) "\n\t\t\t\t\treturn;\n\t\t\t" -(2130:5-2132:4) "}\n\n " --> (1339:4-1340:0) "\t}" -(2132:4-2132:8) " if " --> (1340:0-1340:8) "\n\t\t\t\tif " -(2132:8-2132:19) "(propTypes)" --> (1340:8-1340:19) "(propTypes)" -(2132:19-2134:6) " {\n // Intentionally inside to avoid triggering lazy initializers:\n " --> (1340:19-1341:5) " {\n\t\t\t\t" -(2134:6-2134:10) " var" --> (1341:5-1341:9) "\tvar" -(2134:10-2134:17) " name =" --> (1341:9-1341:16) " name =" -(2134:17-2134:34) " getComponentName" --> (1341:16-1341:33) " getComponentName" -(2134:34-2134:39) "(type" --> (1341:33-1341:38) "(type" -(2134:39-2135:6) ");\n " --> (1341:38-1342:0) ");" -(2135:6-2135:21) " checkPropTypes" --> (1342:0-1342:20) "\n\t\t\t\t\tcheckPropTypes" -(2135:21-2135:32) "(propTypes," --> (1342:20-1342:31) "(propTypes," -(2135:32-2135:40) " element" --> (1342:31-1342:39) " element" -(2135:40-2135:47) ".props," --> (1342:39-1342:46) ".props," -(2135:47-2135:55) " 'prop'," --> (1342:46-1342:54) " 'prop'," -(2135:55-2135:61) " name," --> (1342:54-1342:60) " name," -(2135:61-2135:69) " element" --> (1342:60-1342:68) " element" -(2135:69-2136:5) ");\n " --> (1342:68-1343:4) ");\n\t\t\t" -(2136:5-2136:15) "} else if " --> (1343:4-1343:15) "\t} else if " -(2136:15-2136:20) "(type" --> (1343:15-1343:20) "(type" -(2136:20-2136:34) ".PropTypes !==" --> (1343:20-1343:34) ".PropTypes !==" -(2136:34-2136:48) " undefined && " --> (1343:34-1343:48) " undefined && " -(2136:48-2136:79) "!propTypesMisspellWarningShown)" --> (1343:48-1343:79) "!propTypesMisspellWarningShown)" -(2136:79-2137:6) " {\n " --> (1343:79-1344:0) " {" -(2137:6-2137:38) " propTypesMisspellWarningShown =" --> (1344:0-1344:37) "\n\t\t\t\t\tpropTypesMisspellWarningShown =" -(2137:38-2139:6) " true; // Intentionally inside to avoid triggering lazy initializers:\n\n " --> (1344:37-1345:5) " true;\n\t\t\t\t" -(2139:6-2139:10) " var" --> (1345:5-1345:9) "\tvar" -(2139:10-2139:18) " _name =" --> (1345:9-1345:17) " _name =" -(2139:18-2139:35) " getComponentName" --> (1345:17-1345:34) " getComponentName" -(2139:35-2139:40) "(type" --> (1345:34-1345:39) "(type" -(2139:40-2141:6) ");\n\n " --> (1345:39-1346:0) ");" -(2141:6-2141:12) " error" --> (1346:0-1346:11) "\n\t\t\t\t\terror" -(2141:12-2141:115) "('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?'," --> (1346:11-1346:114) "('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?'," -(2141:115-2141:124) " _name ||" --> (1346:114-1346:123) " _name ||" -(2141:124-2141:134) " 'Unknown'" --> (1346:123-1346:133) " 'Unknown'" -(2141:134-2142:5) ");\n " --> (1346:133-1347:4) ");\n\t\t\t" -(2142:5-2144:4) "}\n\n " --> (1347:4-1348:0) "\t}" -(2144:4-2144:15) " if (typeof" --> (1348:0-1348:15) "\n\t\t\t\tif (typeof" -(2144:15-2144:20) " type" --> (1348:15-1348:20) " type" -(2144:20-2144:40) ".getDefaultProps ===" --> (1348:20-1348:40) ".getDefaultProps ===" -(2144:40-2144:55) " 'function' && " --> (1348:40-1348:55) " 'function' && " -(2144:55-2144:60) "!type" --> (1348:55-1348:60) "!type" -(2144:60-2144:76) ".getDefaultProps" --> (1348:60-1348:76) ".getDefaultProps" -(2144:76-2144:98) ".isReactClassApproved)" --> (1348:76-1348:98) ".isReactClassApproved)" -(2144:98-2145:6) " {\n " --> (1348:98-1349:0) " {" -(2145:6-2145:12) " error" --> (1349:0-1349:11) "\n\t\t\t\t\terror" -(2145:12-2145:75) "('getDefaultProps is only used on classic React.createClass ' +" --> (1349:11-1349:74) "('getDefaultProps is only used on classic React.createClass ' +" -(2145:75-2145:142) " 'definitions. Use a static property named `defaultProps` instead.'" --> (1349:74-1349:141) " 'definitions. Use a static property named `defaultProps` instead.'" -(2145:142-2146:5) ");\n " --> (1349:141-1350:4) ");\n\t\t\t" -(2146:5-2147:3) "}\n " --> (1350:4-1351:3) "\t}\n\t\t" -(2147:3-2148:1) "}\n" --> (1351:3-1352:2) "\t}\n\t" -(2148:1-2155:0) "}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n" --> (1352:2-1353:2) "\t}\n\t" -(2155:0-2155:9) "\nfunction" --> (1353:2-1353:11) "\tfunction" -(2155:9-2155:31) " validateFragmentProps" --> (1353:11-1353:33) " validateFragmentProps" -(2155:31-2155:41) "(fragment)" --> (1353:33-1353:43) "(fragment)" -(2155:41-2156:2) " {\n " --> (1353:43-1354:3) " {\n\t\t" -(2156:2-2157:4) " {\n " --> (1354:3-1355:4) "\t{\n\t\t\t" -(2157:4-2157:8) " var" --> (1355:4-1355:8) "\tvar" -(2157:8-2157:15) " keys =" --> (1355:8-1355:15) " keys =" -(2157:15-2157:22) " Object" --> (1355:15-1355:22) " Object" -(2157:22-2157:27) ".keys" --> (1355:22-1355:27) ".keys" -(2157:27-2157:36) "(fragment" --> (1355:27-1355:36) "(fragment" -(2157:36-2157:42) ".props" --> (1355:36-1355:42) ".props" -(2157:42-2159:4) ");\n\n " --> (1355:42-1356:0) ");" -(2159:4-2159:9) " for " --> (1356:0-1356:9) "\n\t\t\t\tfor " -(2159:9-2159:13) "(var" --> (1356:9-1356:13) "(var" -(2159:13-2159:17) " i =" --> (1356:13-1356:17) " i =" -(2159:17-2159:20) " 0;" --> (1356:17-1356:20) " 0;" -(2159:20-2159:24) " i <" --> (1356:20-1356:24) " i <" -(2159:24-2159:29) " keys" --> (1356:24-1356:29) " keys" -(2159:29-2159:37) ".length;" --> (1356:29-1356:37) ".length;" -(2159:37-2159:42) " i++)" --> (1356:37-1356:42) " i++)" -(2159:42-2160:6) " {\n " --> (1356:42-1357:5) " {\n\t\t\t\t" -(2160:6-2160:10) " var" --> (1357:5-1357:9) "\tvar" -(2160:10-2160:16) " key =" --> (1357:9-1357:15) " key =" -(2160:16-2160:21) " keys" --> (1357:15-1357:20) " keys" -(2160:21-2162:6) "[i];\n\n " --> (1357:20-1358:0) "[i];" -(2162:6-2162:10) " if " --> (1358:0-1358:9) "\n\t\t\t\t\tif " -(2162:10-2162:18) "(key !==" --> (1358:9-1358:17) "(key !==" -(2162:18-2162:32) " 'children' &&" --> (1358:17-1358:31) " 'children' &&" -(2162:32-2162:40) " key !==" --> (1358:31-1358:39) " key !==" -(2162:40-2162:47) " 'key')" --> (1358:39-1358:46) " 'key')" -(2162:47-2163:8) " {\n " --> (1358:46-1359:0) " {" -(2163:8-2163:40) " setCurrentlyValidatingElement$1" --> (1359:0-1359:38) "\n\t\t\t\t\t\tsetCurrentlyValidatingElement$1" -(2163:40-2163:49) "(fragment" --> (1359:38-1359:47) "(fragment" -(2163:49-2165:8) ");\n\n " --> (1359:47-1360:0) ");" -(2165:8-2165:14) " error" --> (1360:0-1360:12) "\n\t\t\t\t\t\terror" -(2165:14-2165:67) "('Invalid prop `%s` supplied to `React.Fragment`. ' +" --> (1360:12-1360:65) "('Invalid prop `%s` supplied to `React.Fragment`. ' +" -(2165:67-2165:127) " 'React.Fragment can only have `key` and `children` props.'," --> (1360:65-1360:125) " 'React.Fragment can only have `key` and `children` props.'," -(2165:127-2165:131) " key" --> (1360:125-1360:129) " key" -(2165:131-2167:8) ");\n\n " --> (1360:129-1361:0) ");" -(2167:8-2167:40) " setCurrentlyValidatingElement$1" --> (1361:0-1361:38) "\n\t\t\t\t\t\tsetCurrentlyValidatingElement$1" -(2167:40-2167:45) "(null" --> (1361:38-1361:43) "(null" -(2167:45-2168:8) ");\n " --> (1361:43-1362:0) ");" -(2168:8-2169:7) " break;\n " --> (1362:0-1363:5) "\n\t\t\t\t\t\tbreak;\n\t\t\t\t" -(2169:7-2170:5) "}\n " --> (1363:5-1364:4) "\t}\n\t\t\t" -(2170:5-2172:4) "}\n\n " --> (1364:4-1365:0) "\t}" -(2172:4-2172:8) " if " --> (1365:0-1365:8) "\n\t\t\t\tif " -(2172:8-2172:17) "(fragment" --> (1365:8-1365:17) "(fragment" -(2172:17-2172:25) ".ref !==" --> (1365:17-1365:25) ".ref !==" -(2172:25-2172:31) " null)" --> (1365:25-1365:31) " null)" -(2172:31-2173:6) " {\n " --> (1365:31-1366:0) " {" -(2173:6-2173:38) " setCurrentlyValidatingElement$1" --> (1366:0-1366:37) "\n\t\t\t\t\tsetCurrentlyValidatingElement$1" -(2173:38-2173:47) "(fragment" --> (1366:37-1366:46) "(fragment" -(2173:47-2175:6) ");\n\n " --> (1366:46-1367:0) ");" -(2175:6-2175:12) " error" --> (1367:0-1367:11) "\n\t\t\t\t\terror" -(2175:12-2175:68) "('Invalid attribute `ref` supplied to `React.Fragment`.'" --> (1367:11-1367:67) "('Invalid attribute `ref` supplied to `React.Fragment`.'" -(2175:68-2177:6) ");\n\n " --> (1367:67-1368:0) ");" -(2177:6-2177:38) " setCurrentlyValidatingElement$1" --> (1368:0-1368:37) "\n\t\t\t\t\tsetCurrentlyValidatingElement$1" -(2177:38-2177:43) "(null" --> (1368:37-1368:42) "(null" -(2177:43-2178:5) ");\n " --> (1368:42-1369:4) ");\n\t\t\t" -(2178:5-2179:3) "}\n " --> (1369:4-1370:3) "\t}\n\t\t" -(2179:3-2180:1) "}\n" --> (1370:3-1371:2) "\t}\n\t" -(2180:1-2181:0) "}" --> (1371:2-1372:2) "\t}\n\t" -(2181:0-2181:9) "\nfunction" --> (1372:2-1372:11) "\tfunction" -(2181:9-2181:37) " createElementWithValidation" --> (1372:11-1372:39) " createElementWithValidation" -(2181:37-2181:43) "(type," --> (1372:39-1372:45) "(type," -(2181:43-2181:50) " props," --> (1372:45-1372:52) " props," -(2181:50-2181:60) " children)" --> (1372:52-1372:62) " children)" -(2181:60-2182:2) " {\n " --> (1372:62-1373:3) " {\n\t\t" -(2182:2-2182:6) " var" --> (1373:3-1373:7) "\tvar" -(2182:6-2182:18) " validType =" --> (1373:7-1373:19) " validType =" -(2182:18-2182:37) " isValidElementType" --> (1373:19-1373:38) " isValidElementType" -(2182:37-2182:42) "(type" --> (1373:38-1373:43) "(type" -(2182:42-2185:2) "); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n " --> (1373:43-1374:0) ");" -(2185:2-2185:7) " if (" --> (1374:0-1374:8) "\n\t\t\tif (" -(2185:7-2185:18) "!validType)" --> (1374:8-1374:19) "!validType)" -(2185:18-2186:4) " {\n " --> (1374:19-1375:4) " {\n\t\t\t" -(2186:4-2186:8) " var" --> (1375:4-1375:8) "\tvar" -(2186:8-2186:15) " info =" --> (1375:8-1375:15) " info =" -(2186:15-2188:4) " '';\n\n " --> (1375:15-1376:0) " '';" -(2188:4-2188:8) " if " --> (1376:0-1376:8) "\n\t\t\t\tif " -(2188:8-2188:17) "(type ===" --> (1376:8-1376:17) "(type ===" -(2188:17-2188:37) " undefined || typeof" --> (1376:17-1376:37) " undefined || typeof" -(2188:37-2188:46) " type ===" --> (1376:37-1376:46) " type ===" -(2188:46-2188:58) " 'object' &&" --> (1376:46-1376:58) " 'object' &&" -(2188:58-2188:67) " type !==" --> (1376:58-1376:67) " type !==" -(2188:67-2188:75) " null &&" --> (1376:67-1376:75) " null &&" -(2188:75-2188:82) " Object" --> (1376:75-1376:82) " Object" -(2188:82-2188:87) ".keys" --> (1376:82-1376:87) ".keys" -(2188:87-2188:92) "(type" --> (1376:87-1376:92) "(type" -(2188:92-2188:93) ")" --> (1376:92-1376:93) ")" -(2188:93-2188:104) ".length ===" --> (1376:93-1376:104) ".length ===" -(2188:104-2188:107) " 0)" --> (1376:104-1376:107) " 0)" -(2188:107-2189:6) " {\n " --> (1376:107-1377:0) " {" -(2189:6-2189:14) " info +=" --> (1377:0-1377:13) "\n\t\t\t\t\tinfo +=" -(2189:14-2189:77) " ' You likely forgot to export your component from the file ' +" --> (1377:13-1377:76) " ' You likely forgot to export your component from the file ' +" -(2189:77-2190:5) " \"it's defined in, or you might have mixed up default and named imports.\";\n " --> (1377:76-1378:4) " \"it's defined in, or you might have mixed up default and named imports.\";\n\t\t\t" -(2190:5-2192:4) "}\n\n " --> (1378:4-1379:4) "\t}\n\t\t\t" -(2192:4-2192:8) " var" --> (1379:4-1379:8) "\tvar" -(2192:8-2192:21) " sourceInfo =" --> (1379:8-1379:21) " sourceInfo =" -(2192:21-2192:56) " getSourceInfoErrorAddendumForProps" --> (1379:21-1379:56) " getSourceInfoErrorAddendumForProps" -(2192:56-2192:62) "(props" --> (1379:56-1379:62) "(props" -(2192:62-2194:4) ");\n\n " --> (1379:62-1380:0) ");" -(2194:4-2194:8) " if " --> (1380:0-1380:8) "\n\t\t\t\tif " -(2194:8-2194:20) "(sourceInfo)" --> (1380:8-1380:20) "(sourceInfo)" -(2194:20-2195:6) " {\n " --> (1380:20-1381:0) " {" -(2195:6-2195:14) " info +=" --> (1381:0-1381:13) "\n\t\t\t\t\tinfo +=" -(2195:14-2196:5) " sourceInfo;\n " --> (1381:13-1382:4) " sourceInfo;\n\t\t\t" -(2196:5-2196:11) "} else" --> (1382:4-1382:11) "\t} else" -(2196:11-2197:6) " {\n " --> (1382:11-1383:0) " {" -(2197:6-2197:14) " info +=" --> (1383:0-1383:13) "\n\t\t\t\t\tinfo +=" -(2197:14-2197:43) " getDeclarationErrorAddendum(" --> (1383:13-1383:42) " getDeclarationErrorAddendum(" -(2197:43-2198:5) ");\n " --> (1383:42-1384:4) ");\n\t\t\t" -(2198:5-2200:4) "}\n\n " --> (1384:4-1385:4) "\t}\n\t\t\t" -(2200:4-2200:8) " var" --> (1385:4-1385:8) "\tvar" -(2200:8-2202:4) " typeString;\n\n " --> (1385:8-1386:0) " typeString;" -(2202:4-2202:8) " if " --> (1386:0-1386:8) "\n\t\t\t\tif " -(2202:8-2202:17) "(type ===" --> (1386:8-1386:17) "(type ===" -(2202:17-2202:23) " null)" --> (1386:17-1386:23) " null)" -(2202:23-2203:6) " {\n " --> (1386:23-1387:0) " {" -(2203:6-2203:19) " typeString =" --> (1387:0-1387:18) "\n\t\t\t\t\ttypeString =" -(2203:19-2204:5) " 'null';\n " --> (1387:18-1388:4) " 'null';\n\t\t\t" -(2204:5-2204:15) "} else if " --> (1388:4-1388:15) "\t} else if " -(2204:15-2204:21) "(Array" --> (1388:15-1388:21) "(Array" -(2204:21-2204:29) ".isArray" --> (1388:21-1388:29) ".isArray" -(2204:29-2204:34) "(type" --> (1388:29-1388:34) "(type" -(2204:34-2204:36) "))" --> (1388:34-1388:36) "))" -(2204:36-2205:6) " {\n " --> (1388:36-1389:0) " {" -(2205:6-2205:19) " typeString =" --> (1389:0-1389:18) "\n\t\t\t\t\ttypeString =" -(2205:19-2206:5) " 'array';\n " --> (1389:18-1390:4) " 'array';\n\t\t\t" -(2206:5-2206:15) "} else if " --> (1390:4-1390:15) "\t} else if " -(2206:15-2206:24) "(type !==" --> (1390:15-1390:24) "(type !==" -(2206:24-2206:37) " undefined &&" --> (1390:24-1390:37) " undefined &&" -(2206:37-2206:42) " type" --> (1390:37-1390:42) " type" -(2206:42-2206:55) ".$$typeof ===" --> (1390:42-1390:55) ".$$typeof ===" -(2206:55-2206:75) " REACT_ELEMENT_TYPE)" --> (1390:55-1390:75) " REACT_ELEMENT_TYPE)" -(2206:75-2207:6) " {\n " --> (1390:75-1391:0) " {" -(2207:6-2207:19) " typeString =" --> (1391:0-1391:18) "\n\t\t\t\t\ttypeString =" -(2207:19-2207:26) " \"<\" + " --> (1391:18-1391:25) " '<' + " -(2207:26-2207:43) "(getComponentName" --> (1391:25-1391:42) "(getComponentName" -(2207:43-2207:48) "(type" --> (1391:42-1391:47) "(type" -(2207:48-2207:53) ".type" --> (1391:47-1391:52) ".type" -(2207:53-2207:57) ") ||" --> (1391:52-1391:56) ") ||" -(2207:57-2207:70) " 'Unknown') +" --> (1391:56-1391:69) " 'Unknown') +" -(2207:70-2208:6) " \" />\";\n " --> (1391:69-1392:0) " ' />';" -(2208:6-2208:13) " info =" --> (1392:0-1392:12) "\n\t\t\t\t\tinfo =" -(2208:13-2209:5) " ' Did you accidentally export a JSX literal instead of a component?';\n " --> (1392:12-1393:4) " ' Did you accidentally export a JSX literal instead of a component?';\n\t\t\t" -(2209:5-2209:11) "} else" --> (1393:4-1393:11) "\t} else" -(2209:11-2210:6) " {\n " --> (1393:11-1394:0) " {" -(2210:6-2210:26) " typeString = typeof" --> (1394:0-1394:25) "\n\t\t\t\t\ttypeString = typeof" -(2210:26-2211:5) " type;\n " --> (1394:25-1395:4) " type;\n\t\t\t" -(2211:5-2213:4) "}\n\n " --> (1395:4-1396:4) "\t}\n\t\t\t" -(2213:4-2214:6) " {\n " --> (1396:4-1397:0) "\t{" -(2214:6-2214:12) " error" --> (1397:0-1397:11) "\n\t\t\t\t\terror" -(2214:12-2214:80) "('React.createElement: type is invalid -- expected a string (for ' +" --> (1397:11-1397:79) "('React.createElement: type is invalid -- expected a string (for ' +" -(2214:80-2214:141) " 'built-in components) or a class/function (for composite ' +" --> (1397:79-1397:140) " 'built-in components) or a class/function (for composite ' +" -(2214:141-2214:171) " 'components) but got: %s.%s'," --> (1397:140-1397:170) " 'components) but got: %s.%s'," -(2214:171-2214:183) " typeString," --> (1397:170-1397:182) " typeString," -(2214:183-2214:188) " info" --> (1397:182-1397:187) " info" -(2214:188-2215:5) ");\n " --> (1397:187-1398:4) ");\n\t\t\t" -(2215:5-2216:3) "}\n " --> (1398:4-1399:3) "\t}\n\t\t" -(2216:3-2218:2) "}\n\n " --> (1399:3-1400:3) "\t}\n\t\t" -(2218:2-2218:6) " var" --> (1400:3-1400:7) "\tvar" -(2218:6-2218:16) " element =" --> (1400:7-1400:17) " element =" -(2218:16-2218:30) " createElement" --> (1400:17-1400:31) " createElement" -(2218:30-2218:36) ".apply" --> (1400:31-1400:37) ".apply" -(2218:36-2218:42) "(this," --> (1400:37-1400:43) "(this," -(2218:42-2218:52) " arguments" --> (1400:43-1400:53) " arguments" -(2218:52-2221:2) "); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n " --> (1400:53-1401:0) ");" -(2221:2-2221:6) " if " --> (1401:0-1401:7) "\n\t\t\tif " -(2221:6-2221:17) "(element ==" --> (1401:7-1401:18) "(element ==" -(2221:17-2221:23) " null)" --> (1401:18-1401:24) " null)" -(2221:23-2222:4) " {\n " --> (1401:24-1402:0) " {" -(2222:4-2222:11) " return" --> (1402:0-1402:11) "\n\t\t\t\treturn" -(2222:11-2223:3) " element;\n " --> (1402:11-1403:3) " element;\n\t\t" -(2223:3-2230:2) "} // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n " --> (1403:3-1404:0) "\t}" -(2230:2-2230:6) " if " --> (1404:0-1404:7) "\n\t\t\tif " -(2230:6-2230:17) "(validType)" --> (1404:7-1404:18) "(validType)" -(2230:17-2231:4) " {\n " --> (1404:18-1405:0) " {" -(2231:4-2231:9) " for " --> (1405:0-1405:9) "\n\t\t\t\tfor " -(2231:9-2231:13) "(var" --> (1405:9-1405:13) "(var" -(2231:13-2231:17) " i =" --> (1405:13-1405:17) " i =" -(2231:17-2231:20) " 2;" --> (1405:17-1405:20) " 2;" -(2231:20-2231:24) " i <" --> (1405:20-1405:24) " i <" -(2231:24-2231:34) " arguments" --> (1405:24-1405:34) " arguments" -(2231:34-2231:42) ".length;" --> (1405:34-1405:42) ".length;" -(2231:42-2231:47) " i++)" --> (1405:42-1405:47) " i++)" -(2231:47-2232:6) " {\n " --> (1405:47-1406:0) " {" -(2232:6-2232:24) " validateChildKeys" --> (1406:0-1406:23) "\n\t\t\t\t\tvalidateChildKeys" -(2232:24-2232:34) "(arguments" --> (1406:23-1406:33) "(arguments" -(2232:34-2232:38) "[i]," --> (1406:33-1406:37) "[i]," -(2232:38-2232:43) " type" --> (1406:37-1406:42) " type" -(2232:43-2233:5) ");\n " --> (1406:42-1407:4) ");\n\t\t\t" -(2233:5-2234:3) "}\n " --> (1407:4-1408:3) "\t}\n\t\t" -(2234:3-2236:2) "}\n\n " --> (1408:3-1409:0) "\t}" -(2236:2-2236:6) " if " --> (1409:0-1409:7) "\n\t\t\tif " -(2236:6-2236:15) "(type ===" --> (1409:7-1409:16) "(type ===" -(2236:15-2236:23) " exports" --> (1409:16-1409:24) " exports" -(2236:23-2236:33) ".Fragment)" --> (1409:24-1409:34) ".Fragment)" -(2236:33-2237:4) " {\n " --> (1409:34-1410:0) " {" -(2237:4-2237:26) " validateFragmentProps" --> (1410:0-1410:26) "\n\t\t\t\tvalidateFragmentProps" -(2237:26-2237:34) "(element" --> (1410:26-1410:34) "(element" -(2237:34-2238:3) ");\n " --> (1410:34-1411:3) ");\n\t\t" -(2238:3-2238:9) "} else" --> (1411:3-1411:10) "\t} else" -(2238:9-2239:4) " {\n " --> (1411:10-1412:0) " {" -(2239:4-2239:22) " validatePropTypes" --> (1412:0-1412:22) "\n\t\t\t\tvalidatePropTypes" -(2239:22-2239:30) "(element" --> (1412:22-1412:30) "(element" -(2239:30-2240:3) ");\n " --> (1412:30-1413:3) ");\n\t\t" -(2240:3-2242:2) "}\n\n " --> (1413:3-1414:0) "\t}" -(2242:2-2242:9) " return" --> (1414:0-1414:10) "\n\t\t\treturn" -(2242:9-2243:1) " element;\n" --> (1414:10-1415:2) " element;\n\t" -(2243:1-2244:0) "}" --> (1415:2-1416:2) "\t}\n\t" -(2244:0-2244:4) "\nvar" --> (1416:2-1416:6) "\tvar" -(2244:4-2244:42) " didWarnAboutDeprecatedCreateFactory =" --> (1416:6-1416:44) " didWarnAboutDeprecatedCreateFactory =" -(2244:42-2245:0) " false;" --> (1416:44-1417:2) " false;\n\t" -(2245:0-2245:9) "\nfunction" --> (1417:2-1417:11) "\tfunction" -(2245:9-2245:37) " createFactoryWithValidation" --> (1417:11-1417:39) " createFactoryWithValidation" -(2245:37-2245:43) "(type)" --> (1417:39-1417:45) "(type)" -(2245:43-2246:2) " {\n " --> (1417:45-1418:3) " {\n\t\t" -(2246:2-2246:6) " var" --> (1418:3-1418:7) "\tvar" -(2246:6-2246:25) " validatedFactory =" --> (1418:7-1418:26) " validatedFactory =" -(2246:25-2246:53) " createElementWithValidation" --> (1418:26-1418:54) " createElementWithValidation" -(2246:53-2246:58) ".bind" --> (1418:54-1418:59) ".bind" -(2246:58-2246:64) "(null," --> (1418:59-1418:65) "(null," -(2246:64-2246:69) " type" --> (1418:65-1418:70) " type" -(2246:69-2247:2) ");\n " --> (1418:70-1419:0) ");" -(2247:2-2247:19) " validatedFactory" --> (1419:0-1419:20) "\n\t\t\tvalidatedFactory" -(2247:19-2247:26) ".type =" --> (1419:20-1419:27) ".type =" -(2247:26-2249:2) " type;\n\n " --> (1419:27-1420:3) " type;\n\t\t" -(2249:2-2250:4) " {\n " --> (1420:3-1421:0) "\t{" -(2250:4-2250:9) " if (" --> (1421:0-1421:9) "\n\t\t\t\tif (" -(2250:9-2250:46) "!didWarnAboutDeprecatedCreateFactory)" --> (1421:9-1421:46) "!didWarnAboutDeprecatedCreateFactory)" -(2250:46-2251:6) " {\n " --> (1421:46-1422:0) " {" -(2251:6-2251:44) " didWarnAboutDeprecatedCreateFactory =" --> (1422:0-1422:43) "\n\t\t\t\t\tdidWarnAboutDeprecatedCreateFactory =" -(2251:44-2253:6) " true;\n\n " --> (1422:43-1423:0) " true;" -(2253:6-2253:11) " warn" --> (1423:0-1423:10) "\n\t\t\t\t\twarn" -(2253:11-2253:75) "('React.createFactory() is deprecated and will be removed in ' +" --> (1423:10-1423:74) "('React.createFactory() is deprecated and will be removed in ' +" -(2253:75-2253:123) " 'a future major release. Consider using JSX ' +" --> (1423:74-1423:122) " 'a future major release. Consider using JSX ' +" -(2253:123-2253:172) " 'or use React.createElement() directly instead.'" --> (1423:122-1423:171) " 'or use React.createElement() directly instead.'" -(2253:172-2254:5) ");\n " --> (1423:171-1424:4) ");\n\t\t\t" -(2254:5-2257:4) "} // Legacy hook: remove it\n\n\n " --> (1424:4-1425:0) "\t}" -(2257:4-2257:11) " Object" --> (1425:0-1425:11) "\n\t\t\t\tObject" -(2257:11-2257:26) ".defineProperty" --> (1425:11-1425:26) ".defineProperty" -(2257:26-2257:44) "(validatedFactory," --> (1425:26-1425:44) "(validatedFactory," -(2257:44-2257:52) " 'type'," --> (1425:44-1425:52) " 'type'," -(2257:52-2258:6) " {\n " --> (1425:52-1426:5) " {\n\t\t\t\t" -(2258:6-2258:18) " enumerable:" --> (1426:5-1426:17) "\tenumerable:" -(2258:18-2259:6) " false,\n " --> (1426:17-1427:5) " false,\n\t\t\t\t" -(2259:6-2259:11) " get:" --> (1427:5-1427:10) "\tget:" -(2259:11-2259:23) " function ()" --> (1427:10-1427:21) " function()" -(2259:23-2260:8) " {\n " --> (1427:21-1428:0) " {" -(2260:8-2260:13) " warn" --> (1428:0-1428:11) "\n\t\t\t\t\t\twarn" -(2260:13-2260:72) "('Factory.type is deprecated. Access the class directly ' +" --> (1428:11-1428:70) "('Factory.type is deprecated. Access the class directly ' +" -(2260:72-2260:110) " 'before passing it to createFactory.'" --> (1428:70-1428:108) " 'before passing it to createFactory.'" -(2260:110-2262:8) ");\n\n " --> (1428:108-1429:0) ");" -(2262:8-2262:15) " Object" --> (1429:0-1429:13) "\n\t\t\t\t\t\tObject" -(2262:15-2262:30) ".defineProperty" --> (1429:13-1429:28) ".defineProperty" -(2262:30-2262:36) "(this," --> (1429:28-1429:34) "(this," -(2262:36-2262:44) " 'type'," --> (1429:34-1429:42) " 'type'," -(2262:44-2263:10) " {\n " --> (1429:42-1429:43) " " -(2263:10-2263:17) " value:" --> (1429:43-1429:50) "{value:" -(2263:17-2264:9) " type\n " --> (1429:50-1429:54) " typ" -(2264:9-2264:10) "}" --> (1429:54-1429:56) "e}" -(2264:10-2265:8) ");\n " --> (1429:56-1430:0) ");" -(2265:8-2265:15) " return" --> (1430:0-1430:13) "\n\t\t\t\t\t\treturn" -(2265:15-2266:7) " type;\n " --> (1430:13-1431:5) " type;\n\t\t\t\t" -(2266:7-2267:5) "}\n " --> (1431:5-1432:4) "\t}\n\t\t\t" -(2267:5-2267:6) "}" --> (1432:4-1432:6) "\t}" -(2267:6-2268:3) ");\n " --> (1432:6-1433:3) ");\n\t\t" -(2268:3-2270:2) "}\n\n " --> (1433:3-1434:0) "\t}" -(2270:2-2270:9) " return" --> (1434:0-1434:10) "\n\t\t\treturn" -(2270:9-2271:1) " validatedFactory;\n" --> (1434:10-1435:2) " validatedFactory;\n\t" -(2271:1-2272:0) "}" --> (1435:2-1436:2) "\t}\n\t" -(2272:0-2272:9) "\nfunction" --> (1436:2-1436:11) "\tfunction" -(2272:9-2272:36) " cloneElementWithValidation" --> (1436:11-1436:38) " cloneElementWithValidation" -(2272:36-2272:45) "(element," --> (1436:38-1436:47) "(element," -(2272:45-2272:52) " props," --> (1436:47-1436:54) " props," -(2272:52-2272:62) " children)" --> (1436:54-1436:64) " children)" -(2272:62-2273:2) " {\n " --> (1436:64-1437:3) " {\n\t\t" -(2273:2-2273:6) " var" --> (1437:3-1437:7) "\tvar" -(2273:6-2273:19) " newElement =" --> (1437:7-1437:20) " newElement =" -(2273:19-2273:32) " cloneElement" --> (1437:20-1437:33) " cloneElement" -(2273:32-2273:38) ".apply" --> (1437:33-1437:39) ".apply" -(2273:38-2273:44) "(this," --> (1437:39-1437:45) "(this," -(2273:44-2273:54) " arguments" --> (1437:45-1437:55) " arguments" -(2273:54-2275:2) ");\n\n " --> (1437:55-1438:0) ");" -(2275:2-2275:7) " for " --> (1438:0-1438:8) "\n\t\t\tfor " -(2275:7-2275:11) "(var" --> (1438:8-1438:12) "(var" -(2275:11-2275:15) " i =" --> (1438:12-1438:16) " i =" -(2275:15-2275:18) " 2;" --> (1438:16-1438:19) " 2;" -(2275:18-2275:22) " i <" --> (1438:19-1438:23) " i <" -(2275:22-2275:32) " arguments" --> (1438:23-1438:33) " arguments" -(2275:32-2275:40) ".length;" --> (1438:33-1438:41) ".length;" -(2275:40-2275:45) " i++)" --> (1438:41-1438:46) " i++)" -(2275:45-2276:4) " {\n " --> (1438:46-1439:0) " {" -(2276:4-2276:22) " validateChildKeys" --> (1439:0-1439:22) "\n\t\t\t\tvalidateChildKeys" -(2276:22-2276:32) "(arguments" --> (1439:22-1439:32) "(arguments" -(2276:32-2276:36) "[i]," --> (1439:32-1439:36) "[i]," -(2276:36-2276:47) " newElement" --> (1439:36-1439:47) " newElement" -(2276:47-2276:52) ".type" --> (1439:47-1439:52) ".type" -(2276:52-2277:3) ");\n " --> (1439:52-1440:3) ");\n\t\t" -(2277:3-2279:2) "}\n\n " --> (1440:3-1441:0) "\t}" -(2279:2-2279:20) " validatePropTypes" --> (1441:0-1441:21) "\n\t\t\tvalidatePropTypes" -(2279:20-2279:31) "(newElement" --> (1441:21-1441:32) "(newElement" -(2279:31-2280:2) ");\n " --> (1441:32-1442:0) ");" -(2280:2-2280:9) " return" --> (1442:0-1442:10) "\n\t\t\treturn" -(2280:9-2281:1) " newElement;\n" --> (1442:10-1443:2) " newElement;\n\t" -(2281:1-2283:0) "}\n" --> (1443:2-1444:2) "\t}\n\t" -(2283:0-2285:2) "\n{\n\n " --> (1444:2-1445:0) "\t{" -(2285:2-2285:6) " try" --> (1445:0-1445:7) "\n\t\t\ttry" -(2285:6-2286:4) " {\n " --> (1445:7-1446:4) " {\n\t\t\t" -(2286:4-2286:8) " var" --> (1446:4-1446:8) "\tvar" -(2286:8-2286:23) " frozenObject =" --> (1446:8-1446:23) " frozenObject =" -(2286:23-2286:30) " Object" --> (1446:23-1446:30) " Object" -(2286:30-2286:37) ".freeze" --> (1446:30-1446:37) ".freeze" -(2286:37-2286:39) "({" --> (1446:37-1446:38) "(" -(2286:39-2286:40) "}" --> (1446:38-1446:40) "{}" -(2286:40-2289:4) ");\n /* eslint-disable no-new */\n\n " --> (1446:40-1447:0) ");" -(2289:4-2289:8) " new" --> (1447:0-1447:8) "\n\t\t\t\tnew" -(2289:8-2289:12) " Map" --> (1447:8-1447:12) " Map" -(2289:12-2289:13) "(" --> (1447:12-1447:13) "(" -(2289:13-2289:14) "[" --> (1447:13-1447:14) "[" -(2289:14-2289:28) "[frozenObject," --> (1447:14-1447:28) "[frozenObject," -(2289:28-2289:33) " null" --> (1447:28-1447:33) " null" -(2289:33-2289:34) "]" --> (1447:33-1447:34) "]" -(2289:34-2290:4) "]);\n " --> (1447:34-1448:0) "]);" -(2290:4-2290:8) " new" --> (1448:0-1448:8) "\n\t\t\t\tnew" -(2290:8-2290:12) " Set" --> (1448:8-1448:12) " Set" -(2290:12-2290:13) "(" --> (1448:12-1448:13) "(" -(2290:13-2290:26) "[frozenObject" --> (1448:13-1448:26) "[frozenObject" -(2290:26-2292:3) "]);\n /* eslint-enable no-new */\n " --> (1448:26-1449:3) "]);\n\t\t" -(2292:3-2292:11) "} catch " --> (1449:3-1449:12) "\t} catch " -(2292:11-2292:14) "(e)" --> (1449:12-1449:15) "(e)" -(2292:14-2293:3) " {\n " --> (1449:15-1449:16) " " -(2293:3-2294:1) "}\n" --> (1449:16-1450:2) "{}\n\t" -(2294:1-2296:0) "}\n" --> (1450:2-1451:2) "\t}\n\t" -(2296:0-2296:4) "\nvar" --> (1451:2-1451:6) "\tvar" -(2296:4-2296:23) " createElement$1 = " --> (1451:6-1451:24) " createElement$1 =" -(2296:23-2297:0) " createElementWithValidation ;" --> (1451:24-1452:2) " createElementWithValidation;\n\t" -(2297:0-2297:4) "\nvar" --> (1452:2-1452:6) "\tvar" -(2297:4-2297:22) " cloneElement$1 = " --> (1452:6-1452:23) " cloneElement$1 =" -(2297:22-2298:0) " cloneElementWithValidation ;" --> (1452:23-1453:2) " cloneElementWithValidation;\n\t" -(2298:0-2298:4) "\nvar" --> (1453:2-1453:6) "\tvar" -(2298:4-2298:21) " createFactory = " --> (1453:6-1453:22) " createFactory =" -(2298:21-2299:0) " createFactoryWithValidation ;" --> (1453:22-1454:2) " createFactoryWithValidation;\n\t" -(2299:0-2299:4) "\nvar" --> (1454:2-1454:6) "\tvar" -(2299:4-2299:15) " Children =" --> (1454:6-1454:17) " Children =" -(2299:15-2300:2) " {\n " --> (1454:17-1455:3) " {\n\t\t" -(2300:2-2300:7) " map:" --> (1455:3-1455:8) "\tmap:" -(2300:7-2301:2) " mapChildren,\n " --> (1455:8-1456:3) " mapChildren,\n\t\t" -(2301:2-2301:11) " forEach:" --> (1456:3-1456:12) "\tforEach:" -(2301:11-2302:2) " forEachChildren,\n " --> (1456:12-1457:3) " forEachChildren,\n\t\t" -(2302:2-2302:9) " count:" --> (1457:3-1457:10) "\tcount:" -(2302:9-2303:2) " countChildren,\n " --> (1457:10-1458:3) " countChildren,\n\t\t" -(2303:2-2303:11) " toArray:" --> (1458:3-1458:12) "\ttoArray:" -(2303:11-2304:2) " toArray,\n " --> (1458:12-1459:3) " toArray,\n\t\t" -(2304:2-2304:8) " only:" --> (1459:3-1459:9) "\tonly:" -(2304:8-2305:1) " onlyChild\n" --> (1459:9-1460:2) " onlyChild\n\t" -(2305:1-2307:0) "};\n" --> (1460:2-1461:0) "\t};" -(2307:0-2307:8) "\nexports" --> (1461:0-1461:10) "\n\t\texports" -(2307:8-2307:19) ".Children =" --> (1461:10-1461:21) ".Children =" -(2307:19-2308:0) " Children;" --> (1461:21-1462:0) " Children;" -(2308:0-2308:8) "\nexports" --> (1462:0-1462:10) "\n\t\texports" -(2308:8-2308:20) ".Component =" --> (1462:10-1462:22) ".Component =" -(2308:20-2309:0) " Component;" --> (1462:22-1463:0) " Component;" -(2309:0-2309:8) "\nexports" --> (1463:0-1463:10) "\n\t\texports" -(2309:8-2309:24) ".PureComponent =" --> (1463:10-1463:26) ".PureComponent =" -(2309:24-2310:0) " PureComponent;" --> (1463:26-1464:0) " PureComponent;" -(2310:0-2310:8) "\nexports" --> (1464:0-1464:10) "\n\t\texports" -(2310:8-2310:61) ".__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =" --> (1464:10-1464:63) ".__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =" -(2310:61-2311:0) " ReactSharedInternals;" --> (1464:63-1465:0) " ReactSharedInternals;" -(2311:0-2311:8) "\nexports" --> (1465:0-1465:10) "\n\t\texports" -(2311:8-2311:23) ".cloneElement =" --> (1465:10-1465:25) ".cloneElement =" -(2311:23-2312:0) " cloneElement$1;" --> (1465:25-1466:0) " cloneElement$1;" -(2312:0-2312:8) "\nexports" --> (1466:0-1466:10) "\n\t\texports" -(2312:8-2312:24) ".createContext =" --> (1466:10-1466:26) ".createContext =" -(2312:24-2313:0) " createContext;" --> (1466:26-1467:0) " createContext;" -(2313:0-2313:8) "\nexports" --> (1467:0-1467:10) "\n\t\texports" -(2313:8-2313:24) ".createElement =" --> (1467:10-1467:26) ".createElement =" -(2313:24-2314:0) " createElement$1;" --> (1467:26-1468:0) " createElement$1;" -(2314:0-2314:8) "\nexports" --> (1468:0-1468:10) "\n\t\texports" -(2314:8-2314:24) ".createFactory =" --> (1468:10-1468:26) ".createFactory =" -(2314:24-2315:0) " createFactory;" --> (1468:26-1469:0) " createFactory;" -(2315:0-2315:8) "\nexports" --> (1469:0-1469:10) "\n\t\texports" -(2315:8-2315:20) ".createRef =" --> (1469:10-1469:22) ".createRef =" -(2315:20-2316:0) " createRef;" --> (1469:22-1470:0) " createRef;" -(2316:0-2316:8) "\nexports" --> (1470:0-1470:10) "\n\t\texports" -(2316:8-2316:21) ".forwardRef =" --> (1470:10-1470:23) ".forwardRef =" -(2316:21-2317:0) " forwardRef;" --> (1470:23-1471:0) " forwardRef;" -(2317:0-2317:8) "\nexports" --> (1471:0-1471:10) "\n\t\texports" -(2317:8-2317:25) ".isValidElement =" --> (1471:10-1471:27) ".isValidElement =" -(2317:25-2318:0) " isValidElement;" --> (1471:27-1472:0) " isValidElement;" -(2318:0-2318:8) "\nexports" --> (1472:0-1472:10) "\n\t\texports" -(2318:8-2318:15) ".lazy =" --> (1472:10-1472:17) ".lazy =" -(2318:15-2319:0) " lazy;" --> (1472:17-1473:0) " lazy;" -(2319:0-2319:8) "\nexports" --> (1473:0-1473:10) "\n\t\texports" -(2319:8-2319:15) ".memo =" --> (1473:10-1473:17) ".memo =" -(2319:15-2320:0) " memo;" --> (1473:17-1474:0) " memo;" -(2320:0-2320:8) "\nexports" --> (1474:0-1474:10) "\n\t\texports" -(2320:8-2320:22) ".useCallback =" --> (1474:10-1474:24) ".useCallback =" -(2320:22-2321:0) " useCallback;" --> (1474:24-1475:0) " useCallback;" -(2321:0-2321:8) "\nexports" --> (1475:0-1475:10) "\n\t\texports" -(2321:8-2321:21) ".useContext =" --> (1475:10-1475:23) ".useContext =" -(2321:21-2322:0) " useContext;" --> (1475:23-1476:0) " useContext;" -(2322:0-2322:8) "\nexports" --> (1476:0-1476:10) "\n\t\texports" -(2322:8-2322:24) ".useDebugValue =" --> (1476:10-1476:26) ".useDebugValue =" -(2322:24-2323:0) " useDebugValue;" --> (1476:26-1477:0) " useDebugValue;" -(2323:0-2323:8) "\nexports" --> (1477:0-1477:10) "\n\t\texports" -(2323:8-2323:20) ".useEffect =" --> (1477:10-1477:22) ".useEffect =" -(2323:20-2324:0) " useEffect;" --> (1477:22-1478:0) " useEffect;" -(2324:0-2324:8) "\nexports" --> (1478:0-1478:10) "\n\t\texports" -(2324:8-2324:30) ".useImperativeHandle =" --> (1478:10-1478:32) ".useImperativeHandle =" -(2324:30-2325:0) " useImperativeHandle;" --> (1478:32-1479:0) " useImperativeHandle;" -(2325:0-2325:8) "\nexports" --> (1479:0-1479:10) "\n\t\texports" -(2325:8-2325:26) ".useLayoutEffect =" --> (1479:10-1479:28) ".useLayoutEffect =" -(2325:26-2326:0) " useLayoutEffect;" --> (1479:28-1480:0) " useLayoutEffect;" -(2326:0-2326:8) "\nexports" --> (1480:0-1480:10) "\n\t\texports" -(2326:8-2326:18) ".useMemo =" --> (1480:10-1480:20) ".useMemo =" -(2326:18-2327:0) " useMemo;" --> (1480:20-1481:0) " useMemo;" -(2327:0-2327:8) "\nexports" --> (1481:0-1481:10) "\n\t\texports" -(2327:8-2327:21) ".useReducer =" --> (1481:10-1481:23) ".useReducer =" -(2327:21-2328:0) " useReducer;" --> (1481:23-1482:0) " useReducer;" -(2328:0-2328:8) "\nexports" --> (1482:0-1482:10) "\n\t\texports" -(2328:8-2328:17) ".useRef =" --> (1482:10-1482:19) ".useRef =" -(2328:17-2329:0) " useRef;" --> (1482:19-1483:0) " useRef;" -(2329:0-2329:8) "\nexports" --> (1483:0-1483:10) "\n\t\texports" -(2329:8-2329:19) ".useState =" --> (1483:10-1483:21) ".useState =" -(2329:19-2330:0) " useState;" --> (1483:21-1484:0) " useState;" -(2330:0-2330:8) "\nexports" --> (1484:0-1484:10) "\n\t\texports" -(2330:8-2330:18) ".version =" --> (1484:10-1484:20) ".version =" -(2330:18-2331:3) " ReactVersion;\n " --> (1484:20-1485:1) " ReactVersion;\n" -(2331:3-2331:6) "})(" --> (1485:1-1485:5) "\t})(" -(2331:6-2332:1) ");\n" --> (1485:5-1486:0) ");" -(2332:1-2333:1) "}\n" --> (1486:0-1487:1) "\n}\n" - +Nothing to repeat - string-literal-newline/input.js diff --git a/tasks/coverage/codegen_test262.snap b/tasks/coverage/codegen_test262.snap index 7a9970a818292..daa9fc5f1be03 100644 --- a/tasks/coverage/codegen_test262.snap +++ b/tasks/coverage/codegen_test262.snap @@ -1,5 +1,5 @@ commit: a1587416 codegen_test262 Summary: -AST Parsed : 46406/46406 (100.00%) -Positive Passed: 46406/46406 (100.00%) +AST Parsed : 46466/46466 (100.00%) +Positive Passed: 46466/46466 (100.00%) diff --git a/tasks/coverage/minifier_test262.snap b/tasks/coverage/minifier_test262.snap index 6a3ae6c0e90ca..c336b7aff63f4 100644 --- a/tasks/coverage/minifier_test262.snap +++ b/tasks/coverage/minifier_test262.snap @@ -1,8 +1,8 @@ commit: a1587416 minifier_test262 Summary: -AST Parsed : 46406/46406 (100.00%) -Positive Passed: 46401/46406 (99.99%) +AST Parsed : 46466/46466 (100.00%) +Positive Passed: 46461/46466 (99.99%) Expect to Parse: "language/expressions/new/S11.2.2_A3_T1.js" Expect to Parse: "language/expressions/new/S11.2.2_A3_T4.js" Expect to Parse: "language/types/reference/put-value-prop-base-primitive.js" diff --git a/tasks/coverage/parser_babel.snap b/tasks/coverage/parser_babel.snap index 1a79c2c878037..0c84582b73632 100644 --- a/tasks/coverage/parser_babel.snap +++ b/tasks/coverage/parser_babel.snap @@ -2,7 +2,7 @@ commit: 12619ffe parser_babel Summary: AST Parsed : 2093/2101 (99.62%) -Positive Passed: 2083/2101 (99.14%) +Positive Passed: 2059/2101 (98.00%) Negative Passed: 1380/1501 (91.94%) Expect Syntax Error: "annex-b/disabled/1.1-html-comments-close/input.js" Expect Syntax Error: "annex-b/disabled/3.1-sloppy-labeled-functions/input.js" @@ -125,6 +125,21 @@ Expect Syntax Error: "typescript/types/read-only-4/input.ts" Expect Syntax Error: "typescript/types/tuple-labeled-invalid-optional/input.ts" Expect Syntax Error: "typescript/types/tuple-optional-invalid/input.ts" Expect Syntax Error: "typescript/types/tuple-required-after-labeled-optional/input.ts" +Expect to Parse: "core/categorized/04-regex/input.js" + + × Incomplete quantifier +Expect to Parse: "core/categorized/05-regex/input.js" + + × Incomplete quantifier +Expect to Parse: "core/categorized/07-regex/input.js" + + × Incomplete quantifier +Expect to Parse: "core/categorized/labeled-block-statement-regex/input.js" + + × Incomplete quantifier +Expect to Parse: "core/categorized/regex-after-block/input.js" + + × Incomplete quantifier Expect to Parse: "core/opts/allowNewTargetOutsideFunction-true/input.js" × Unexpected new.target expression @@ -142,6 +157,69 @@ Expect to Parse: "core/opts/allowNewTargetOutsideFunction-true/input.js" · ────────── ╰──── help: new.target is only allowed in constructors and functions invoked using thew `new` operator +Expect to Parse: "core/regression/2591/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/328/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/330/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/331/input.js" + + × Nothing to repeat +Expect to Parse: "core/uncategorised/332/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/336/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/337/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/340/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/341/input.js" + + × Incomplete quantifier +Expect to Parse: "core/uncategorised/541/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/for-of/brackets-const/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/for-of/brackets-let/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/for-of/brackets-var/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/generators/yield-regex/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/uncategorised/317/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/yield/asi2/input.js" + + × Incomplete quantifier +Expect to Parse: "es2015/yield/regexp/input.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "es2017/async-functions/context-regex-after-statement/input.js" + + × Incomplete quantifier +Expect to Parse: "esprima/expression-primary-literal-regular-expression/u-flag-valid-range/input.js" + + × Invalid unicode escape Expect to Parse: "typescript/arrow-function/generic-tsx-babel-7/input.ts" × Expected `<` but found `EOF` @@ -1242,6 +1320,8 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─ ╰──── + × Invalid unicode escape + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[core/uncategorised/366/input.js:1:16] 1 │ var x = /[a-z]/\ux @@ -8240,6 +8320,8 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─ ╰──── + × Invalid unicode escape + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[esprima/invalid-syntax/migrated_0041/input.js:1:16] 1 │ var x = /[a-z]/\ux @@ -8253,6 +8335,8 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─ ╰──── + × Invalid unicode escape + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[esprima/invalid-syntax/migrated_0042/input.js:1:18] 1 │ var x = /[a-z\n]/\ux diff --git a/tasks/coverage/parser_test262.snap b/tasks/coverage/parser_test262.snap index 214a54144fb7c..62120fb57bfda 100644 --- a/tasks/coverage/parser_test262.snap +++ b/tasks/coverage/parser_test262.snap @@ -1,13 +1,11146 @@ commit: a1587416 parser_test262 Summary: -AST Parsed : 45859/45859 (100.00%) -Positive Passed: 45859/45859 (100.00%) -Negative Passed: 3925/3929 (99.90%) +AST Parsed : 46466/46466 (100.00%) +Positive Passed: 45179/46466 (97.23%) +Negative Passed: 4249/4307 (98.65%) +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-03.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-04.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-05.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-06.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-07.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-08.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-09.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-10.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-11.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-12.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-13.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-14.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-15.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-16.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-17.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-18.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-19.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-20.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-21.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-22.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-23.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-24.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-25.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-26.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-27.js" +Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-28.js" Expect Syntax Error: "language/import/import-assertions/json-invalid.js" Expect Syntax Error: "language/import/import-assertions/json-named-bindings.js" Expect Syntax Error: "language/import/import-attributes/json-invalid.js" Expect Syntax Error: "language/import/import-attributes/json-named-bindings.js" +Expect Syntax Error: "language/literals/regexp/early-err-pattern.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-2.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-3.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-4.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-5.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-dangling-groupname.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-duplicate-groupspecifier.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.js" +Expect Syntax Error: "language/literals/regexp/u-invalid-legacy-octal-escape.js" +Expect Syntax Error: "language/literals/regexp/u-invalid-oob-decimal-escape.js" +Expect to Parse: "annexB/built-ins/RegExp/RegExp-control-escape-russian-letter.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/RegExp-decimal-escape-class-range.js" + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/RegExp-invalid-control-escape-character-class-range.js" + + × Invalid escape +Expect to Parse: "annexB/built-ins/RegExp/RegExp-invalid-control-escape-character-class.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/RegExp-leading-escape.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "annexB/built-ins/RegExp/RegExp-trailing-escape.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js" + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape +Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/index/this-not-regexp-constructor.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/input/this-not-regexp-constructor.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/lastMatch/this-not-regexp-constructor.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/lastParen/this-not-regexp-constructor.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/leftContext/this-not-regexp-constructor.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/rightContext/this-not-regexp-constructor.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/named-groups/non-unicode-malformed-lookbehind.js" + + × Invalid named reference + + × Invalid named reference + + × Invalid named reference + + × Invalid named reference +Expect to Parse: "annexB/built-ins/RegExp/named-groups/non-unicode-malformed.js" + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name +Expect to Parse: "annexB/built-ins/RegExp/prototype/Symbol.split/Symbol.match-getter-recompiles-source.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/prototype/Symbol.split/toint32-limit-recompiles-source.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/flags-string-invalid.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/flags-to-string-err.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/flags-to-string.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/flags-undefined.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-regexp-distinct.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-regexp-flags-defined.js" + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-regexp-immutable-lastindex.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-regexp-props.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-regexp-same.js" + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-string-invalid-u.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-string-invalid.js" + + × Incomplete quantifier +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-string-u.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-string.js" + + × Unterminated group +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-to-string-err.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-undefined.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "annexB/built-ins/RegExp/prototype/flags/order-after-compile.js" + + × Invalid group +Expect to Parse: "annexB/language/literals/regexp/class-escape.js" + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape +Expect to Parse: "annexB/language/literals/regexp/extended-pattern-char.js" + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat +Expect to Parse: "annexB/language/literals/regexp/identity-escape.js" + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape +Expect to Parse: "annexB/language/literals/regexp/legacy-octal-escape.js" + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape +Expect to Parse: "annexB/language/literals/regexp/non-empty-class-ranges-no-dash.js" + + × Invalid character class range + + × Invalid character class range + + × Invalid character class range + + × Invalid character class range + + × Invalid character class range + + × Invalid character class range +Expect to Parse: "annexB/language/literals/regexp/non-empty-class-ranges.js" + + × Invalid character class range + + × Invalid character class range +Expect to Parse: "annexB/language/literals/regexp/quantifiable-assertion-followed-by.js" + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat +Expect to Parse: "annexB/language/literals/regexp/quantifiable-assertion-not-followed-by.js" + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat +Expect to Parse: "built-ins/Array/prototype/find/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Array/prototype/findIndex/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Array/prototype/findLast/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Array/prototype/findLastIndex/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/Array/prototype/toSorted/comparefn-not-a-function.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Function/prototype/apply/this-not-callable-realm.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Function/prototype/apply/this-not-callable.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Function/prototype/bind/S15.3.4.5_A16.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Function/prototype/call/S15.3.4.4_A16.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/JSON/stringify/value-tojson-not-function.js" + + × Unterminated group +Expect to Parse: "built-ins/Object/getOwnPropertyDescriptors/order-after-define-property.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/Object/prototype/toString/symbol-tag-override-instances.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/Proxy/defineProperty/trap-is-null-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Proxy/deleteProperty/trap-is-null-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Proxy/get/trap-is-missing-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Proxy/getOwnPropertyDescriptor/trap-is-undefined-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Proxy/has/trap-is-missing-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Proxy/isExtensible/trap-is-missing-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/Proxy/set/trap-is-missing-target-is-proxy.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A1.1_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A1.2_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A1.3_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A1.4_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A1.5_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A3.1_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.10_A4.1_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T7.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T8.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T9.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.12_A3_T5.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.12_A4_T5.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T10.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T11.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T12.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T13.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T14.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T15.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T17.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T2.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T3.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T4.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T5.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T6.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T7.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T8.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T9.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T11.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T12.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T13.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T14.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T15.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T16.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T17.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T9.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T9.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T11.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T12.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T14.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A5_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A5_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T10.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T11.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T12.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T2.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T3.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T7.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T8.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T9.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T1.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T2.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T3.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T4.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T1.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T10.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T11.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T12.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T13.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T14.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T2.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T3.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T4.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T5.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T6.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T7.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T8.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T9.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T1.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T10.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T11.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T12.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T13.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T14.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T15.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T16.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T17.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T18.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T19.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T2.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T20.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T21.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T3.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T4.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T5.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T6.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T7.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T8.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T9.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T11.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T12.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T9.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T2.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T3.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T11.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T9.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T11.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T12.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T13.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T14.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T17.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T19.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T20.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T21.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T22.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T23.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T24.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T25.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T26.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T27.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T28.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T29.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T30.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T31.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T32.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T33.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T9.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T1.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T2.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T3.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T4.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T5.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T6.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T7.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T8.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T9.js" + + × Unmatched ')' +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A5_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.8_A5_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/S15.10.3.1_A1_T1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.3.1_A1_T5.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.3.1_A2_T2.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.4.1_A1_T1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.4.1_A1_T2.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.4.1_A1_T3.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.4.1_A2_T1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.4.1_A2_T2.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.7_A1_T1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/S15.10.7_A2_T1.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/character-class-escape-non-whitespace.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/dotall/with-dotall-unicode.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/dotall/with-dotall.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/dotall/without-dotall-unicode.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/dotall/without-dotall.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/match-indices/indices-array-element.js" + + × Unterminated group +Expect to Parse: "built-ins/RegExp/match-indices/indices-array-non-unicode-match.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/match-indices/indices-array-properties.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/match-indices/indices-array-unicode-match.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/match-indices/indices-array-unicode-property-names.js" + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape +Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-object-undefined.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-object.js" + + × Nothing to repeat + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-properties.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/match-indices/indices-property.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-matchall.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/named-groups/groups-object-undefined.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/named-groups/groups-object-unmatched.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/named-groups/groups-object.js" + + × Nothing to repeat + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/named-groups/groups-properties.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-match.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-property-names-valid.js" + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape +Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-property-names.js" + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape +Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-references.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/named-groups/unicode-match.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/named-groups/unicode-property-names-valid.js" + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape +Expect to Parse: "built-ins/RegExp/named-groups/unicode-property-names.js" + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape +Expect to Parse: "built-ins/RegExp/named-groups/unicode-references.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/character-class.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "built-ins/RegExp/property-escapes/generated/ASCII.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/ASCII_Hex_Digit.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Alphabetic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Any.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Assigned.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Bidi_Control.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Bidi_Mirrored.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Case_Ignorable.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Cased.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Casefolded.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Casemapped.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Lowercased.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Titlecased.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Uppercased.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Dash.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Default_Ignorable_Code_Point.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Deprecated.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Diacritic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Component.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Modifier.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Modifier_Base.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Presentation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Extended_Pictographic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Extender.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Cased_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Close_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Connector_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Currency_Symbol.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Dash_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Enclosing_Mark.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Final_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Format.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Initial_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Letter_Number.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Line_Separator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Lowercase_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Math_Symbol.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Symbol.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Nonspacing_Mark.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Number.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Open_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Number.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Paragraph_Separator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Private_Use.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Separator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Space_Separator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Spacing_Mark.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Surrogate.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Titlecase_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Uppercase_Letter.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Grapheme_Base.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Grapheme_Extend.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Hex_Digit.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/IDS_Binary_Operator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/IDS_Trinary_Operator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/ID_Continue.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/ID_Start.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Ideographic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Join_Control.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Logical_Order_Exception.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Lowercase.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Math.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Noncharacter_Code_Point.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Pattern_Syntax.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Pattern_White_Space.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Quotation_Mark.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Radical.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Regional_Indicator.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Adlam.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ahom.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Anatolian_Hieroglyphs.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Arabic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Armenian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Avestan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Balinese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bamum.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bassa_Vah.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Batak.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bengali.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bhaiksuki.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bopomofo.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Brahmi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Braille.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Buginese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Buhid.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Canadian_Aboriginal.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Carian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Caucasian_Albanian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Chakma.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cherokee.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Chorasmian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Common.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cuneiform.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cypriot.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cypro_Minoan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cyrillic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Deseret.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Devanagari.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Dives_Akuru.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Dogra.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Duployan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Egyptian_Hieroglyphs.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Elbasan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Elymaic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ethiopic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Georgian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Glagolitic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gothic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Grantha.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Greek.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gujarati.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gunjala_Gondi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gurmukhi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Han.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hangul.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hanifi_Rohingya.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hanunoo.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hatran.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hebrew.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hiragana.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Imperial_Aramaic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inscriptional_Pahlavi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inscriptional_Parthian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Javanese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kaithi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kannada.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Katakana.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kawi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kayah_Li.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kharoshthi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khitan_Small_Script.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khmer.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khojki.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khudawadi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lao.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Latin.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lepcha.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Limbu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Linear_A.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Linear_B.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lisu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lycian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lydian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mahajani.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Makasar.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Malayalam.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mandaic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Manichaean.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Marchen.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Masaram_Gondi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Medefaidrin.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Meetei_Mayek.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mende_Kikakui.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Meroitic_Cursive.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Meroitic_Hieroglyphs.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Miao.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Modi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mongolian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mro.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Multani.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Myanmar.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nabataean.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nag_Mundari.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nandinagari.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_New_Tai_Lue.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Newa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nko.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nushu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nyiakeng_Puachue_Hmong.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ogham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ol_Chiki.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Hungarian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Italic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_North_Arabian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Permic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Persian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Sogdian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_South_Arabian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Turkic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Uyghur.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Oriya.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Osage.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Osmanya.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Pahawh_Hmong.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Palmyrene.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Pau_Cin_Hau.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Phags_Pa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Phoenician.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Psalter_Pahlavi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Rejang.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Runic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Samaritan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Saurashtra.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sharada.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Shavian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Siddham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_SignWriting.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sinhala.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sogdian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sora_Sompeng.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Soyombo.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sundanese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Syloti_Nagri.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Syriac.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tagalog.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tagbanwa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tai_Le.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tai_Tham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tai_Viet.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Takri.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tamil.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tangsa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tangut.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Telugu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Thaana.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Thai.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tibetan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tifinagh.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tirhuta.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Toto.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ugaritic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Vai.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Vithkuqi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Wancho.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Warang_Citi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Yezidi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Yi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Zanabazar_Square.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Adlam.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ahom.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Anatolian_Hieroglyphs.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Arabic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Armenian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Avestan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Balinese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bamum.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bassa_Vah.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Batak.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bengali.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bhaiksuki.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bopomofo.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Brahmi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Braille.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Buginese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Buhid.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Canadian_Aboriginal.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Carian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Caucasian_Albanian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Chakma.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cherokee.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Chorasmian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cuneiform.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cypriot.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cypro_Minoan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cyrillic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Deseret.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Devanagari.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Dives_Akuru.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Dogra.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Duployan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Egyptian_Hieroglyphs.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elbasan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elymaic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ethiopic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Georgian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Glagolitic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gothic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Grantha.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Greek.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gujarati.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gunjala_Gondi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gurmukhi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hangul.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hanifi_Rohingya.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hanunoo.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hatran.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hebrew.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hiragana.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Imperial_Aramaic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inscriptional_Pahlavi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inscriptional_Parthian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Javanese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kaithi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kannada.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kawi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kayah_Li.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kharoshthi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khitan_Small_Script.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khmer.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khojki.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khudawadi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lao.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Latin.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lepcha.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Limbu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Linear_A.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Linear_B.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lisu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lycian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lydian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mahajani.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Makasar.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Malayalam.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mandaic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Manichaean.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Marchen.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Masaram_Gondi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Medefaidrin.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meetei_Mayek.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mende_Kikakui.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Cursive.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Hieroglyphs.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Miao.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Modi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mongolian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mro.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Multani.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Myanmar.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nabataean.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nag_Mundari.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nandinagari.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_New_Tai_Lue.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Newa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nko.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nushu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nyiakeng_Puachue_Hmong.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ogham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ol_Chiki.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Hungarian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Italic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_North_Arabian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Permic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Persian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Sogdian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_South_Arabian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Turkic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Uyghur.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Oriya.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osage.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osmanya.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Pahawh_Hmong.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Palmyrene.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Pau_Cin_Hau.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phags_Pa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phoenician.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Psalter_Pahlavi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Rejang.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Runic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Samaritan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Saurashtra.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sharada.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Shavian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Siddham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_SignWriting.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sinhala.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sogdian.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sora_Sompeng.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Soyombo.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sundanese.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syloti_Nagri.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syriac.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagalog.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagbanwa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Le.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Tham.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Viet.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Takri.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tamil.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tangsa.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tangut.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Telugu.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thaana.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thai.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tibetan.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tifinagh.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tirhuta.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Toto.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ugaritic.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Vai.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Vithkuqi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Wancho.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Warang_Citi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yezidi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yi.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Zanabazar_Square.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Soft_Dotted.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Terminal_Punctuation.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Uppercase.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Variation_Selector.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/White_Space.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/XID_Continue.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/XID_Start.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-coerce-lastindex.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-failure-g-set-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-failure-y-set-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-infer-unicode.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-success-g-set-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-success-g-set-lastindex.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-success-y-set-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-y-coerce-lastindex-err.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/coerce-arg-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/coerce-arg.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/coerce-global.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/exec-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/exec-invocation.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/exec-return-type-invalid.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/exec-return-type-valid.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/flags-tostring-error.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-coerce-result-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-get-result-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-init-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-match-empty-coerce-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-match-empty-set-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-match-no-coerce-lastindex.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/g-match-no-set-lastindex.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/get-exec-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/get-global-err.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/get-unicode-error.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/y-fail-lastindex-no-write.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-get-constructor-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-get-species-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-is-not-object-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-is-undefined.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-is-not-constructor.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-is-null-or-undefined.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-regexp-get-global-throws.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-regexp-get-unicode-throws.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/string-tostring-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/string-tostring.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-get-flags-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-get-flags.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-lastindex-cached.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-tolength-lastindex-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-tostring-flags-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-tostring-flags.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/arg-1-coerce-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/arg-1-coerce.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/arg-2-coerce-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/arg-2-coerce.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/coerce-global.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/coerce-lastindex-err.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/coerce-lastindex.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/coerce-unicode.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/exec-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/exec-invocation.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/flags-tostring-error.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-coerce-replacement-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-coerce-replacement.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-invoke-args-empty-result.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-invoke-args.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-no-strict.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-strict.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/g-init-lastindex-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/g-pos-decrement.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/g-pos-increment.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/get-global-err.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/get-unicode-error.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/named-groups-fn.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/poisoned-stdlib.js" + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-capture-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-capture.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-prop-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-prop.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-index-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-index-undefined.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-index.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-length-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-length.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-matched-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-matched-global.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-matched.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-capture-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-groups-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-groups-prop-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-index-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-length-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-matched-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/y-fail-lastindex-no-write.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.search/coerce-string-err.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.search/coerce-string.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.search/set-lastindex-init-samevalue.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.search/set-lastindex-restore-samevalue.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.search/u-lastindex-advance.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/coerce-flags.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/coerce-limit-err.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/coerce-string-err.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/coerce-string.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/last-index-exceeds-str-size.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/species-ctor-err.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/species-ctor-species-non-ctor.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/species-ctor-species-undef.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/species-ctor-y.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/species-ctor.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/splitter-proto-from-ctor-realm.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/dotAll/this-val-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T10.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T11.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T12.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T13.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T14.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T15.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T17.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T18.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T19.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T20.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T21.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T7.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T8.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T9.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T2.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T3.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T7.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T10.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T11.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T12.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T2.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T3.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T4.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T5.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T6.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T7.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T8.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T9.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T1.js" + + × Nothing to repeat +Expect to Parse: "built-ins/RegExp/prototype/exec/failure-g-lastindex-reset.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/exec/failure-lastindex-access.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/exec/failure-lastindex-set.js" + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/exec/success-g-lastindex-no-access.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/exec/success-lastindex-access.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/exec/u-captured-value.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/exec/u-lastindex-adv.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/exec/u-lastindex-value.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/exec/y-fail-lastindex-no-write.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/flags/this-val-regexp.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/prototype/hasIndices/this-val-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/source/value-u.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/source/value.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/sticky/this-val-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T12.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T15.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T21.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T7.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T8.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/S15.10.6.3_A1_T9.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/test/y-fail-lastindex-no-write.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/prototype/unicode/this-val-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/prototype/unicodeSets/this-val-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-class-chars.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-dotAll-property.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-backreferences.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-p.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-b.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-p.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-w.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-ignoreCase-property.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-multiline-property.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline.js" + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-remove-modifiers.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-dotAll-flag-does-not-affect-dotAll-modifier.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-ignoreCase-flag-does-not-affect-ignoreCase-modifier.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-multiline-flag-does-not-affect-multiline-modifier.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nested-add-remove-modifiers.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-dotAll-within-remove-dotAll.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-ignoreCase-within-remove-ignoreCase.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-multiline-within-remove-multiline.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-dotAll-within-add-dotAll.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-ignoreCase-within-add-ignoreCase.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-multiline-within-add-multiline.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-dotAll-property.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-ignoreCase-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-multiline-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-backreferences.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterClasses.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterEscapes.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-b.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-p.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-w.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-b.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-p.js" + + × Invalid escape +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-w.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-dotAll-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-ignoreCase-property.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-multiline-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-dotAll-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-ignoreCase-flag.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-multiline-property.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline.js" + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-nested.js" + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-nested.js" + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js" + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-13.1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-14.0.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-15.0.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-15.1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-class-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-class.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-property-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-property-of-strings-escape.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-string-literal.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExp/unicode_full_case_folding.js" + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExp/unicode_identity_escape.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/Symbol.toStringTag.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/ancestry.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-call-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-get-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring.js" + + × Invalid group +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-not-callable.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/length.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/name.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/next-iteration-global.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/next-iteration.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/next-missing-internal-slots.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/prop-desc.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/regexp-tolength-lastindex-throws.js" + + × Invalid group +Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/this-is-not-object-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/endsWith/return-abrupt-from-searchstring-regexp-test.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/endsWith/searchstring-is-regexp-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/includes/return-abrupt-from-searchstring-regexp-test.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/includes/searchstring-is-regexp-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T10.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T11.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T12.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T13.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T14.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T15.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T16.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T17.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T18.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T2.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T3.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T4.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T5.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T6.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T7.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T8.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T9.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/match/this-value-not-obj-coercible.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/flags-nonglobal-throws.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/flags-undefined-throws.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-get-matchAll-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-matchAll-is-undefined-or-null.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-matchAll-not-callable.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-matchAll-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-prototype-get-matchAll-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-prototype-matchAll-invocation.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/regexp-prototype-matchAll-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/matchAll/toString-this-val.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/15.5.4.11-1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A12.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A1_T15.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A1_T16.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A1_T8.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T10.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T2.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T3.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T6.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T8.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A2_T9.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A4_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A4_T2.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A4_T3.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A4_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/S15.5.4.11_A5_T1.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replace/replaceValue-evaluation-order-regexp-object.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/getSubstitution-0x0024-0x003C.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/getSubstitution-0x0024N.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/getSubstitution-0x0024NN.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/searchValue-flags-no-g-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/searchValue-get-flags-abrupt.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/searchValue-replacer-before-tostring.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/searchValue-replacer-call.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/replaceAll/searchValue-tostring-regexp.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/search/S15.5.4.12_A2_T3.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/search/S15.5.4.12_A2_T4.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/search/S15.5.4.12_A2_T5.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/search/S15.5.4.12_A3_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/search/S15.5.4.12_A3_T2.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/search/this-value-not-obj-coercible.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-a-z-and-instance-is-string-abc.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-and-instance-is-number.js" + + × Unmatched ')' +Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-d-and-instance-is-string-dfe23iu-34-65.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-l-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-s-and-instance-is-string-a-b-c-de-f.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-x-and-instance-is-string-a-b-c-de-f.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-0-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-1-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-2-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-3-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-4-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-hi-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-undefined-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-l-and-void-0-and-instance-is-string-hello.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-s-and-3-and-instance-is-string-a-b-c-de-f.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/String/prototype/split/separator-regexp.js" + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape +Expect to Parse: "built-ins/String/prototype/split/transferred-to-number-separator-override-tostring-returns-regexp.js" + + × Unmatched ')' +Expect to Parse: "built-ins/String/prototype/startsWith/return-abrupt-from-searchstring-regexp-test.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/String/prototype/startsWith/searchstring-is-regexp-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/find/BigInt/predicate-is-not-callable-throws.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/TypedArray/prototype/find/predicate-is-not-callable-throws.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/TypedArray/prototype/findIndex/BigInt/predicate-is-not-callable-throws.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/TypedArray/prototype/findIndex/predicate-is-not-callable-throws.js" + + × Lone quantifier brackets +Expect to Parse: "built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/findLast/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/findLastIndex/predicate-is-not-callable-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/sort/comparefn-nonfunction-call-throws.js" + + × Incomplete quantifier +Expect to Parse: "built-ins/TypedArray/prototype/toSorted/comparefn-not-a-function.js" + + × Incomplete quantifier +Expect to Parse: "intl402/DateTimeFormat/prototype/format/proleptic-gregorian-calendar.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "intl402/Intl/supportedValuesOf/calendars.js" + + × Incomplete quantifier +Expect to Parse: "intl402/Intl/supportedValuesOf/collations.js" + + × Incomplete quantifier +Expect to Parse: "intl402/Intl/supportedValuesOf/currencies.js" + + × Incomplete quantifier +Expect to Parse: "intl402/Intl/supportedValuesOf/numberingSystems.js" + + × Incomplete quantifier +Expect to Parse: "intl402/Locale/likely-subtags-grandfathered.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "intl402/fallback-locales-are-supported.js" + + × Incomplete quantifier +Expect to Parse: "language/expressions/optional-chaining/member-expression.js" + + × Incomplete quantifier +Expect to Parse: "language/expressions/yield/rhs-regexp.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A1.1_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A1.4_T1.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "language/literals/regexp/S7.8.5_A2.1_T1.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A2.4_T1.js" + + × Invalid escape + + × Invalid escape +Expect to Parse: "language/literals/regexp/S7.8.5_A3.1_T1.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A3.1_T2.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A3.1_T3.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A3.1_T4.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A3.1_T5.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A3.1_T6.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/S7.8.5_A4.1.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/inequality.js" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/lastIndex.js" + + × Incomplete quantifier +Expect to Parse: "language/literals/regexp/u-surrogate-pairs.js" + + × Invalid unicode escape +Expect to Parse: "language/literals/regexp/u-unicode-esc.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/await-expr-regexp.js" + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/block-await-expr-regexp.js" + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/export-class-decl-await-expr-regexp.js" + + × Lone quantifier brackets +Expect to Parse: "language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-regexp.js" + + × Lone quantifier brackets +Expect to Parse: "language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-regexp.js" + + × Lone quantifier brackets +Expect to Parse: "language/module-code/top-level-await/syntax/export-lex-decl-await-expr-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "language/module-code/top-level-await/syntax/export-var-await-expr-regexp.js" + + × Lone quantifier brackets + + × Lone quantifier brackets +Expect to Parse: "language/module-code/top-level-await/syntax/for-await-await-expr-regexp.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/for-await-expr-regexp.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/for-in-await-expr-regexp.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/for-of-await-expr-regexp.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/if-block-await-expr-regexp.js" + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/if-expr-await-expr-regexp.js" + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/try-await-expr-regexp.js" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "language/module-code/top-level-await/syntax/while-await-expr-regexp.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/block-regexp-literal-flags.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/block-regexp-literal.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/block-with-statment-regexp-literal-flags.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/block-with-statment-regexp-literal.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/class-regexp-literal-flags.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/class-regexp-literal.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/fn-regexp-literal-flags.js" + + × Incomplete quantifier +Expect to Parse: "language/statementList/fn-regexp-literal.js" + + × Incomplete quantifier +Expect to Parse: "language/statements/for-of/iterator-next-result-type.js" + + × Incomplete quantifier × '0'-prefixed octal literals and octal escape sequences are deprecated ╭─[annexB/language/expressions/template-literal/legacy-octal-escape-sequence-strict.js:18:4] @@ -62,6 +11195,339 @@ Expect Syntax Error: "language/import/import-attributes/json-named-bindings.js" 15 │ ╰──── + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × The 'u' and 'v' regular expression flags cannot be enabled at the same time + ╭─[built-ins/RegExp/prototype/unicodeSets/uv-flags.js:17:1] + 16 │ + 17 │ /./uv; + · ───── + ╰──── + × Cannot assign to 'arguments' in strict mode ╭─[language/arguments-object/10.5-1gs.js:17:5] 16 │ function f_10_5_1_gs(){ @@ -5238,6 +16704,8 @@ Expect Syntax Error: "language/import/import-attributes/json-named-bindings.js" · ───── ╰──── + × Incomplete quantifier + × await expression not allowed in formal parameter ╭─[language/expressions/async-arrow-function/await-as-param-nested-arrow-body-position.js:16:19] 15 │ @@ -19004,6 +30472,520 @@ Expect Syntax Error: "language/import/import-attributes/json-named-bindings.js" ╰──── help: Try insert a semicolon here + × Unterminated multiline comment + ╭─[language/literals/regexp/S7.8.5_A1.2_T1.js:23:1] + 22 │ + 23 │ /*/ + · ──── + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A1.2_T2.js:26:1] + 25 │ + 26 │ /\/ + · ──── + ╰──── + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A1.2_T3.js:27:1] + 26 │ /// + 27 │ .source; + · ─ + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A1.2_T4.js:27:1] + 26 │ // + 27 │ .source; + · ─ + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A1.3_T1.js:29:1] + 28 │ + 29 │ / + · ── + 30 │ / + ╰──── + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A1.3_T1.js:31:1] + 30 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A1.3_T3.js:29:1] + 28 │ + 29 │ / + · ── + 30 │ / + ╰──── + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A1.3_T3.js:31:1] + 30 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A1.5_T1.js:23:1] + 22 │ + 23 │ /\ + · ─── + 24 │ / + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A1.5_T1.js:25:1] + 24 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A1.5_T3.js:22:1] + 21 │ + 22 │ /\ + · ─── + 23 │ / + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A1.5_T3.js:24:1] + 23 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A2.2_T1.js:23:1] + 22 │ + 23 │ /a\/ + · ───── + ╰──── + + × Unterminated character class + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A2.2_T2.js:23:5] + 22 │ + 23 │ /a//.source; + · ─ + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A2.3_T1.js:32:1] + 31 │ + 32 │ /a + · ─── + 33 │ / + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A2.3_T1.js:34:1] + 33 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A2.3_T3.js:33:1] + 32 │ + 33 │ /a + · ─── + 34 │ / + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A2.3_T3.js:35:1] + 34 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A2.5_T1.js:28:1] + 27 │ + 28 │ /a\ + · ──── + 29 │ / + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A2.5_T1.js:30:1] + 29 │ / + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/S7.8.5_A2.5_T3.js:28:1] + 27 │ + 28 │ /a\ + · ──── + 29 │ / + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/S7.8.5_A2.5_T3.js:30:1] + 29 │ / + ╰──── + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Unexpected flag G in regular expression literal + ╭─[language/literals/regexp/early-err-bad-flag.js:18:5] + 17 │ + 18 │ /./G; + · ▲ + ╰──── + + × Flag g is mentioned twice in regular expression literal + ╭─[language/literals/regexp/early-err-dup-flag.js:18:7] + 17 │ + 18 │ /./gig; + · ▲ + ╰──── + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[language/literals/regexp/early-err-flags-unicode-escape.js:18:4] + 17 │ + 18 │ /./\u0067; + · ▲ + ╰──── + help: Try insert a semicolon here + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Invalid group + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Invalid capture group name + + × Invalid capture group name + + × Invalid escape + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid named reference + + × Invalid named reference + + × Invalid capture group name + + × Invalid named reference + + × Invalid capture group name + + × Invalid named reference + + × Invalid capture group name + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid capture group name + + × Invalid capture group name + + × Invalid unicode escape + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Invalid capture group name + + × Unterminated regular expression + ╭─[language/literals/regexp/regexp-first-char-no-line-separator.js:29:1] + 28 │ + 29 │ /
/ + · ── + 30 │ + ╰──── + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/regexp-first-char-no-line-separator.js:34:1] + 33 │ */ + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/regexp-first-char-no-paragraph-separator.js:29:1] + 28 │ + 29 │ /
/ + · ── + 30 │ + ╰──── + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/regexp-first-char-no-paragraph-separator.js:34:1] + 33 │ */ + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/regexp-source-char-no-line-separator.js:28:1] + 27 │ + 28 │ /a\\
/ + · ───── + 29 │ + ╰──── + + × Unexpected token + ╭─[language/literals/regexp/regexp-source-char-no-line-separator.js:33:1] + 32 │ */ + ╰──── + + × Unterminated regular expression + ╭─[language/literals/regexp/regexp-source-char-no-paragraph-separator.js:29:1] + 28 │ + 29 │ /a\\

/ + · ───── + 30 │ + ╰──── + + × Unterminated character class + + × Unexpected token + ╭─[language/literals/regexp/regexp-source-char-no-paragraph-separator.js:34:1] + 33 │ */ + ╰──── + + × Invalid escape + + × Incomplete quantifier + + × Invalid escape + + × Invalid character class range + + × Invalid character class range + + × Invalid character class range + + × Invalid character class range + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Incomplete quantifier + + × Invalid unicode escape + + × Invalid escape + × Unterminated string ╭─[language/literals/string/S7.8.4_A1.1_T1.js:18:3] 17 │ //CHECK#1 @@ -31450,6 +43432,8 @@ Expect Syntax Error: "language/import/import-attributes/json-named-bindings.js" · ─────── ╰──── + × Incomplete quantifier + × Expected `}` but found `EOF` ╭─[language/statements/function/invalid-function-body-1.js:18:1] 17 │ function __func(){/ ABC} diff --git a/tasks/coverage/parser_typescript.snap b/tasks/coverage/parser_typescript.snap index b4e49bf512a29..28976c5985def 100644 --- a/tasks/coverage/parser_typescript.snap +++ b/tasks/coverage/parser_typescript.snap @@ -2,8 +2,8 @@ commit: d8086f14 parser_typescript Summary: AST Parsed : 5279/5283 (99.92%) -Positive Passed: 5272/5283 (99.79%) -Negative Passed: 1094/4875 (22.44%) +Positive Passed: 5254/5283 (99.45%) +Negative Passed: 1134/4875 (23.26%) Expect Syntax Error: "compiler/ClassDeclaration10.ts" Expect Syntax Error: "compiler/ClassDeclaration11.ts" Expect Syntax Error: "compiler/ClassDeclaration13.ts" @@ -324,7 +324,6 @@ Expect Syntax Error: "compiler/collisionArgumentsFunctionExpressions.ts" Expect Syntax Error: "compiler/collisionExportsRequireAndFunction.ts" Expect Syntax Error: "compiler/collisionExportsRequireAndInternalModuleAlias.ts" Expect Syntax Error: "compiler/commaOperator1.ts" -Expect Syntax Error: "compiler/commaOperatorLeftSideUnused.ts" Expect Syntax Error: "compiler/commentOnImportStatement1.ts" Expect Syntax Error: "compiler/commentOnImportStatement2.ts" Expect Syntax Error: "compiler/commentOnImportStatement3.ts" @@ -521,8 +520,6 @@ Expect Syntax Error: "compiler/divergentAccessorsTypes6.ts" Expect Syntax Error: "compiler/divergentAccessorsTypes8.ts" Expect Syntax Error: "compiler/divergentAccessorsVisibility1.ts" Expect Syntax Error: "compiler/doNotElaborateAssignabilityToTypeParameters.ts" -Expect Syntax Error: "compiler/doYouNeedToChangeYourTargetLibraryES2015.ts" -Expect Syntax Error: "compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts" Expect Syntax Error: "compiler/doubleUnderStringLiteralAssignability.ts" Expect Syntax Error: "compiler/downlevelLetConst12.ts" Expect Syntax Error: "compiler/downlevelLetConst16.ts" @@ -691,10 +688,8 @@ Expect Syntax Error: "compiler/fakeInfinity1.ts" Expect Syntax Error: "compiler/fallFromLastCase2.ts" Expect Syntax Error: "compiler/fatarrowfunctionsOptionalArgsErrors4.ts" Expect Syntax Error: "compiler/findLast.ts" -Expect Syntax Error: "compiler/firstMatchRegExpMatchArray.ts" Expect Syntax Error: "compiler/fixTypeParameterInSignatureWithRestParameters.ts" Expect Syntax Error: "compiler/fixingTypeParametersRepeatedly2.ts" -Expect Syntax Error: "compiler/flatArrayNoExcessiveStackDepth.ts" Expect Syntax Error: "compiler/forIn.ts" Expect Syntax Error: "compiler/forIn2.ts" Expect Syntax Error: "compiler/forInStatement2.ts" @@ -1394,7 +1389,6 @@ Expect Syntax Error: "compiler/prettyFileWithErrorsAndTabs.ts" Expect Syntax Error: "compiler/primaryExpressionMods.ts" Expect Syntax Error: "compiler/primitiveConstraints1.ts" Expect Syntax Error: "compiler/primitiveConstraints2.ts" -Expect Syntax Error: "compiler/primitiveMembers.ts" Expect Syntax Error: "compiler/primitiveTypeAsClassName.ts" Expect Syntax Error: "compiler/primitiveTypeAsInterfaceName.ts" Expect Syntax Error: "compiler/primitiveTypeAsInterfaceNameGeneric.ts" @@ -1489,10 +1483,7 @@ Expect Syntax Error: "compiler/recursiveTypeParameterConstraintReferenceLacksTyp Expect Syntax Error: "compiler/recursiveTypeRelations.ts" Expect Syntax Error: "compiler/recursivelyExpandingUnionNoStackoverflow.ts" Expect Syntax Error: "compiler/redefineArray.ts" -Expect Syntax Error: "compiler/regExpWithOpenBracketInCharClass.ts" -Expect Syntax Error: "compiler/regularExpressionAnnexB.ts" Expect Syntax Error: "compiler/regularExpressionGroupNameSuggestions.ts" -Expect Syntax Error: "compiler/regularExpressionUnicodePropertyValueExpressionSuggestions.ts" Expect Syntax Error: "compiler/relationComplexityError.ts" Expect Syntax Error: "compiler/relationalOperatorComparable.ts" Expect Syntax Error: "compiler/renamingDestructuredPropertyInFunctionType.ts" @@ -1791,7 +1782,6 @@ Expect Syntax Error: "compiler/unusedFunctionsinNamespaces4.ts" Expect Syntax Error: "compiler/unusedFunctionsinNamespaces5.ts" Expect Syntax Error: "compiler/unusedFunctionsinNamespaces6.ts" Expect Syntax Error: "compiler/unusedGetterInClass.ts" -Expect Syntax Error: "compiler/unusedIdentifiersConsolidated1.ts" Expect Syntax Error: "compiler/unusedImports10.ts" Expect Syntax Error: "compiler/unusedInterfaceinNamespace1.ts" Expect Syntax Error: "compiler/unusedInterfaceinNamespace2.ts" @@ -1883,9 +1873,6 @@ Expect Syntax Error: "compiler/unusedVariablesinForLoop2.ts" Expect Syntax Error: "compiler/unusedVariablesinForLoop3.ts" Expect Syntax Error: "compiler/unusedVariablesinForLoop4.ts" Expect Syntax Error: "compiler/unusedVariablesinModules1.ts" -Expect Syntax Error: "compiler/unusedVariablesinNamespaces1.ts" -Expect Syntax Error: "compiler/unusedVariablesinNamespaces2.ts" -Expect Syntax Error: "compiler/unusedVariablesinNamespaces3.ts" Expect Syntax Error: "compiler/useBeforeDeclaration_classDecorators.1.ts" Expect Syntax Error: "compiler/useBeforeDeclaration_destructuring.ts" Expect Syntax Error: "compiler/useBeforeDeclaration_jsx.tsx" @@ -2156,7 +2143,6 @@ Expect Syntax Error: "conformance/controlFlow/controlFlowNullishCoalesce.ts" Expect Syntax Error: "conformance/controlFlow/controlFlowOptionalChain.ts" Expect Syntax Error: "conformance/controlFlow/controlFlowOptionalChain3.tsx" Expect Syntax Error: "conformance/controlFlow/controlFlowTypeofObject.ts" -Expect Syntax Error: "conformance/controlFlow/controlFlowWhileStatement.ts" Expect Syntax Error: "conformance/controlFlow/definiteAssignmentAssertions.ts" Expect Syntax Error: "conformance/controlFlow/dependentDestructuredVariables.ts" Expect Syntax Error: "conformance/controlFlow/exhaustiveSwitchStatements1.ts" @@ -2502,25 +2488,6 @@ Expect Syntax Error: "conformance/es6/templates/templateStringWithEmbeddedInstan Expect Syntax Error: "conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts" Expect Syntax Error: "conformance/es6/templates/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.ts" Expect Syntax Error: "conformance/es6/templates/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions11.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions12.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions13.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions14.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions15.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions16.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions17.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions18.ts" -Expect Syntax Error: "conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions19.ts" Expect Syntax Error: "conformance/es6/yieldExpressions/YieldExpression10_es6.ts" Expect Syntax Error: "conformance/es6/yieldExpressions/YieldExpression11_es6.ts" Expect Syntax Error: "conformance/es6/yieldExpressions/YieldExpression1_es6.ts" @@ -2754,7 +2721,6 @@ Expect Syntax Error: "conformance/externalModules/typeOnly/exportSpecifiers_js.t Expect Syntax Error: "conformance/externalModules/typeOnly/preserveValueImports_module.ts" Expect Syntax Error: "conformance/externalModules/verbatimModuleSyntaxCompat.ts" Expect Syntax Error: "conformance/externalModules/verbatimModuleSyntaxInternalImportEquals.ts" -Expect Syntax Error: "conformance/fixSignatureCaching.ts" Expect Syntax Error: "conformance/functions/functionImplementationErrors.ts" Expect Syntax Error: "conformance/functions/functionImplementations.ts" Expect Syntax Error: "conformance/functions/functionNameConflicts.ts" @@ -3162,9 +3128,7 @@ Expect Syntax Error: "conformance/parser/ecmascript5/RegressionTests/parser50961 Expect Syntax Error: "conformance/parser/ecmascript5/RegressionTests/parser509693.ts" Expect Syntax Error: "conformance/parser/ecmascript5/RegressionTests/parser509698.ts" Expect Syntax Error: "conformance/parser/ecmascript5/RegressionTests/parser536727.ts" -Expect Syntax Error: "conformance/parser/ecmascript5/RegressionTests/parser579071.ts" Expect Syntax Error: "conformance/parser/ecmascript5/RegressionTests/parserTernaryAndCommaOperators1.ts" -Expect Syntax Error: "conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts" Expect Syntax Error: "conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression2.ts" Expect Syntax Error: "conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression3.ts" Expect Syntax Error: "conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression4.ts" @@ -3370,7 +3334,6 @@ Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclaration Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithImportHelpers.ts" Expect Syntax Error: "conformance/statements/breakStatements/invalidSwitchBreakStatement.ts" Expect Syntax Error: "conformance/statements/breakStatements/switchBreakStatements.ts" -Expect Syntax Error: "conformance/statements/for-inStatements/for-inStatements.ts" Expect Syntax Error: "conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts" Expect Syntax Error: "conformance/statements/for-inStatements/for-inStatementsDestructuring.ts" Expect Syntax Error: "conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts" @@ -3399,7 +3362,6 @@ Expect Syntax Error: "conformance/statements/for-ofStatements/ES5For-ofTypeCheck Expect Syntax Error: "conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts" Expect Syntax Error: "conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts" Expect Syntax Error: "conformance/statements/returnStatements/invalidReturnStatements.ts" -Expect Syntax Error: "conformance/statements/switchStatements/switchStatements.ts" Expect Syntax Error: "conformance/types/any/anyAsConstructor.ts" Expect Syntax Error: "conformance/types/any/anyAsGenericFunctionCall.ts" Expect Syntax Error: "conformance/types/any/assignAnyToEveryType.ts" @@ -3492,7 +3454,6 @@ Expect Syntax Error: "conformance/types/members/objectTypeWithConstructSignature Expect Syntax Error: "conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts" Expect Syntax Error: "conformance/types/members/objectTypeWithStringAndNumberIndexSignatureToAny.ts" Expect Syntax Error: "conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts" -Expect Syntax Error: "conformance/types/members/objectTypeWithStringNamedNumericProperty.ts" Expect Syntax Error: "conformance/types/members/typesWithPrivateConstructor.ts" Expect Syntax Error: "conformance/types/members/typesWithProtectedConstructor.ts" Expect Syntax Error: "conformance/types/members/typesWithPublicConstructor.ts" @@ -3707,7 +3668,6 @@ Expect Syntax Error: "conformance/types/typeRelationships/recursiveTypes/objectT Expect Syntax Error: "conformance/types/typeRelationships/recursiveTypes/recursiveTypeReferences1.ts" Expect Syntax Error: "conformance/types/typeRelationships/recursiveTypes/recursiveTypeReferences2.ts" Expect Syntax Error: "conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts" -Expect Syntax Error: "conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts" Expect Syntax Error: "conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts" Expect Syntax Error: "conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts" Expect Syntax Error: "conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts" @@ -3785,6 +3745,13 @@ Expect Syntax Error: "conformance/types/unknown/unknownControlFlow.ts" Expect Syntax Error: "conformance/types/unknown/unknownType1.ts" Expect Syntax Error: "conformance/types/unknown/unknownType2.ts" Expect Syntax Error: "conformance/types/witness/witness.ts" +Expect to Parse: "compiler/bestChoiceType.ts" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier Expect to Parse: "compiler/bom-utf16be.ts" × Invalid Character `￾` @@ -3792,6 +3759,20 @@ Expect to Parse: "compiler/bom-utf16be.ts" 1 │ ￾瘀愀爀 砀㴀㄀ 㬀ഀ਀ · ─ ╰──── +Expect to Parse: "compiler/castExpressionParentheses.ts" + + × Incomplete quantifier +Expect to Parse: "compiler/controlFlowPropertyDeclarations.ts" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier Expect to Parse: "compiler/elidedEmbeddedStatementsReplacedWithSemicolon.ts" × 'with' statements are not allowed @@ -3801,6 +3782,15 @@ Expect to Parse: "compiler/elidedEmbeddedStatementsReplacedWithSemicolon.ts" · ──── 24 │ const enum H {} ╰──── +Expect to Parse: "compiler/overloadResolutionOverNonCTLambdas.ts" + + × Incomplete quantifier +Expect to Parse: "compiler/regexMatchAll-esnext.ts" + + × Incomplete quantifier +Expect to Parse: "compiler/regexMatchAll.ts" + + × Incomplete quantifier Expect to Parse: "compiler/sourceMapValidationDecorators.ts" × Unexpected token @@ -3810,6 +3800,9 @@ Expect to Parse: "compiler/sourceMapValidationDecorators.ts" · ─── 19 │ } ╰──── +Expect to Parse: "compiler/stringMatchAll.ts" + + × Incomplete quantifier Expect to Parse: "compiler/withStatementInternalComments.ts" × 'with' statements are not allowed @@ -3867,6 +3860,20 @@ Expect to Parse: "conformance/classes/propertyMemberDeclarations/staticPropertyN · ───────── 291 │ prototype() {} // ok ╰──── +Expect to Parse: "conformance/controlFlow/controlFlowDoWhileStatement.ts" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "conformance/controlFlow/controlFlowForInStatement.ts" + + × Incomplete quantifier +Expect to Parse: "conformance/controlFlow/controlFlowIfStatement.ts" + + × Incomplete quantifier +Expect to Parse: "conformance/controlFlow/typeGuardsNestedAssignments.ts" + + × Incomplete quantifier Expect to Parse: "conformance/es2022/arbitraryModuleNamespaceIdentifiers/arbitraryModuleNamespaceIdentifiers_module.ts" × Expected `,` but found `string` @@ -3896,6 +3903,9 @@ Expect to Parse: "conformance/esDecorators/esDecorators-decoratorExpression.1.ts 14 │ ╰──── help: Try insert a semicolon here +Expect to Parse: "conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts" + + × Incomplete quantifier Expect to Parse: "conformance/externalModules/topLevelAwait.2.ts" × Cannot use `await` as an identifier in an async context @@ -3927,6 +3937,12 @@ Expect to Parse: "conformance/externalModules/topLevelAwait.3.ts" 4 │ declare class C extends await {} · ───── ╰──── +Expect to Parse: "conformance/parser/ecmascript5/Fuzz/parser768531.ts" + + × Incomplete quantifier +Expect to Parse: "conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression1.ts" + + × Invalid character class range Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" × Identifier `orbitol` has already been declared @@ -3939,6 +3955,28 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ╰── It can not be redeclared here 3 │ orbitol.toExponential() ╰──── +Expect to Parse: "conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts" + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "conformance/statements/throwStatements/throwStatements.ts" + + × Incomplete quantifier +Expect to Parse: "conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts" + + × Incomplete quantifier + + × Incomplete quantifier +Expect to Parse: "conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts" + + × Incomplete quantifier + + × Incomplete quantifier × A parameter property is only allowed in a constructor implementation. ╭─[compiler/ArrowFunctionExpression1.ts:1:10] @@ -5334,6 +5372,8 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 47 │ } ╰──── + × Incomplete quantifier + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[compiler/commonMissingSemicolons.ts:2:6] 1 │ async function myAsyncFunction1() {} @@ -5875,6 +5915,20 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 12 │ ╰──── + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + × Unexpected token ╭─[compiler/dontShowCompilerGeneratedMembers.ts:3:6] 2 │ x: number; @@ -6715,6 +6769,10 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ────── ╰──── + × Incomplete quantifier + + × Incomplete quantifier + × Expected `;` but found `)` ╭─[compiler/for.ts:29:6] 28 │ @@ -8806,6 +8864,10 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 1 │ if (true) { ╰──── + × Incomplete quantifier + + × Incomplete quantifier + × 'export' modifier cannot be used here. ╭─[compiler/privacyImportParseErrors.ts:326:9] 325 │ @@ -8890,6 +8952,80 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 22 │ ╰──── + × Lone quantifier brackets + + × Lone quantifier brackets + + × Lone quantifier brackets + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + × Unexpected flag a in regular expression literal ╭─[compiler/regularExpressionScanning.ts:3:12] 2 │ // Flags @@ -8978,6 +9114,84 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 4 │ // Pattern modifiers ╰──── + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + × The 'u' and 'v' regular expression flags cannot be enabled at the same time ╭─[compiler/regularExpressionScanning.ts:3:2] 2 │ // Flags @@ -8986,6 +9200,10 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 4 │ // Pattern modifiers ╰──── + × Invalid escape + + × Invalid group + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[compiler/regularExpressionWithNonBMPFlags.ts:7:63] 6 │ // See https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols @@ -10564,6 +10782,10 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ── ╰──── + × Incomplete quantifier + + × Incomplete quantifier + × Expected `;` but found `)` ╭─[compiler/unusedLocalsAndParameters.ts:83:14] 82 │ @@ -10573,6 +10795,16 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 84 │ z(x); ╰──── + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[compiler/validRegexp.ts:1:23] 1 │ var x = / [a - z /]$ / i; @@ -12675,6 +12907,10 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 164 │ get p2(): asserts this is string; ╰──── + × Incomplete quantifier + + × Incomplete quantifier + × Expected `,` but found `!` ╭─[conformance/controlFlow/definiteAssignmentAssertionsWithObjectShortHand.ts:2:16] 1 │ const a: string | undefined = 'ff'; @@ -13973,6 +14209,44 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 2 │ // Once this is supported, yield *must* be parenthesized. ╰──── + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + + × Invalid unicode escape + × Invalid escape sequence ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings07.ts:3:10] 2 │ // 1. Assert: 0 ≤ cp ≤ 0x10FFFF. @@ -16430,6 +16704,14 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 12 │ } ╰──── + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + + × Incomplete quantifier + × A rest parameter must be last in a parameter list ╭─[conformance/functions/functionOverloadErrorsSyntax.ts:9:25] 8 │ //Function overload signature with rest param followed by non-optional parameter @@ -18217,6 +18499,30 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 2 │ } ╰──── + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + + × Invalid escape + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[conformance/parser/ecmascript5/RealWorld/parserharness.ts:1430:16] 1429 │ // Regex for parsing options in the format "@Alpha: Value of any sort" @@ -18306,6 +18612,8 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ── ╰──── + × Unterminated group + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[conformance/parser/ecmascript5/RegressionTests/parser585151.ts:2:6] 1 │ class Foo2 { @@ -18338,6 +18646,8 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 5 │ } ╰──── + × Lone quantifier brackets + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[conformance/parser/ecmascript5/RegressionTests/parser645086_1.ts:1:13] 1 │ var v = /[]/]/ @@ -18345,6 +18655,8 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" ╰──── help: Try insert a semicolon here + × Lone quantifier brackets + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[conformance/parser/ecmascript5/RegressionTests/parser645086_2.ts:1:14] 1 │ var v = /[^]/]/ @@ -18352,6 +18664,18 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" ╰──── help: Try insert a semicolon here + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + + × Nothing to repeat + × Unexpected flag a in regular expression literal ╭─[conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity3.ts:1:17] 1 │ if (1) /regexp/a.foo(); @@ -20038,6 +20362,8 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 38 │ } ╰──── + × Incomplete quantifier + × Unexpected token ╭─[conformance/statements/for-ofStatements/ES5For-of12.ts:1:6] 1 │ for ([""] of [[""]]) { } @@ -20154,6 +20480,10 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" ╰──── help: Try insert a semicolon here + × Incomplete quantifier + + × Incomplete quantifier + × Unexpected token ╭─[conformance/statements/throwStatements/invalidThrowStatement.ts:1:6] 1 │ throw; @@ -20276,6 +20606,8 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 9 │ } ╰──── + × Incomplete quantifier + × A parameter property is only allowed in a constructor implementation. ╭─[conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts:3:14] 2 │ @@ -21354,3 +21686,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ── 2 │ type T2 = T2 // Error: circularly references ╰──── + + × Incomplete quantifier + + × Incomplete quantifier diff --git a/tasks/coverage/src/test262/mod.rs b/tasks/coverage/src/test262/mod.rs index cb13cfe755ae5..6732be195b553 100644 --- a/tasks/coverage/src/test262/mod.rs +++ b/tasks/coverage/src/test262/mod.rs @@ -33,9 +33,7 @@ impl Suite for Test262Suite { // ignore markdown files path.ends_with(".md") || // ignore fixtures - path.contains("_FIXTURE") || - // ignore regexp as we don't have a regexp parser for now - (path.contains("literals") && path.contains("regexp")) + path.contains("_FIXTURE") } fn save_test_cases(&mut self, cases: Vec) { @@ -104,13 +102,7 @@ impl Case for Test262Case { } fn skip_test_case(&self) -> bool { - [ - // Regex parser is required. See https://github.com/oxc-project/oxc/issues/385#issuecomment-1755566240 - "regexp-v-flag", - "regexp-unicode-property-escapes", - ] - .iter() - .any(|feature| self.meta.features.iter().any(|f| **f == **feature)) + false } // Unless configured otherwise (via the noStrict, onlyStrict, module, or raw flags), diff --git a/tasks/coverage/transformer_test262.snap b/tasks/coverage/transformer_test262.snap index b0ae557a16f05..fba59f84581f5 100644 --- a/tasks/coverage/transformer_test262.snap +++ b/tasks/coverage/transformer_test262.snap @@ -1,5 +1,5 @@ commit: a1587416 transformer_test262 Summary: -AST Parsed : 46406/46406 (100.00%) -Positive Passed: 46406/46406 (100.00%) +AST Parsed : 46466/46466 (100.00%) +Positive Passed: 46466/46466 (100.00%) From dfcf15b09ccf18133867dba0819d1a102107eb60 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Sun, 21 Jul 2024 09:43:19 +0900 Subject: [PATCH 072/143] Pass regexp parser options --- crates/oxc_parser/src/js/expression.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/oxc_parser/src/js/expression.rs b/crates/oxc_parser/src/js/expression.rs index 373bad63fa2ed..a70858f7e62e1 100644 --- a/crates/oxc_parser/src/js/expression.rs +++ b/crates/oxc_parser/src/js/expression.rs @@ -345,9 +345,14 @@ impl<'a> ParserImpl<'a> { let (pattern_end, flags) = self.read_regex(); let pattern_start = self.cur_token().start + 1; // +1 to exclude `/` let pattern = &self.source_text[pattern_start as usize..pattern_end as usize]; - if let Err(diagnostic) = - PatternParser::new(&self.ast.allocator, self.source_text, ParserOptions::default()) - .parse() + if let Err(diagnostic) = PatternParser::new( + self.ast.allocator, + self.source_text, + ParserOptions::default() + .with_span_offset(pattern_start) + .with_unicode_flags(flags.contains(RegExpFlags::U), flags.contains(RegExpFlags::V)), + ) + .parse() { self.error(diagnostic); } From d38f8bbfddf6664006125c7efef7d692c111cb94 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 22 Jul 2024 18:20:22 +0900 Subject: [PATCH 073/143] Rework with new AST --- crates/oxc_regexp_parser/src/ast.rs | 349 +++++---------- .../body_parser/parser/{atom.rs => _atom.rs} | 0 .../parser/{atom_class.rs => _atom_class.rs} | 0 .../{atom_escape.rs => _atom_escape.rs} | 0 .../src/body_parser/parser/_parse.rs | 403 ++++++++++++++++++ .../parser/{shared.rs => _shared.rs} | 0 .../src/body_parser/parser/mod.rs | 10 +- .../src/body_parser/parser/parse.rs | 369 +--------------- 8 files changed, 507 insertions(+), 624 deletions(-) rename crates/oxc_regexp_parser/src/body_parser/parser/{atom.rs => _atom.rs} (100%) rename crates/oxc_regexp_parser/src/body_parser/parser/{atom_class.rs => _atom_class.rs} (100%) rename crates/oxc_regexp_parser/src/body_parser/parser/{atom_escape.rs => _atom_escape.rs} (100%) create mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs rename crates/oxc_regexp_parser/src/body_parser/parser/{shared.rs => _shared.rs} (100%) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index fe522e6da68f6..1c390e8817744 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -1,9 +1,9 @@ use oxc_allocator::{Box, Vec}; use oxc_span::{Atom as SpanAtom, Span}; -// NOTE: Should keep all `enum` size == 16 +// NOTE: Should keep all `enum` size <= 16 -/// The root node. +/// The root. #[derive(Debug)] pub struct RegExpLiteral<'a> { pub span: Span, @@ -11,13 +11,6 @@ pub struct RegExpLiteral<'a> { pub flags: Flags, } -/// The pattern. -#[derive(Debug)] -pub struct Pattern<'a> { - pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, -} - /// The flags. #[derive(Debug)] pub struct Flags { @@ -32,331 +25,179 @@ pub struct Flags { pub unicode_sets: bool, } -/// The alternative. -/// E.g. `a|b` -#[derive(Debug)] -pub struct Alternative<'a> { - pub span: Span, - pub terms: Vec<'a, Term<'a>>, -} - -/// The type which includes all atom nodes. -#[derive(Debug)] -pub enum Term<'a> { - Assertion(Box<'a, Assertion<'a>>), - Atom(Box<'a, Atom<'a>>), - AtomWithQuantifier(Box<'a, AtomWithQuantifier<'a>>), -} - -/// The assertion. -#[derive(Debug)] -pub enum Assertion<'a> { - BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), - LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), -} - -/// The boundary assertion. -#[derive(Debug)] -pub enum BoundaryAssertion<'a> { - EdgeAssertion(Box<'a, EdgeAssertion>), - WordBoundaryAssertion(Box<'a, WordBoundaryAssertion>), -} - -/// The edge boundary assertion. -/// E.g. `^`, `$` -#[derive(Debug)] -pub struct EdgeAssertion { - pub span: Span, - pub kind: EdgeAssertionKind, -} - -#[derive(Debug)] -pub enum EdgeAssertionKind { - /// `^` - Start, - /// `$` - End, -} - -/// The word boundary assertion. -/// E.g. `\b`, `\B` +/// The pattern. #[derive(Debug)] -pub struct WordBoundaryAssertion { +pub struct Pattern<'a> { pub span: Span, - pub negate: bool, -} - -/// The lookaround assertion. -#[derive(Debug)] -pub enum LookaroundAssertion<'a> { - LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), - LookbehindAssertion(Box<'a, LookbehindAssertion<'a>>), + pub body: Disjunction<'a>, } -/// The lookahead assertion. -/// E.g. `(?=ab)`, `(?!ab)` #[derive(Debug)] -pub struct LookaheadAssertion<'a> { +pub struct Disjunction<'a> { pub span: Span, - pub negate: bool, - pub alternatives: Vec<'a, Alternative<'a>>, + pub body: Vec<'a, Alternative<'a>>, } -/// The lookbehind assertion. -/// E.g. `(?<=ab)`, `(? { +pub struct Alternative<'a> { pub span: Span, - pub negate: bool, - pub alternatives: Vec<'a, Alternative<'a>>, + pub body: Vec<'a, RootNode<'a>>, } -/// The type which includes all atom nodes that Quantifier node can have as children. #[derive(Debug)] -pub enum Atom<'a> { - Character(Box<'a, Character>), - CharacterSet(Box<'a, CharacterSet<'a>>), - Backreference(Box<'a, Backreference<'a>>), +pub enum RootNode<'a> { + Assertion(Assertion), + Quantifier(Box<'a, Quantifier<'a>>), + Value(Value), + Dot(Dot), + CharacterClassEscape(CharacterClassEscape), + UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), CharacterClass(Box<'a, CharacterClass<'a>>), CapturingGroup(Box<'a, CapturingGroup<'a>>), - NonCapturingGroup(Box<'a, NonCapturingGroup<'a>>), + LookaroundGroup(Box<'a, LookaroundGroup<'a>>), + IgnoreGroup(Box<'a, IgnoreGroup<'a>>), + IndexedReference(IndexedReference), + NamedReference(Box<'a, NamedReference<'a>>), } -/// The quantifier. -/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` #[derive(Debug)] -pub struct AtomWithQuantifier<'a> { +pub struct Assertion { pub span: Span, - pub min: usize, - pub max: Option, // `None` means `Infinity` - pub greedy: bool, - pub atom: Atom<'a>, -} - -/// The backreference. -/// E.g. `\1`, `\k` -#[derive(Debug)] -pub enum Backreference<'a> { - NormalBackreference(Box<'a, NormalBackreference>), - NamedBackreference(Box<'a, NamedBackreference<'a>>), + pub kind: AssertionKind, } - -/// E.g. `\1` #[derive(Debug)] -pub struct NormalBackreference { - pub span: Span, - pub r#ref: usize, // 1 for \1 -} - -/// E.g. `\k` -#[derive(Debug)] -pub struct NamedBackreference<'a> { - pub span: Span, - pub r#ref: SpanAtom<'a>, // name for \k -} - -/// The capturing group. -/// E.g. `(ab)`, `(?ab)` -#[derive(Debug)] -pub struct CapturingGroup<'a> { - pub span: Span, - pub name: Option>, - pub alternatives: Vec<'a, Alternative<'a>>, +pub enum AssertionKind { + Start, + End, + Boundary, + NotBoundary, } -/// The non-capturing group. -/// E.g. `(?:ab)` #[derive(Debug)] -pub struct NonCapturingGroup<'a> { +pub struct Quantifier<'a> { pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, + pub greedy: bool, + pub max: u32, + pub min: u32, + pub body: Vec<'a, RootNode<'a>>, } -/// The character. -/// This includes escape sequences which mean a character. -/// E.g. `a`, `あ`, `✿`, `\x65`, `\u0065`, `\u{65}`, `\/` #[derive(Debug)] -pub struct Character { +pub struct Value { pub span: Span, - pub value: u32, + pub kind: ValueKind, + pub code_point: u32, } - -/// The character set. #[derive(Debug)] -#[allow(clippy::enum_variant_names)] -pub enum CharacterSet<'a> { - AnyCharacterSet(Box<'a, AnyCharacterSet>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), +pub enum ValueKind { + ControlLetter, + HexadecimalEscape, + Null, + Octal, + SingleEscape, + Symbol, + UnicodeCodePointEscape, + UnicodeEscape, } -/// Any = `.` #[derive(Debug)] -pub struct AnyCharacterSet { +pub struct Dot { pub span: Span, } -/// The character class escape. -/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` #[derive(Debug)] -pub struct EscapeCharacterSet { +pub struct CharacterClassEscape { pub span: Span, - pub kind: EscapeCharacterSetKind, - pub negate: bool, -} - -#[derive(Debug)] -pub enum EscapeCharacterSetKind { - Digit, - Space, - Word, + pub kind: CharacterClassEscapeKind, } - -/// The unicode property escape. -/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` #[derive(Debug)] -pub enum UnicodePropertyCharacterSet<'a> { - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), - StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet<'a>>), +pub enum CharacterClassEscapeKind { + D, + NegativeD, + S, + NegativeS, + W, + NegativeW, } #[derive(Debug)] -pub struct CharacterUnicodePropertyCharacterSet<'a> { +pub struct UnicodePropertyEscape<'a> { pub span: Span, - pub key: SpanAtom<'a>, - pub value: Option>, - pub negate: bool, + pub negative: bool, + pub value: SpanAtom<'a>, } -/// The unicode property escape with property of strings. (`v` flag only) #[derive(Debug)] -pub struct StringsUnicodePropertyCharacterSet<'a> { +pub struct CharacterClass<'a> { pub span: Span, - pub key: SpanAtom<'a>, + pub negative: bool, + pub kind: CharacterClassKind, + pub body: Vec<'a, CharacterClassBody<'a>>, } - -/// The character class. -/// E.g. `[ab]`, `[^ab]` #[derive(Debug)] -pub enum CharacterClass<'a> { - ClassRangesCharacterClass(Box<'a, ClassRangesCharacterClass<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), +pub enum CharacterClassKind { + Union, + Intersection, + Subtraction, } - -/// The character class used in non Unicode sets mode (`v` flag). #[derive(Debug)] -pub struct ClassRangesCharacterClass<'a> { - pub span: Span, - pub negate: bool, - pub elements: Vec<'a, ClassRangesCharacterClassElement<'a>>, -} - -#[derive(Debug)] -pub enum ClassRangesCharacterClassElement<'a> { - Character(Box<'a, Character>), +pub enum CharacterClassBody<'a> { CharacterClassRange(Box<'a, CharacterClassRange>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), + CharacterClassEscape(CharacterClassEscape), + UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), + Value(Value), } - -/// The character class. -/// E.g. `[a-b]` #[derive(Debug)] pub struct CharacterClassRange { pub span: Span, - pub min: Character, - pub max: Character, + pub min: Value, + pub max: Value, } -// TODO: Lines below are not yet finalized. - -/// The character class used in Unicode sets mode (`v` flag). #[derive(Debug)] -pub struct UnicodeSetsCharacterClass<'a> { +pub struct CapturingGroup<'a> { pub span: Span, - pub negate: bool, - pub elements: Vec<'a, UnicodeSetsCharacterClassElement<'a>>, -} - -#[derive(Debug)] -pub enum UnicodeSetsCharacterClassElement<'a> { - Character(Box<'a, Character>), - CharacterClassRange(Box<'a, CharacterClassRange>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet<'a>>), - // Above are same as `ClassRangesCharacterClassElement` - StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet<'a>>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), + pub name: Option>, + pub body: Vec<'a, RootNode<'a>>, } -/// The character class string disjunction. -/// E.g. `\q{a|b}` #[derive(Debug)] -pub struct ClassStringDisjunction<'a> { +pub struct LookaroundGroup<'a> { pub span: Span, - pub alternatives: Vec<'a, StringAlternative<'a>>, + pub kind: LookAroundGroupKind, + pub body: Vec<'a, RootNode<'a>>, } - -/// Only used for `\q{alt}`([`ClassStringDisjunction`]). #[derive(Debug)] -pub struct StringAlternative<'a> { - pub span: Span, - pub elements: Vec<'a, Character>, +pub enum LookAroundGroupKind { + Lookahead, + NegativeLookahead, + Lookbehind, + NegativeLookbehind, } -/// The expression character class. -/// E.g. `[a--b]`, `[a&&b]`,`[^a--b]`, `[^a&&b]` #[derive(Debug)] -pub struct ExpressionCharacterClass<'a> { +pub struct IgnoreGroup<'a> { pub span: Span, - pub negate: bool, - pub expression: ExpressionCharacterClassExpr<'a>, -} - -#[derive(Debug)] -pub enum ExpressionCharacterClassExpr<'a> { - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), + pub enabling_modifiers: Option, + pub disabling_modifiers: Option, + pub body: Vec<'a, RootNode<'a>>, } - -/// The character class intersection. -/// E.g. `a&&b` #[derive(Debug)] -pub struct ClassIntersection<'a> { +pub struct ModifierFlags { pub span: Span, - pub left: ClassIntersectionLeft<'a>, - pub right: ClassSetOperand<'a>, -} - -#[derive(Debug)] -pub enum ClassIntersectionLeft<'a> { - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSetOperand(Box<'a, ClassSetOperand<'a>>), + pub ignore_case: bool, + pub sticky: bool, + pub multiline: bool, } -/// The character class subtraction. -/// E.g. `a--b` #[derive(Debug)] -pub struct ClassSubtraction<'a> { +pub struct IndexedReference { pub span: Span, - pub left: ClassSubtractionLeft<'a>, - pub right: ClassSetOperand<'a>, + pub index: u32, } #[derive(Debug)] -pub enum ClassSubtractionLeft<'a> { - ClassSetOperand(Box<'a, ClassSetOperand<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), -} - -#[derive(Debug)] -pub enum ClassSetOperand<'a> { - Character(Box<'a, Character>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), +pub struct NamedReference<'a> { + pub span: Span, + pub name: SpanAtom<'a>, } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_atom.rs similarity index 100% rename from crates/oxc_regexp_parser/src/body_parser/parser/atom.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/_atom.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_atom_class.rs similarity index 100% rename from crates/oxc_regexp_parser/src/body_parser/parser/atom_class.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/_atom_class.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_atom_escape.rs similarity index 100% rename from crates/oxc_regexp_parser/src/body_parser/parser/atom_escape.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/_atom_escape.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs new file mode 100644 index 0000000000000..2dad8be6ec944 --- /dev/null +++ b/crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs @@ -0,0 +1,403 @@ +use oxc_allocator::{Allocator, Box, Vec}; +use oxc_diagnostics::{OxcDiagnostic, Result}; + +use crate::{ + ast, + body_parser::{reader::Reader, state::State, unicode}, + options::ParserOptions, + span::SpanFactory, +}; + +pub struct PatternParser<'a> { + pub(super) allocator: &'a Allocator, + pub(super) source_text: &'a str, + pub(super) span_factory: SpanFactory, + pub(super) reader: Reader<'a>, + pub(super) state: State, +} + +impl<'a> PatternParser<'a> { + pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + let unicode_mode = options.unicode_flag || options.unicode_sets_flag; + let unicode_sets_mode = options.unicode_sets_flag; + + Self { + allocator, + source_text, + span_factory: SpanFactory::new(options.span_offset), + reader: Reader::new(source_text, unicode_mode), + state: State::new(unicode_mode, unicode_sets_mode), + } + } + + pub fn parse(&mut self) -> Result> { + if self.source_text.is_empty() { + return Err(OxcDiagnostic::error("Empty")); + } + + self.consume_pattern() + } + + // ``` + // Pattern[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + // + fn consume_pattern(&mut self) -> Result> { + // TODO: Define state, use later somewhere + // this._groupSpecifiers.clear(); + // TODO: Define state, use later here + // this._backreferenceNames.clear(); + + let span_start = self.reader.span_position(); + let disjunction = self.consume_disjunction()?; + + if self.reader.peek().is_some() { + if self.reader.eat(')') { + return Err(OxcDiagnostic::error("Unmatched ')'")); + } + if self.reader.eat('\\') { + return Err(OxcDiagnostic::error("'\\' at end of pattern")); + } + if self.reader.eat(']') || self.reader.eat('}') { + return Err(OxcDiagnostic::error("Lone quantifier brackets")); + } + return Err(OxcDiagnostic::error("Unexpected character")); + } + // TODO: Implement + // for (const name of this._backreferenceNames) { + // if (!this._groupSpecifiers.hasInPattern(name)) { + // this.raise("Invalid named capture referenced"); + // } + // } + + let pattern = ast::Pattern { + span: self.span_factory.create(span_start, self.reader.span_position()), + alternatives: disjunction, + }; + + // TODO: Implement, finalize backreferences with captured groups + // this.onPatternLeave(start, this.index); + + Ok(pattern) + } + + // ``` + // Disjunction[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + // + pub(super) fn consume_disjunction(&mut self) -> Result>> { + let mut disjunction = Vec::new_in(self.allocator); + + // TODO: Implement + // this._groupSpecifiers.enterDisjunction(); + + let mut i: usize = 0; + loop { + disjunction.push(self.consume_alternative(i)?); + + if self.reader.eat('|') { + i += 1; + continue; + } + + break; + } + + if self.reader.eat('{') { + return Err(OxcDiagnostic::error("Lone quantifier brackets")); + } + + // TODO: Implement + // this._groupSpecifiers.leaveDisjunction(); + + Ok(disjunction) + } + + // ``` + // Alternative[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // [empty] + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + // + fn consume_alternative(&mut self, i: usize) -> Result> { + // TODO: Implement + let _ = i; + // this._groupSpecifiers.enterAlternative(i); + + let span_start = self.reader.span_position(); + + let mut terms = Vec::new_in(self.allocator); + while let Some(term) = self.consume_term()? { + terms.push(term); + } + + Ok(ast::Alternative { + span: self.span_factory.create(span_start, self.reader.span_position()), + terms, + }) + } + + // ``` + // Term[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Assertion[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier + // ``` + // + fn consume_term(&mut self) -> Result>> { + if let Some(assertion) = self.consume_assertion()? { + return Ok(Some(ast::Term::Assertion(Box::new_in(assertion, self.allocator)))); + } + + let span_start = self.reader.span_position(); + match (self.consume_atom()?, self.consume_quantifier()?) { + (Some(atom), None) => Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))), + (Some(atom), Some(((min, max), greedy))) => { + return Ok(Some(ast::Term::AtomWithQuantifier(Box::new_in( + ast::AtomWithQuantifier { + span: self.span_factory.create(span_start, self.reader.span_position()), + min, + max, + greedy, + atom, + }, + self.allocator, + )))); + } + (None, Some(_)) => Err(OxcDiagnostic::error("Nothing to repeat")), + (None, None) => Ok(None), + } + } + + // Assertion[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // ^ + // $ + // \b + // \B + // (?= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?! Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?<= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (? + fn consume_assertion(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat('^') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::EdgeAssertion(Box::new_in( + ast::EdgeAssertion { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EdgeAssertionKind::Start, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.reader.eat('$') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::EdgeAssertion(Box::new_in( + ast::EdgeAssertion { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::EdgeAssertionKind::End, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.reader.eat2('\\', 'B') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( + ast::WordBoundaryAssertion { + span: self.span_factory.create(span_start, self.reader.span_position()), + negate: false, + }, + self.allocator, + )), + self.allocator, + )))); + } + if self.reader.eat2('\\', 'b') { + return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( + ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( + ast::WordBoundaryAssertion { + span: self.span_factory.create(span_start, self.reader.span_position()), + negate: true, + }, + self.allocator, + )), + self.allocator, + )))); + } + + // Lookaround + let checkpoint = self.reader.checkpoint(); + if self.reader.eat2('(', '?') { + let lookaround = { + let is_lookbehind = self.reader.eat('<'); + + if self.reader.eat('=') { + Some((false, is_lookbehind)) + } else if self.reader.eat('!') { + Some((true, is_lookbehind)) + } else { + None + } + }; + + if let Some((negate, is_lookbehind)) = lookaround { + let alternatives = self.consume_disjunction()?; + if !self.reader.eat(')') { + return Err(OxcDiagnostic::error("Unterminated group")); + } + + let span = self.span_factory.create(span_start, self.reader.span_position()); + let lookaround_assertion = if is_lookbehind { + ast::LookaroundAssertion::LookbehindAssertion(Box::new_in( + ast::LookbehindAssertion { span, negate, alternatives }, + self.allocator, + )) + } else { + ast::LookaroundAssertion::LookaheadAssertion(Box::new_in( + ast::LookaheadAssertion { span, negate, alternatives }, + self.allocator, + )) + }; + + return Ok(Some(ast::Assertion::LookaroundAssertion(Box::new_in( + lookaround_assertion, + self.allocator, + )))); + } + + self.reader.rewind(checkpoint); + } + + Ok(None) + } + + // ``` + // Atom[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // PatternCharacter + // . + // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] + // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] + // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ``` + // + fn consume_atom(&mut self) -> Result>> { + if let Some(atom) = self.consume_pattern_character() { + return Ok(Some(atom)); + } + if let Some(atom) = self.consume_dot() { + return Ok(Some(atom)); + } + if let Some(atom) = self.consume_atom_escape()? { + return Ok(Some(atom)); + } + if let Some(atom) = self.consume_character_class()? { + return Ok(Some(atom)); + } + // In the spec, (named) capturing group and non-capturing group are defined in that order. + // But if `?:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? + if let Some(atom) = self.consume_non_capturing_group()? { + return Ok(Some(atom)); + } + if let Some(atom) = self.consume_capturing_group()? { + return Ok(Some(atom)); + } + + Ok(None) + } + + // ``` + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // ``` + // + // ``` + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits } + // { DecimalDigits ,} + // { DecimalDigits , DecimalDigits } + // ``` + // + /// Returns: `((min, max?), greedy)` + #[allow(clippy::type_complexity)] + fn consume_quantifier(&mut self) -> Result), bool)>> { + let is_greedy = |reader: &mut Reader| !reader.eat('?'); + + if self.reader.eat('*') { + return Ok(Some(((0, None), is_greedy(&mut self.reader)))); + } + if self.reader.eat('+') { + return Ok(Some(((1, None), is_greedy(&mut self.reader)))); + } + if self.reader.eat('?') { + return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat('{') { + if let Some(min) = self.consume_decimal_digits() { + if self.reader.eat('}') { + return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat(',') { + if self.reader.eat('}') { + return Ok(Some(((min, None), is_greedy(&mut self.reader)))); + } + + if let Some(max) = self.consume_decimal_digits() { + if self.reader.eat('}') { + if max < min { + return Err(OxcDiagnostic::error( + "Numbers out of order in braced quantifier", + )); + } + + return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); + } + } + } + } + + return Err(OxcDiagnostic::error("Incomplete quantifier")); + } + + Ok(None) + } + + // ``` + // DecimalDigits[Sep] :: + // DecimalDigit + // DecimalDigits[?Sep] DecimalDigit + // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit + // ``` + // + fn consume_decimal_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } +} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/shared.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_shared.rs similarity index 100% rename from crates/oxc_regexp_parser/src/body_parser/parser/shared.rs rename to crates/oxc_regexp_parser/src/body_parser/parser/_shared.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index de59743ffb48a..69e97cfe47476 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -1,10 +1,6 @@ -mod atom; -mod atom_class; -mod atom_escape; /// Main entry point for `PatternParser` /// All others are just split files to `impl PatternParser` mod parse; -mod shared; pub use parse::PatternParser; @@ -97,7 +93,7 @@ mod test { let pattern = PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.alternatives[0].terms.len(), 15); + assert_eq!(pattern.body.body.len(), 15); let pattern = PatternParser::new( &allocator, @@ -106,7 +102,7 @@ mod test { ) .parse() .unwrap(); - assert_eq!(pattern.alternatives[0].terms.len(), 14); + assert_eq!(pattern.body.body.len(), 14); let pattern = PatternParser::new( &allocator, source_text, @@ -114,6 +110,6 @@ mod test { ) .parse() .unwrap(); - assert_eq!(pattern.alternatives[0].terms.len(), 14); + assert_eq!(pattern.body.body.len(), 14); } } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 2dad8be6ec944..162b3a443ea9c 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -35,369 +35,12 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Empty")); } - self.consume_pattern() - } - - // ``` - // Pattern[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // ``` - // - fn consume_pattern(&mut self) -> Result> { - // TODO: Define state, use later somewhere - // this._groupSpecifiers.clear(); - // TODO: Define state, use later here - // this._backreferenceNames.clear(); - - let span_start = self.reader.span_position(); - let disjunction = self.consume_disjunction()?; - - if self.reader.peek().is_some() { - if self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unmatched ')'")); - } - if self.reader.eat('\\') { - return Err(OxcDiagnostic::error("'\\' at end of pattern")); - } - if self.reader.eat(']') || self.reader.eat('}') { - return Err(OxcDiagnostic::error("Lone quantifier brackets")); - } - return Err(OxcDiagnostic::error("Unexpected character")); - } - // TODO: Implement - // for (const name of this._backreferenceNames) { - // if (!this._groupSpecifiers.hasInPattern(name)) { - // this.raise("Invalid named capture referenced"); - // } - // } - - let pattern = ast::Pattern { - span: self.span_factory.create(span_start, self.reader.span_position()), - alternatives: disjunction, - }; - - // TODO: Implement, finalize backreferences with captured groups - // this.onPatternLeave(start, this.index); - - Ok(pattern) - } - - // ``` - // Disjunction[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // ``` - // - pub(super) fn consume_disjunction(&mut self) -> Result>> { - let mut disjunction = Vec::new_in(self.allocator); - - // TODO: Implement - // this._groupSpecifiers.enterDisjunction(); - - let mut i: usize = 0; - loop { - disjunction.push(self.consume_alternative(i)?); - - if self.reader.eat('|') { - i += 1; - continue; - } - - break; - } - - if self.reader.eat('{') { - return Err(OxcDiagnostic::error("Lone quantifier brackets")); - } - - // TODO: Implement - // this._groupSpecifiers.leaveDisjunction(); - - Ok(disjunction) - } - - // ``` - // Alternative[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // [empty] - // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // ``` - // - fn consume_alternative(&mut self, i: usize) -> Result> { - // TODO: Implement - let _ = i; - // this._groupSpecifiers.enterAlternative(i); - - let span_start = self.reader.span_position(); - - let mut terms = Vec::new_in(self.allocator); - while let Some(term) = self.consume_term()? { - terms.push(term); - } - - Ok(ast::Alternative { - span: self.span_factory.create(span_start, self.reader.span_position()), - terms, + Ok(ast::Pattern { + span: self.span_factory.create(0, self.source_text.len()), + body: ast::Disjunction { + span: self.span_factory.create(0, self.source_text.len()), + body: Vec::new_in(self.allocator), + }, }) } - - // ``` - // Term[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // Assertion[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier - // ``` - // - fn consume_term(&mut self) -> Result>> { - if let Some(assertion) = self.consume_assertion()? { - return Ok(Some(ast::Term::Assertion(Box::new_in(assertion, self.allocator)))); - } - - let span_start = self.reader.span_position(); - match (self.consume_atom()?, self.consume_quantifier()?) { - (Some(atom), None) => Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))), - (Some(atom), Some(((min, max), greedy))) => { - return Ok(Some(ast::Term::AtomWithQuantifier(Box::new_in( - ast::AtomWithQuantifier { - span: self.span_factory.create(span_start, self.reader.span_position()), - min, - max, - greedy, - atom, - }, - self.allocator, - )))); - } - (None, Some(_)) => Err(OxcDiagnostic::error("Nothing to repeat")), - (None, None) => Ok(None), - } - } - - // Assertion[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // ^ - // $ - // \b - // \B - // (?= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (?! Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (?<= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (? - fn consume_assertion(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if self.reader.eat('^') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::EdgeAssertion(Box::new_in( - ast::EdgeAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EdgeAssertionKind::Start, - }, - self.allocator, - )), - self.allocator, - )))); - } - if self.reader.eat('$') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::EdgeAssertion(Box::new_in( - ast::EdgeAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EdgeAssertionKind::End, - }, - self.allocator, - )), - self.allocator, - )))); - } - if self.reader.eat2('\\', 'B') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( - ast::WordBoundaryAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate: false, - }, - self.allocator, - )), - self.allocator, - )))); - } - if self.reader.eat2('\\', 'b') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( - ast::WordBoundaryAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate: true, - }, - self.allocator, - )), - self.allocator, - )))); - } - - // Lookaround - let checkpoint = self.reader.checkpoint(); - if self.reader.eat2('(', '?') { - let lookaround = { - let is_lookbehind = self.reader.eat('<'); - - if self.reader.eat('=') { - Some((false, is_lookbehind)) - } else if self.reader.eat('!') { - Some((true, is_lookbehind)) - } else { - None - } - }; - - if let Some((negate, is_lookbehind)) = lookaround { - let alternatives = self.consume_disjunction()?; - if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated group")); - } - - let span = self.span_factory.create(span_start, self.reader.span_position()); - let lookaround_assertion = if is_lookbehind { - ast::LookaroundAssertion::LookbehindAssertion(Box::new_in( - ast::LookbehindAssertion { span, negate, alternatives }, - self.allocator, - )) - } else { - ast::LookaroundAssertion::LookaheadAssertion(Box::new_in( - ast::LookaheadAssertion { span, negate, alternatives }, - self.allocator, - )) - }; - - return Ok(Some(ast::Assertion::LookaroundAssertion(Box::new_in( - lookaround_assertion, - self.allocator, - )))); - } - - self.reader.rewind(checkpoint); - } - - Ok(None) - } - - // ``` - // Atom[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // PatternCharacter - // . - // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] - // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] - // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // ``` - // - fn consume_atom(&mut self) -> Result>> { - if let Some(atom) = self.consume_pattern_character() { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_dot() { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_atom_escape()? { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_character_class()? { - return Ok(Some(atom)); - } - // In the spec, (named) capturing group and non-capturing group are defined in that order. - // But if `?:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? - if let Some(atom) = self.consume_non_capturing_group()? { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_capturing_group()? { - return Ok(Some(atom)); - } - - Ok(None) - } - - // ``` - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // ``` - // - // ``` - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits ,} - // { DecimalDigits , DecimalDigits } - // ``` - // - /// Returns: `((min, max?), greedy)` - #[allow(clippy::type_complexity)] - fn consume_quantifier(&mut self) -> Result), bool)>> { - let is_greedy = |reader: &mut Reader| !reader.eat('?'); - - if self.reader.eat('*') { - return Ok(Some(((0, None), is_greedy(&mut self.reader)))); - } - if self.reader.eat('+') { - return Ok(Some(((1, None), is_greedy(&mut self.reader)))); - } - if self.reader.eat('?') { - return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); - } - - if self.reader.eat('{') { - if let Some(min) = self.consume_decimal_digits() { - if self.reader.eat('}') { - return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); - } - - if self.reader.eat(',') { - if self.reader.eat('}') { - return Ok(Some(((min, None), is_greedy(&mut self.reader)))); - } - - if let Some(max) = self.consume_decimal_digits() { - if self.reader.eat('}') { - if max < min { - return Err(OxcDiagnostic::error( - "Numbers out of order in braced quantifier", - )); - } - - return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); - } - } - } - } - - return Err(OxcDiagnostic::error("Incomplete quantifier")); - } - - Ok(None) - } - - // ``` - // DecimalDigits[Sep] :: - // DecimalDigit - // DecimalDigits[?Sep] DecimalDigit - // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit - // ``` - // - fn consume_decimal_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } } From fe165301f91b6b72ca7730c58149f5a3c4aca473 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 23 Jul 2024 14:50:34 +0900 Subject: [PATCH 074/143] Wip atom + ext_atom --- crates/oxc_regexp_parser/src/ast.rs | 14 +- .../src/body_parser/parser/parse.rs | 378 +++++++++++++++++- .../src/body_parser/state.rs | 11 +- 3 files changed, 381 insertions(+), 22 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 1c390e8817744..7a1ce5081f9b2 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -54,7 +54,7 @@ pub enum RootNode<'a> { UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), CharacterClass(Box<'a, CharacterClass<'a>>), CapturingGroup(Box<'a, CapturingGroup<'a>>), - LookaroundGroup(Box<'a, LookaroundGroup<'a>>), + LookAroundGroup(Box<'a, LookAroundGroup<'a>>), IgnoreGroup(Box<'a, IgnoreGroup<'a>>), IndexedReference(IndexedReference), NamedReference(Box<'a, NamedReference<'a>>), @@ -70,16 +70,16 @@ pub enum AssertionKind { Start, End, Boundary, - NotBoundary, + NegativeBoundary, } #[derive(Debug)] pub struct Quantifier<'a> { pub span: Span, + pub min: usize, + pub max: Option, pub greedy: bool, - pub max: u32, - pub min: u32, - pub body: Vec<'a, RootNode<'a>>, + pub body: RootNode<'a>, } #[derive(Debug)] @@ -162,10 +162,10 @@ pub struct CapturingGroup<'a> { } #[derive(Debug)] -pub struct LookaroundGroup<'a> { +pub struct LookAroundGroup<'a> { pub span: Span, pub kind: LookAroundGroupKind, - pub body: Vec<'a, RootNode<'a>>, + pub body: Disjunction<'a>, } #[derive(Debug)] pub enum LookAroundGroupKind { diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 162b3a443ea9c..25f1b47ee2664 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -31,16 +31,382 @@ impl<'a> PatternParser<'a> { } pub fn parse(&mut self) -> Result> { + // TODO: Use `(?:)` as default? if self.source_text.is_empty() { return Err(OxcDiagnostic::error("Empty")); } - Ok(ast::Pattern { - span: self.span_factory.create(0, self.source_text.len()), - body: ast::Disjunction { - span: self.span_factory.create(0, self.source_text.len()), - body: Vec::new_in(self.allocator), - }, + let result = self.parse_disjunction()?; + + // TODO: Revisit `should_reparse` + + Ok(ast::Pattern { span: self.span_factory.create(0, self.source_text.len()), body: result }) + } + + // ``` + // Disjunction[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + fn parse_disjunction(&mut self) -> Result> { + let span_start = self.reader.span_position(); + + let mut body = Vec::new_in(self.allocator); + loop { + body.push(self.parse_alternative()?); + + if !self.reader.eat('|') { + break; + } + } + + Ok(ast::Disjunction { + span: self.span_factory.create(span_start, self.reader.span_position()), + body, }) } + + // ``` + // Alternative[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // [empty] + // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // ``` + fn parse_alternative(&mut self) -> Result> { + let span_start = self.reader.span_position(); + + let mut body = Vec::new_in(self.allocator); + while let Some(term) = self.parse_term()? { + body.push(term); + } + + Ok(ast::Alternative { + span: self.span_factory.create(span_start, self.reader.span_position()), + body, + }) + } + + // ``` + // Term[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // [+UnicodeMode] Assertion[+UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // [+UnicodeMode] Atom[+UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier + // [+UnicodeMode] Atom[+UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] + // [~UnicodeMode] QuantifiableAssertion[?NamedCaptureGroups] Quantifier + // [~UnicodeMode] Assertion[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] + // [~UnicodeMode] ExtendedAtom[?NamedCaptureGroups] Quantifier + // [~UnicodeMode] ExtendedAtom[?NamedCaptureGroups] + // ``` + // (Annex B) + fn parse_term(&mut self) -> Result>> { + if self.reader.peek() == Some('|' as u32) || self.reader.peek() == Some(')' as u32) { + return Ok(None); + } + + // [+UnicodeMode] Assertion + // [+UnicodeMode] Atom Quantifier + // [+UnicodeMode] Atom + if self.state.unicode_mode { + if let Some(assertion) = self.parse_assertion()? { + return Ok(Some(assertion)); + } + + let span_start = self.reader.span_position(); + return match (self.parse_atom()?, self.consume_quantifier()?) { + (Some(atom), Some(((min, max), greedy))) => { + Ok(Some(ast::RootNode::Quantifier(Box::new_in( + ast::Quantifier { + span: self.span_factory.create(span_start, self.reader.span_position()), + greedy, + min, + max, + body: atom, + }, + self.allocator, + )))) + } + (Some(atom), None) => Ok(Some(atom)), + (None, Some(_)) => Err(OxcDiagnostic::error("Lone `Quantifier`, expected `Atom`")), + (None, None) => Ok(None), + }; + } + + // [~UnicodeMode] QuantifiableAssertion Quantifier + // [~UnicodeMode] Assertion + // [~UnicodeMode] ExtendedAtom Quantifier + // [~UnicodeMode] ExtendedAtom + let span_start = self.reader.span_position(); + if let Some(assertion) = self.parse_assertion()? { + // `QuantifiableAssertion` = (Negative)Lookahead: `(?=...)` or `(?!...)` + if let ast::RootNode::LookAroundGroup(look_around) = &assertion { + if matches!( + look_around.kind, + ast::LookAroundGroupKind::Lookahead + | ast::LookAroundGroupKind::NegativeLookahead + ) { + if let Some(((min, max), greedy)) = self.consume_quantifier()? { + return Ok(Some(ast::RootNode::Quantifier(Box::new_in( + ast::Quantifier { + span: self + .span_factory + .create(span_start, self.reader.span_position()), + greedy, + min, + max, + body: assertion, + }, + self.allocator, + )))); + } + } + } + + return Ok(Some(assertion)); + } + + match (self.parse_extended_atom()?, self.consume_quantifier()?) { + (Some(atom), Some(((min, max), greedy))) => { + Ok(Some(ast::RootNode::Quantifier(Box::new_in( + ast::Quantifier { + span: self.span_factory.create(span_start, self.reader.span_position()), + min, + max, + greedy, + body: atom, + }, + self.allocator, + )))) + } + (Some(atom), None) => Ok(Some(atom)), + (None, Some(_)) => { + Err(OxcDiagnostic::error("Lone `Quantifier`, expected `ExtendedAtom`")) + } + (None, None) => Ok(None), + } + } + + // ``` + // Assertion[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // ^ + // $ + // \b + // \B + // [+UnicodeMode] (?= Disjunction[+UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // [+UnicodeMode] (?! Disjunction[+UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // [~UnicodeMode] QuantifiableAssertion[?NamedCaptureGroups] + // (?<= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (? Result>> { + let span_start = self.reader.span_position(); + + let kind = if self.reader.eat('^') { + Some(ast::AssertionKind::Start) + } else if self.reader.eat('$') { + Some(ast::AssertionKind::End) + } else if self.reader.eat2('\\', 'b') { + Some(ast::AssertionKind::Boundary) + } else if self.reader.eat2('\\', 'B') { + Some(ast::AssertionKind::NegativeBoundary) + } else { + None + }; + + if let Some(kind) = kind { + return Ok(Some(ast::RootNode::Assertion(ast::Assertion { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind, + }))); + } + + let kind = if self.reader.eat3('(', '?', '=') { + Some(ast::LookAroundGroupKind::Lookahead) + } else if self.reader.eat3('(', '?', '!') { + Some(ast::LookAroundGroupKind::NegativeLookahead) + } else if self.reader.eat3('(', '<', '=') { + Some(ast::LookAroundGroupKind::Lookbehind) + } else if self.reader.eat3('(', '<', '!') { + Some(ast::LookAroundGroupKind::NegativeLookbehind) + } else { + None + }; + + if let Some(kind) = kind { + let disjunction = self.parse_disjunction()?; + + if !self.reader.eat(')') { + return Err(OxcDiagnostic::error("Unterminated lookaround group")); + } + + return Ok(Some(ast::RootNode::LookAroundGroup(Box::new_in( + ast::LookAroundGroup { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind, + body: disjunction, + }, + self.allocator, + )))); + } + + Ok(None) + } + + // ``` + // Atom[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: + // PatternCharacter + // . + // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] + // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] + // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ``` + fn parse_atom(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if let Some(cp) = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp)) { + self.reader.advance(); + + return Ok(Some(ast::RootNode::Value(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::Symbol, + code_point: cp, + }))); + } + + if self.reader.eat('.') { + return Ok(Some(ast::RootNode::Dot(ast::Dot { + span: self.span_factory.create(span_start, self.reader.span_position()), + }))); + } + + // TODO: \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] + // TODO: CharacterClass[?UnicodeMode, ?UnicodeSetsMode] + // TODO: ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // TODO: (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + + if self.reader.eat('👻') { + return Err(OxcDiagnostic::error("WIP...")); + } + Ok(None) + } + + // ``` + // ExtendedAtom[NamedCaptureGroups] :: + // . + // \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] + // \ [lookahead = c] + // CharacterClass[~UnicodeMode, ~UnicodeSetsMode] + // ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // InvalidBracedQuantifier + // ExtendedPatternCharacter + // ``` + fn parse_extended_atom(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat('.') { + return Ok(Some(ast::RootNode::Dot(ast::Dot { + span: self.span_factory.create(span_start, self.reader.span_position()), + }))); + } + + // TODO: \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] + // TODO: \ [lookahead = c] + // TODO: CharacterClass[~UnicodeMode, ~UnicodeSetsMode] + // TODO: ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // TODO: (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // TODO: InvalidBracedQuantifier + // TODO: ExtendedPatternCharacter + + if self.reader.eat('👻') { + return Err(OxcDiagnostic::error("WIP...")); + } + Ok(None) + } + + // ``` + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits[~Sep] } + // { DecimalDigits[~Sep] ,} + // { DecimalDigits[~Sep] , DecimalDigits[~Sep] } + // ``` + /// Returns: ((min, max), greedy) + #[allow(clippy::type_complexity)] + fn consume_quantifier(&mut self) -> Result), bool)>> { + let is_greedy = |reader: &mut Reader| !reader.eat('?'); + + if self.reader.eat('*') { + return Ok(Some(((0, None), is_greedy(&mut self.reader)))); + } + if self.reader.eat('+') { + return Ok(Some(((1, None), is_greedy(&mut self.reader)))); + } + if self.reader.eat('?') { + return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat('{') { + if let Some(min) = self.consume_decimal_digits() { + if self.reader.eat('}') { + return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat(',') { + if self.reader.eat('}') { + return Ok(Some(((min, None), is_greedy(&mut self.reader)))); + } + + if let Some(max) = self.consume_decimal_digits() { + if self.reader.eat('}') { + if max < min { + return Err(OxcDiagnostic::error( + "Numbers out of order in braced quantifier", + )); + } + + return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); + } + } + } + } + + return Err(OxcDiagnostic::error("Incomplete quantifier")); + } + + Ok(None) + } + + // ``` + // DecimalDigits[Sep] :: + // DecimalDigit + // DecimalDigits[?Sep] DecimalDigit + // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit + // ``` + // ([Sep] is disabled for `QuantifierPrefix`) + fn consume_decimal_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } } diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index a6cc9885062f5..730a0dc41fcbd 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -1,17 +1,10 @@ pub struct State { - unicode_mode: bool, - unicode_sets_mode: bool, + pub unicode_mode: bool, + pub unicode_sets_mode: bool, } impl State { pub fn new(unicode_mode: bool, unicode_sets_mode: bool) -> Self { Self { unicode_mode, unicode_sets_mode } } - - pub fn is_unicode_mode(&self) -> bool { - self.unicode_mode - } - pub fn is_unicode_sets_mode(&self) -> bool { - self.unicode_sets_mode - } } From 06e9aec738090b1b2adc947df18e8a09de62c5d9 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 23 Jul 2024 22:02:30 +0900 Subject: [PATCH 075/143] Wip atom_escape --- crates/oxc_regexp_parser/src/ast.rs | 8 +- .../src/body_parser/parser/parse.rs | 631 +++++++++++++++++- 2 files changed, 608 insertions(+), 31 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 7a1ce5081f9b2..4bdc1a11bd346 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -86,18 +86,19 @@ pub struct Quantifier<'a> { pub struct Value { pub span: Span, pub kind: ValueKind, - pub code_point: u32, + pub value: u32, } #[derive(Debug)] pub enum ValueKind { ControlLetter, HexadecimalEscape, + Identifier, Null, Octal, SingleEscape, Symbol, - UnicodeCodePointEscape, UnicodeEscape, + UnicodeCodePointEscape, // TODO: Should distinguish from `UnicodeEscape`? } #[derive(Debug)] @@ -124,7 +125,8 @@ pub enum CharacterClassEscapeKind { pub struct UnicodePropertyEscape<'a> { pub span: Span, pub negative: bool, - pub value: SpanAtom<'a>, + pub name: SpanAtom<'a>, + pub value: Option>, } #[derive(Debug)] diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 25f1b47ee2664..9360a8cc9cce9 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -1,19 +1,20 @@ use oxc_allocator::{Allocator, Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; +use oxc_span::Atom as SpanAtom; use crate::{ ast, - body_parser::{reader::Reader, state::State, unicode}, + body_parser::{reader::Reader, state::State, unicode, unicode_property}, options::ParserOptions, span::SpanFactory, }; pub struct PatternParser<'a> { - pub(super) allocator: &'a Allocator, - pub(super) source_text: &'a str, - pub(super) span_factory: SpanFactory, - pub(super) reader: Reader<'a>, - pub(super) state: State, + allocator: &'a Allocator, + source_text: &'a str, + span_factory: SpanFactory, + reader: Reader<'a>, + state: State, } impl<'a> PatternParser<'a> { @@ -31,9 +32,9 @@ impl<'a> PatternParser<'a> { } pub fn parse(&mut self) -> Result> { - // TODO: Use `(?:)` as default? + // For `new RegExp("")` or `new RegExp()` (= empty) if self.source_text.is_empty() { - return Err(OxcDiagnostic::error("Empty")); + self.source_text = "(?:)"; } let result = self.parse_disjunction()?; @@ -97,10 +98,6 @@ impl<'a> PatternParser<'a> { // ``` // (Annex B) fn parse_term(&mut self) -> Result>> { - if self.reader.peek() == Some('|' as u32) || self.reader.peek() == Some(')' as u32) { - return Ok(None); - } - // [+UnicodeMode] Assertion // [+UnicodeMode] Atom Quantifier // [+UnicodeMode] Atom @@ -266,30 +263,38 @@ impl<'a> PatternParser<'a> { fn parse_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); + // `PatternCharacter` if let Some(cp) = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp)) { self.reader.advance(); return Ok(Some(ast::RootNode::Value(ast::Value { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::ValueKind::Symbol, - code_point: cp, + value: cp, }))); } + // `.` if self.reader.eat('.') { return Ok(Some(ast::RootNode::Dot(ast::Dot { span: self.span_factory.create(span_start, self.reader.span_position()), }))); } - // TODO: \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] - // TODO: CharacterClass[?UnicodeMode, ?UnicodeSetsMode] - // TODO: ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // TODO: (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - - if self.reader.eat('👻') { - return Err(OxcDiagnostic::error("WIP...")); + // `\ AtomEscape` + if self.reader.eat('\\') { + if let Some(atom_escape) = self.parse_atom_escape(span_start)? { + return Ok(Some(atom_escape)); + } } + + // `CharacterClass` + // TODO + // `( GroupSpecifieropt Disjunction )` + // TODO + // `(?: Disjunction )` + // TODO + Ok(None) } @@ -307,19 +312,27 @@ impl<'a> PatternParser<'a> { fn parse_extended_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); + // `.` if self.reader.eat('.') { return Ok(Some(ast::RootNode::Dot(ast::Dot { span: self.span_factory.create(span_start, self.reader.span_position()), }))); } - // TODO: \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] - // TODO: \ [lookahead = c] - // TODO: CharacterClass[~UnicodeMode, ~UnicodeSetsMode] - // TODO: ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) - // TODO: (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) - // TODO: InvalidBracedQuantifier - // TODO: ExtendedPatternCharacter + // `\ AtomEscape` + // TODO + // `\ [lookahead = c]` + // TODO + // `CharacterClass` + // TODO + // `( GroupSpecifieropt Disjunction )` + // TODO + // `(?: Disjunction )` + // TODO + // `InvalidBracedQuantifier` + // TODO + // `ExtendedPatternCharacter` + // TODO if self.reader.eat('👻') { return Err(OxcDiagnostic::error("WIP...")); @@ -392,7 +405,7 @@ impl<'a> PatternParser<'a> { // DecimalDigits[?Sep] DecimalDigit // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit // ``` - // ([Sep] is disabled for `QuantifierPrefix`) + // ([Sep] is disabled for `QuantifierPrefix`, skip it) fn consume_decimal_digits(&mut self) -> Option { let checkpoint = self.reader.checkpoint(); @@ -409,4 +422,566 @@ impl<'a> PatternParser<'a> { None } + + // ``` + // AtomEscape[UnicodeMode, NamedCaptureGroups] :: + // [+UnicodeMode] DecimalEscape + // [~UnicodeMode] DecimalEscape but only if the CapturingGroupNumber of DecimalEscape is ≤ CountLeftCapturingParensWithin(the Pattern containing DecimalEscape) + // CharacterClassEscape[?UnicodeMode] + // CharacterEscape[?UnicodeMode, ?NamedCaptureGroups] + // [+NamedCaptureGroups] k GroupName[?UnicodeMode] + // ``` + fn parse_atom_escape(&mut self, span_start: usize) -> Result>> { + // `DecimalEscape`: \1 means indexed reference + // TODO + + // `CharacterClassEscape`: \d, \p{...} + if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { + return Ok(Some(ast::RootNode::CharacterClassEscape(character_class_escape))); + } + if let Some(unicode_property_escape) = + self.parse_character_class_escape_unicode(span_start)? + { + return Ok(Some(ast::RootNode::UnicodePropertyEscape(Box::new_in( + unicode_property_escape, + self.allocator, + )))); + } + + // `CharacterEscape`: \n, \cM, \0, etc... + if let Some(character_escape) = self.parse_character_escape(span_start)? { + return Ok(Some(ast::RootNode::Value(character_escape))); + } + + // `k GroupName`: \k means named reference + if self.reader.eat('k') { + if let Some(name) = self.consume_group_name()? { + return Ok(Some(ast::RootNode::NamedReference(Box::new_in( + ast::NamedReference { + span: self.span_factory.create(span_start, self.reader.span_position()), + name, + }, + self.allocator, + )))); + } + + return Err(OxcDiagnostic::error("Invalid named reference")); + } + + Err(OxcDiagnostic::error("Invalid atom escape")) + } + + // ``` + // CharacterClassEscape :: + // d + // D + // s + // S + // w + // W + // ``` + fn parse_character_class_escape( + &mut self, + span_start: usize, + ) -> Option { + let kind = if self.reader.eat('d') { + ast::CharacterClassEscapeKind::D + } else if self.reader.eat('D') { + ast::CharacterClassEscapeKind::NegativeD + } else if self.reader.eat('s') { + ast::CharacterClassEscapeKind::S + } else if self.reader.eat('S') { + ast::CharacterClassEscapeKind::NegativeS + } else if self.reader.eat('w') { + ast::CharacterClassEscapeKind::W + } else if self.reader.eat('W') { + ast::CharacterClassEscapeKind::NegativeW + } else { + return None; + }; + + Some(ast::CharacterClassEscape { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind, + }) + } + // ``` + // CharacterClassEscape[UnicodeMode] :: + // [+UnicodeMode] p{ UnicodePropertyValueExpression } + // [+UnicodeMode] P{ UnicodePropertyValueExpression } + // ``` + fn parse_character_class_escape_unicode( + &mut self, + span_start: usize, + ) -> Result>> { + if !self.state.unicode_mode { + return Ok(None); + } + + let negative = if self.reader.eat('p') { + true + } else if self.reader.eat('P') { + false + } else { + return Ok(None); + }; + + if self.reader.eat('{') { + if let Some((name, value, is_strings_related)) = + self.consume_unicode_property_value_expression()? + { + if negative && is_strings_related { + return Err(OxcDiagnostic::error("Invalid property name")); + } + + if self.reader.eat('}') { + return Ok(Some(ast::UnicodePropertyEscape { + span: self.span_factory.create(span_start, self.reader.span_position()), + negative, + name, + value, + })); + } + } + } + + Err(OxcDiagnostic::error("Invalid property name")) + } + + // ``` + // UnicodePropertyValueExpression :: + // UnicodePropertyName = UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + // ``` + /// Returns: `(name, value, is_strings_related_unicode_property)` + fn consume_unicode_property_value_expression( + &mut self, + ) -> Result, Option>, bool)>> { + let checkpoint = self.reader.checkpoint(); + + // UnicodePropertyName=UnicodePropertyValue + if let Some(name) = self.consume_unicode_property_name() { + if self.reader.eat('=') { + if let Some(value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property(&name, &value) { + return Ok(Some((name, Some(value), false))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + } + } + self.reader.rewind(checkpoint); + + // LoneUnicodePropertyNameOrValue + if let Some(name_or_value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { + return Ok(Some(("General_Category".into(), Some(name_or_value), false))); + } + + if unicode_property::is_valid_lone_unicode_property(&name_or_value) { + return Ok(Some((name_or_value, None, false))); + } + + if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { + // Early errors: + // It is a Syntax Error + // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter + // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings + // - listed in the “Property name” column of Table 68. + if !self.state.unicode_sets_mode { + return Err(OxcDiagnostic::error("Syntax Error")); + } + + return Ok(Some((name_or_value, None, true))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + + Ok(None) + } + + fn consume_unicode_property_name(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode::is_unicode_property_name_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + } + + fn consume_unicode_property_value(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode::is_unicode_property_value_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + } + + // ``` + // CharacterEscape[UnicodeMode, NamedCaptureGroups] :: + // ControlEscape + // c AsciiLetter + // 0 [lookahead ∉ DecimalDigit] + // HexEscapeSequence + // RegExpUnicodeEscapeSequence[?UnicodeMode] + // [~UnicodeMode] LegacyOctalEscapeSequence + // IdentityEscape[?UnicodeMode, ?NamedCaptureGroups] + // ``` + // (Annex B) + fn parse_character_escape(&mut self, span_start: usize) -> Result> { + // e.g. \n + if let Some(cp) = self.reader.peek().and_then(unicode::map_control_escape) { + self.reader.advance(); + + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::SingleEscape, + value: cp, + })); + } + + // e.g. \cM + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('c') { + if let Some(cp) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { + self.reader.advance(); + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::ControlLetter, + value: cp, + })); + } + self.reader.rewind(checkpoint); + } + + // e.g. \0 + if self.reader.peek().map_or(false, |cp| cp == '0' as u32) + && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) + { + self.reader.advance(); + + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::Null, + value: 0x0000, + })); + } + + // e.g. \x41 + if self.reader.eat('x') { + if let Some(cp) = self.consume_fixed_hex_digits(2) { + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::HexadecimalEscape, + value: cp, + })); + } + + return Err(OxcDiagnostic::error("Invalid escape")); + } + + // e.g. \u{1f600} + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::UnicodeEscape, + value: cp, + })); + } + + // e.g. \18 + if !self.state.unicode_mode { + // TODO: consume_legacy_octal_escape_sequence + if let Some(cp) = None { + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::Octal, + value: cp, + })); + } + } + + // e.g. \. + if let Some(cp) = self.consume_identity_escape() { + return Ok(Some(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::Identifier, + value: cp, + })); + } + + Ok(None) + } + + // --- + + // ``` + // GroupName[UnicodeMode] :: + // < RegExpIdentifierName[?UnicodeMode] > + // ``` + fn consume_group_name(&mut self) -> Result>> { + if !self.reader.eat('<') { + return Ok(None); + } + + if let Some(group_name) = self.consume_reg_exp_idenfigier_name()? { + if self.reader.eat('>') { + return Ok(Some(group_name)); + } + } + + Err(OxcDiagnostic::error("Invalid capture group name")) + } + + // ``` + // RegExpIdentifierName[UnicodeMode] :: + // RegExpIdentifierStart[?UnicodeMode] + // RegExpIdentifierName[?UnicodeMode] RegExpIdentifierPart[?UnicodeMode] + // ``` + fn consume_reg_exp_idenfigier_name(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.consume_reg_exp_idenfigier_start()?.is_some() { + while self.consume_reg_exp_idenfigier_part()?.is_some() {} + + let span_end = self.reader.span_position(); + return Ok(Some(SpanAtom::from(&self.source_text[span_start..span_end]))); + } + + Ok(None) + } + + // ``` + // RegExpIdentifierStart[UnicodeMode] :: + // IdentifierStartChar + // \ RegExpUnicodeEscapeSequence[+UnicodeMode] + // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate + // ``` + fn consume_reg_exp_idenfigier_start(&mut self) -> Result> { + if let Some(cp) = self.reader.peek() { + if unicode::is_identifier_start_char(cp) { + self.reader.advance(); + return Ok(Some(cp)); + } + } + + if self.reader.eat('\\') { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + return Ok(Some(cp)); + } + } + + if !self.state.unicode_mode { + if let Some(lead_surrogate) = + self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if let Some(trail_surrogate) = + self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) + { + self.reader.advance(); + self.reader.advance(); + + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + + Ok(None) + } + + // ``` + // RegExpUnicodeEscapeSequence[UnicodeMode] :: + // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate + // [+UnicodeMode] u HexLeadSurrogate + // [+UnicodeMode] u HexTrailSurrogate + // [+UnicodeMode] u HexNonSurrogate + // [~UnicodeMode] u Hex4Digits + // [+UnicodeMode] u{ CodePoint } + // ``` + fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { + if !self.reader.eat('u') { + return Ok(None); + } + + if self.state.unicode_mode { + let checkpoint = self.reader.checkpoint(); + + // HexLeadSurrogate + HexTrailSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if self.reader.eat2('\\', 'u') { + if let Some(trail_surrogate) = self + .consume_fixed_hex_digits(4) + .filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + self.reader.rewind(checkpoint); + + // HexLeadSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + return Ok(Some(lead_surrogate)); + } + self.reader.rewind(checkpoint); + + // HexTrailSurrogate + if let Some(trail_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(trail_surrogate)); + } + self.reader.rewind(checkpoint); + } + + // HexNonSurrogate and Hex4Digits are the same + if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { + return Ok(Some(hex_digits)); + } + + // {CodePoint} + if self.state.unicode_mode { + let checkpoint = self.reader.checkpoint(); + + if self.reader.eat('{') { + if let Some(hex_digits) = + self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) + { + if self.reader.eat('}') { + return Ok(Some(hex_digits)); + } + } + } + self.reader.rewind(checkpoint); + } + + Err(OxcDiagnostic::error("Invalid unicode escape")) + } + + // ``` + // RegExpIdentifierPart[UnicodeMode] :: + // IdentifierPartChar + // \ RegExpUnicodeEscapeSequence[+UnicodeMode] + // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate + // ``` + fn consume_reg_exp_idenfigier_part(&mut self) -> Result> { + if let Some(cp) = self.reader.peek() { + if unicode::is_identifier_part_char(cp) { + self.reader.advance(); + return Ok(Some(cp)); + } + } + + if self.reader.eat('\\') { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + return Ok(Some(cp)); + } + } + + if !self.state.unicode_mode { + if let Some(lead_surrogate) = + self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if let Some(trail_surrogate) = + self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) + { + self.reader.advance(); + self.reader.advance(); + + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } + } + } + + Ok(None) + } + + // ``` + // IdentityEscape[UnicodeMode] :: + // [+UnicodeMode] SyntaxCharacter + // [+UnicodeMode] / + // [~UnicodeMode] SourceCharacter but not UnicodeIDContinue + // ``` + fn consume_identity_escape(&mut self) -> Option { + let cp = self.reader.peek()?; + + if self.state.unicode_mode { + if unicode::is_syntax_character(cp) { + self.reader.advance(); + return Some(cp); + } + if cp == '/' as u32 { + self.reader.advance(); + return Some(cp); + } + } + + if !self.state.unicode_mode && !unicode::is_id_continue(cp) { + self.reader.advance(); + return Some(cp); + } + + None + } + + fn consume_hex_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { + value = (16 * value) + hex; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } + + fn consume_fixed_hex_digits(&mut self, len: usize) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + for _ in 0..len { + let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) else { + self.reader.rewind(checkpoint); + return None; + }; + + value = (16 * value) + hex; + self.reader.advance(); + } + + Some(value) + } } From 3149635f99382d39db3b052c5c2e92da474d29cf Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 10:00:10 +0900 Subject: [PATCH 076/143] Format --- .../src/body_parser/parser/parse.rs | 221 +++++++++--------- 1 file changed, 111 insertions(+), 110 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 9360a8cc9cce9..c3e2457cbea3b 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -393,36 +393,12 @@ impl<'a> PatternParser<'a> { } } - return Err(OxcDiagnostic::error("Incomplete quantifier")); + return Err(OxcDiagnostic::error("Unterminated quantifier")); } Ok(None) } - // ``` - // DecimalDigits[Sep] :: - // DecimalDigit - // DecimalDigits[?Sep] DecimalDigit - // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit - // ``` - // ([Sep] is disabled for `QuantifierPrefix`, skip it) - fn consume_decimal_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } - // ``` // AtomEscape[UnicodeMode, NamedCaptureGroups] :: // [+UnicodeMode] DecimalEscape @@ -545,91 +521,7 @@ impl<'a> PatternParser<'a> { } } - Err(OxcDiagnostic::error("Invalid property name")) - } - - // ``` - // UnicodePropertyValueExpression :: - // UnicodePropertyName = UnicodePropertyValue - // LoneUnicodePropertyNameOrValue - // ``` - /// Returns: `(name, value, is_strings_related_unicode_property)` - fn consume_unicode_property_value_expression( - &mut self, - ) -> Result, Option>, bool)>> { - let checkpoint = self.reader.checkpoint(); - - // UnicodePropertyName=UnicodePropertyValue - if let Some(name) = self.consume_unicode_property_name() { - if self.reader.eat('=') { - if let Some(value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property(&name, &value) { - return Ok(Some((name, Some(value), false))); - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - } - } - self.reader.rewind(checkpoint); - - // LoneUnicodePropertyNameOrValue - if let Some(name_or_value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { - return Ok(Some(("General_Category".into(), Some(name_or_value), false))); - } - - if unicode_property::is_valid_lone_unicode_property(&name_or_value) { - return Ok(Some((name_or_value, None, false))); - } - - if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { - // Early errors: - // It is a Syntax Error - // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter - // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings - // - listed in the “Property name” column of Table 68. - if !self.state.unicode_sets_mode { - return Err(OxcDiagnostic::error("Syntax Error")); - } - - return Ok(Some((name_or_value, None, true))); - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - - Ok(None) - } - - fn consume_unicode_property_name(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let checkpoint = self.reader.checkpoint(); - while unicode::is_unicode_property_name_character(self.reader.peek()?) { - self.reader.advance(); - } - - if checkpoint == self.reader.checkpoint() { - return None; - } - - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) - } - - fn consume_unicode_property_value(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let checkpoint = self.reader.checkpoint(); - while unicode::is_unicode_property_value_character(self.reader.peek()?) { - self.reader.advance(); - } - - if checkpoint == self.reader.checkpoint() { - return None; - } - - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + Err(OxcDiagnostic::error("Unterminated unicode property escape")) } // ``` @@ -730,6 +622,114 @@ impl<'a> PatternParser<'a> { // --- + // ``` + // DecimalDigits[Sep] :: + // DecimalDigit + // DecimalDigits[?Sep] DecimalDigit + // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit + // ``` + // ([Sep] is disabled for `QuantifierPrefix`, skip it) + fn consume_decimal_digits(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + + let mut value = 0; + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { + // `- '0' as u32`: convert code point to digit + value = (10 * value) + (cp - '0' as u32) as usize; + self.reader.advance(); + } + + if self.reader.checkpoint() != checkpoint { + return Some(value); + } + + None + } + + // ``` + // UnicodePropertyValueExpression :: + // UnicodePropertyName = UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + // ``` + /// Returns: `(name, value, is_strings_related_unicode_property)` + fn consume_unicode_property_value_expression( + &mut self, + ) -> Result, Option>, bool)>> { + let checkpoint = self.reader.checkpoint(); + + // UnicodePropertyName=UnicodePropertyValue + if let Some(name) = self.consume_unicode_property_name() { + if self.reader.eat('=') { + if let Some(value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property(&name, &value) { + return Ok(Some((name, Some(value), false))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + } + } + self.reader.rewind(checkpoint); + + // LoneUnicodePropertyNameOrValue + if let Some(name_or_value) = self.consume_unicode_property_value() { + if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { + return Ok(Some(("General_Category".into(), Some(name_or_value), false))); + } + + if unicode_property::is_valid_lone_unicode_property(&name_or_value) { + return Ok(Some((name_or_value, None, false))); + } + + if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { + // Early errors: + // It is a Syntax Error + // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter + // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings + // - listed in the “Property name” column of Table 68. + if !self.state.unicode_sets_mode { + return Err(OxcDiagnostic::error("Syntax Error")); + } + + return Ok(Some((name_or_value, None, true))); + } + + return Err(OxcDiagnostic::error("Invalid property name")); + } + + Ok(None) + } + + fn consume_unicode_property_name(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode::is_unicode_property_name_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + } + + fn consume_unicode_property_value(&mut self) -> Option> { + let span_start = self.reader.span_position(); + + let checkpoint = self.reader.checkpoint(); + while unicode::is_unicode_property_value_character(self.reader.peek()?) { + self.reader.advance(); + } + + if checkpoint == self.reader.checkpoint() { + return None; + } + + Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + } + // ``` // GroupName[UnicodeMode] :: // < RegExpIdentifierName[?UnicodeMode] > @@ -938,6 +938,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Some(cp); } + if cp == '/' as u32 { self.reader.advance(); return Some(cp); From 8205b750cef425676449be51dc078a4b42e22913 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 11:30:21 +0900 Subject: [PATCH 077/143] Parse legacy octal sequence --- .../src/body_parser/parser/parse.rs | 56 +++++++++++++++++-- .../src/body_parser/unicode.rs | 6 +- 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index c3e2457cbea3b..5eb8531fa9efe 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -563,7 +563,7 @@ impl<'a> PatternParser<'a> { // e.g. \0 if self.reader.peek().map_or(false, |cp| cp == '0' as u32) - && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) + && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digit(cp)) { self.reader.advance(); @@ -598,8 +598,7 @@ impl<'a> PatternParser<'a> { // e.g. \18 if !self.state.unicode_mode { - // TODO: consume_legacy_octal_escape_sequence - if let Some(cp) = None { + if let Some(cp) = self.consume_legacy_octal_escape_sequence() { return Ok(Some(ast::Value { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::ValueKind::Octal, @@ -633,7 +632,7 @@ impl<'a> PatternParser<'a> { let checkpoint = self.reader.checkpoint(); let mut value = 0; - while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { + while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digit(cp)) { // `- '0' as u32`: convert code point to digit value = (10 * value) + (cp - '0' as u32) as usize; self.reader.advance(); @@ -924,6 +923,55 @@ impl<'a> PatternParser<'a> { Ok(None) } + // ``` + // LegacyOctalEscapeSequence :: + // 0 [lookahead ∈ { 8, 9 }] + // NonZeroOctalDigit [lookahead ∉ OctalDigit] + // ZeroToThree OctalDigit [lookahead ∉ OctalDigit] + // FourToSeven OctalDigit + // ZeroToThree OctalDigit OctalDigit + // ``` + fn consume_legacy_octal_escape_sequence(&mut self) -> Option { + if let Some(first) = self.consume_octal_digit() { + // 0 [lookahead ∈ { 8, 9 }] + if first == 0 + && self.reader.peek().filter(|&cp| cp == '8' as u32 || cp == '9' as u32).is_some() + { + return Some(first); + } + + if let Some(second) = self.consume_octal_digit() { + if let Some(third) = self.consume_octal_digit() { + // ZeroToThree OctalDigit OctalDigit + if first <= 3 { + return Some(first * 64 + second * 8 + third); + } + } + + // ZeroToThree OctalDigit [lookahead ∉ OctalDigit] + // FourToSeven OctalDigit + return Some(first * 8 + second); + } + + // NonZeroOctalDigit [lookahead ∉ OctalDigit] + return Some(first); + } + + None + } + + fn consume_octal_digit(&mut self) -> Option { + let cp = self.reader.peek()?; + + if unicode::is_octal_digit(cp) { + self.reader.advance(); + // `- '0' as u32`: convert code point to digit + return Some(cp - '0' as u32); + } + + None + } + // ``` // IdentityEscape[UnicodeMode] :: // [+UnicodeMode] SyntaxCharacter diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index d4f0c5506b076..9755256cfb189 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -7,12 +7,12 @@ pub fn is_syntax_character(cp: u32) -> bool { }) } -pub fn is_decimal_digits(cp: u32) -> bool { +pub fn is_decimal_digit(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_digit()) } -pub fn is_non_zero_digit(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c != '0' && c.is_ascii_digit()) +pub fn is_octal_digit(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| c.is_ascii_digit() && c < '8') } pub fn is_id_continue(cp: u32) -> bool { From fe635127f2e175bf8bd733257785f9b5b3d80000 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 13:25:33 +0900 Subject: [PATCH 078/143] Parse decimal escape --- crates/oxc_regexp_parser/src/ast.rs | 4 +-- .../src/body_parser/parser/parse.rs | 32 ++++++++++++++++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 4bdc1a11bd346..43f537d128630 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -76,8 +76,8 @@ pub enum AssertionKind { #[derive(Debug)] pub struct Quantifier<'a> { pub span: Span, - pub min: usize, - pub max: Option, + pub min: u32, + pub max: Option, pub greedy: bool, pub body: RootNode<'a>, } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 5eb8531fa9efe..7feabe7c2708d 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -355,7 +355,7 @@ impl<'a> PatternParser<'a> { // ``` /// Returns: ((min, max), greedy) #[allow(clippy::type_complexity)] - fn consume_quantifier(&mut self) -> Result), bool)>> { + fn consume_quantifier(&mut self) -> Result), bool)>> { let is_greedy = |reader: &mut Reader| !reader.eat('?'); if self.reader.eat('*') { @@ -409,7 +409,14 @@ impl<'a> PatternParser<'a> { // ``` fn parse_atom_escape(&mut self, span_start: usize) -> Result>> { // `DecimalEscape`: \1 means indexed reference - // TODO + if let Some(index) = self.consume_decimal_escape() { + // TODO: Check `CapturingGroupNumber` <= `CountLeftCapturingParensWithin` + + return Ok(Some(ast::RootNode::IndexedReference(ast::IndexedReference { + span: self.span_factory.create(span_start, self.reader.span_position()), + index, + }))); + } // `CharacterClassEscape`: \d, \p{...} if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { @@ -447,6 +454,21 @@ impl<'a> PatternParser<'a> { Err(OxcDiagnostic::error("Invalid atom escape")) } + // ``` + // DecimalEscape :: + // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] + // ``` + fn consume_decimal_escape(&mut self) -> Option { + if let Some(index) = self.consume_decimal_digits() { + // \0 is `CharacterEscape`, not `DecimalEscape` + if index != 0 { + return Some(index); + } + } + + None + } + // ``` // CharacterClassEscape :: // d @@ -627,14 +649,14 @@ impl<'a> PatternParser<'a> { // DecimalDigits[?Sep] DecimalDigit // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit // ``` - // ([Sep] is disabled for `QuantifierPrefix`, skip it) - fn consume_decimal_digits(&mut self) -> Option { + // ([Sep] is disabled for `QuantifierPrefix` and `DecimalEscape` skip it) + fn consume_decimal_digits(&mut self) -> Option { let checkpoint = self.reader.checkpoint(); let mut value = 0; while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digit(cp)) { // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; + value = (10 * value) + (cp - '0' as u32); self.reader.advance(); } From e532774c2a2ee2d4bb381ffc95d90f8887f1aec8 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 14:17:22 +0900 Subject: [PATCH 079/143] Parse group --- crates/oxc_regexp_parser/src/ast.rs | 4 +- .../src/body_parser/parser/parse.rs | 91 +++++++++++++++++-- 2 files changed, 83 insertions(+), 12 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 43f537d128630..08f8043154d28 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -160,7 +160,7 @@ pub struct CharacterClassRange { pub struct CapturingGroup<'a> { pub span: Span, pub name: Option>, - pub body: Vec<'a, RootNode<'a>>, + pub body: Disjunction<'a>, } #[derive(Debug)] @@ -182,7 +182,7 @@ pub struct IgnoreGroup<'a> { pub span: Span, pub enabling_modifiers: Option, pub disabling_modifiers: Option, - pub body: Vec<'a, RootNode<'a>>, + pub body: Disjunction<'a>, } #[derive(Debug)] pub struct ModifierFlags { diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 7feabe7c2708d..5e2e43a8cb2a7 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -290,10 +290,20 @@ impl<'a> PatternParser<'a> { // `CharacterClass` // TODO - // `( GroupSpecifieropt Disjunction )` - // TODO - // `(?: Disjunction )` - // TODO + + // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + if let Some(ignore_group) = self.parse_ignore_group()? { + return Ok(Some(ast::RootNode::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); + } + + // `( GroupSpecifier Disjunction )` + // `( Disjunction )` + if let Some(capturing_group) = self.parse_capturing_group()? { + return Ok(Some(ast::RootNode::CapturingGroup(Box::new_in( + capturing_group, + self.allocator, + )))); + } Ok(None) } @@ -320,17 +330,11 @@ impl<'a> PatternParser<'a> { } // `\ AtomEscape` - // TODO // `\ [lookahead = c]` - // TODO // `CharacterClass` - // TODO // `( GroupSpecifieropt Disjunction )` - // TODO // `(?: Disjunction )` - // TODO // `InvalidBracedQuantifier` - // TODO // `ExtendedPatternCharacter` // TODO @@ -641,6 +645,73 @@ impl<'a> PatternParser<'a> { Ok(None) } + // ``` + // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // + // GroupSpecifier[UnicodeMode] :: + // ? GroupName[?UnicodeMode] + // ``` + fn parse_capturing_group(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat('(') { + // `GroupSpecifier` is optional + if self.reader.eat('?') { + if let Some(name) = self.consume_group_name()? { + let disjunction = self.parse_disjunction()?; + + if self.reader.eat(')') { + return Ok(Some(ast::CapturingGroup { + span: self.span_factory.create(span_start, self.reader.span_position()), + name: Some(name), + body: disjunction, + })); + } + } + + return Err(OxcDiagnostic::error("Unterminated capturing group name")); + } + + let disjunction = self.parse_disjunction()?; + if self.reader.eat(')') { + return Ok(Some(ast::CapturingGroup { + span: self.span_factory.create(span_start, self.reader.span_position()), + name: None, + body: disjunction, + })); + } + + return Err(OxcDiagnostic::error("Unterminated capturing group")); + } + + Ok(None) + } + + // ``` + // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ``` + fn parse_ignore_group(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat3('(', '?', ':') { + let disjunction = self.parse_disjunction()?; + + if !self.reader.eat(')') { + return Err(OxcDiagnostic::error("Unterminated ignore group")); + } + + return Ok(Some(ast::IgnoreGroup { + span: self.span_factory.create(span_start, self.reader.span_position()), + // TODO: Stage3 ModifierFlags + enabling_modifiers: None, + disabling_modifiers: None, + body: disjunction, + })); + } + + Ok(None) + } + // --- // ``` From ae49532b6136d0c1acb020469e7616d48432fa52 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 14:55:34 +0900 Subject: [PATCH 080/143] Update identity escape --- .../src/body_parser/parser/parse.rs | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 5e2e43a8cb2a7..e0904068df128 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -1066,27 +1066,26 @@ impl<'a> PatternParser<'a> { } // ``` - // IdentityEscape[UnicodeMode] :: + // IdentityEscape[UnicodeMode, NamedCaptureGroups] :: // [+UnicodeMode] SyntaxCharacter // [+UnicodeMode] / - // [~UnicodeMode] SourceCharacter but not UnicodeIDContinue + // [~UnicodeMode] SourceCharacterIdentityEscape[?NamedCaptureGroups] + // + // SourceCharacterIdentityEscape[NamedCaptureGroups] :: + // [~NamedCaptureGroups] SourceCharacter but not c + // [+NamedCaptureGroups] SourceCharacter but not one of c or k // ``` + // (Annex B) fn consume_identity_escape(&mut self) -> Option { let cp = self.reader.peek()?; - if self.state.unicode_mode { - if unicode::is_syntax_character(cp) { - self.reader.advance(); - return Some(cp); - } - - if cp == '/' as u32 { - self.reader.advance(); - return Some(cp); - } + if self.state.unicode_mode && (unicode::is_syntax_character(cp) || cp == '/' as u32) { + self.reader.advance(); + return Some(cp); } - if !self.state.unicode_mode && !unicode::is_id_continue(cp) { + // `NamedCaptureGroups` is always enabled + if !self.state.unicode_mode && (cp != 'c' as u32 && cp != 'k' as u32) { self.reader.advance(); return Some(cp); } From e0d93801453a2e1733aa2b43d197757dde7fa96b Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 14:56:12 +0900 Subject: [PATCH 081/143] Remove old implementation --- .../src/body_parser/parser/_atom.rs | 257 ----------- .../src/body_parser/parser/_atom_class.rs | 227 ---------- .../src/body_parser/parser/_atom_escape.rs | 378 ---------------- .../src/body_parser/parser/_parse.rs | 403 ------------------ .../src/body_parser/parser/_shared.rs | 240 ----------- 5 files changed, 1505 deletions(-) delete mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/_atom.rs delete mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/_atom_class.rs delete mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/_atom_escape.rs delete mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs delete mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/_shared.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/_atom.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_atom.rs deleted file mode 100644 index 501f11b0765d6..0000000000000 --- a/crates/oxc_regexp_parser/src/body_parser/parser/_atom.rs +++ /dev/null @@ -1,257 +0,0 @@ -use oxc_allocator::{Box, Vec}; -use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Atom as SpanAtom; - -use crate::{ast, body_parser::unicode}; - -impl<'a> super::parse::PatternParser<'a> { - // ``` - // PatternCharacter :: - // SourceCharacter but not SyntaxCharacter - // ``` - // - pub(super) fn consume_pattern_character(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let cp = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp))?; - self.reader.advance(); - - Some(ast::Atom::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }, - self.allocator, - ))) - } - - pub(super) fn consume_dot(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - if !self.reader.eat('.') { - return None; - } - - Some(ast::Atom::CharacterSet(Box::new_in( - ast::CharacterSet::AnyCharacterSet(Box::new_in( - ast::AnyCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - }, - self.allocator, - )), - self.allocator, - ))) - } - - // ``` - // AtomEscape[UnicodeMode, NamedCaptureGroups] :: - // DecimalEscape - // CharacterClassEscape[?UnicodeMode] - // CharacterEscape[?UnicodeMode] - // [+NamedCaptureGroups] k GroupName[?UnicodeMode] - // ``` - // - pub(super) fn consume_atom_escape(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if !self.reader.eat('\\') { - return Ok(None); - } - - // `DecimalEscape`: \1 means Backreference - if let Some(normal_backreference) = self.consume_normal_backreference(span_start) { - return Ok(Some(ast::Atom::Backreference(Box::new_in( - normal_backreference, - self.allocator, - )))); - } - - // `CharacterClassEscape`: \d - if let Some(character_class_escape) = self.consume_character_class_escape(span_start) { - return Ok(Some(ast::Atom::CharacterSet(Box::new_in( - ast::CharacterSet::EscapeCharacterSet(Box::new_in( - character_class_escape, - self.allocator, - )), - self.allocator, - )))); - } - // `CharacterClassEscape`: \p{...} - if self.state.is_unicode_mode() { - if let Some(character_class_escape_unicode) = - self.consume_character_class_escape_unicode(span_start)? - { - return Ok(Some(ast::Atom::CharacterSet(Box::new_in( - ast::CharacterSet::UnicodePropertyCharacterSet(Box::new_in( - character_class_escape_unicode, - self.allocator, - )), - self.allocator, - )))); - } - } - - // `CharacterEscape`: \n, \cM, \0, etc... - if let Some(character) = self.consume_character_escape(span_start)? { - return Ok(Some(ast::Atom::Character(Box::new_in(character, self.allocator)))); - } - - // `k`: \k means Backreference - if let Some(named_backreference) = self.consume_named_backreference(span_start)? { - return Ok(Some(ast::Atom::Backreference(Box::new_in( - named_backreference, - self.allocator, - )))); - } - - Err(OxcDiagnostic::error("Invalid escape")) - } - - // ``` - // CharacterClass[UnicodeMode, UnicodeSetsMode] :: - // [ [lookahead ≠ ^] ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] - // [^ ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] - // ``` - // - pub(super) fn consume_character_class(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if self.reader.eat('[') { - let negate = self.reader.eat('^'); - - if self.state.is_unicode_sets_mode() { - let contents = self.consume_class_contents_unicode_sets()?; - if self.reader.eat(']') { - return Ok(Some(ast::Atom::CharacterClass(Box::new_in( - ast::CharacterClass::UnicodeSetsCharacterClass(Box::new_in( - ast::UnicodeSetsCharacterClass { - span: self - .span_factory - .create(span_start, self.reader.span_position()), - negate, - elements: contents, - }, - self.allocator, - )), - self.allocator, - )))); - } - } - - let contents = self.consume_class_contents()?; - if self.reader.eat(']') { - return Ok(Some(ast::Atom::CharacterClass(Box::new_in( - ast::CharacterClass::ClassRangesCharacterClass(Box::new_in( - ast::ClassRangesCharacterClass { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate, - elements: contents, - }, - self.allocator, - )), - self.allocator, - )))); - } - - return Err(OxcDiagnostic::error("Unterminated character class")); - } - - Ok(None) - } - - // ``` - // ClassContents[UnicodeMode, UnicodeSetsMode] :: - // [empty] - // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] - // [+UnicodeSetsMode] ClassSetExpression - // ``` - // - fn consume_class_contents( - &mut self, - ) -> Result>> { - self.consume_nonempty_class_ranges() - } - fn consume_class_contents_unicode_sets( - &mut self, - ) -> Result>> { - // self.consume_class_set_expression() - if self.reader.eat('👻') { - return Err(OxcDiagnostic::error("TODO")); - } - Ok(Vec::new_in(self.allocator)) - } - - // ``` - // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // ``` - pub(super) fn consume_capturing_group(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if self.reader.eat('(') { - let group_name = self.consume_group_specifier()?; - let disjunction = self.consume_disjunction()?; - - if self.reader.eat(')') { - return Ok(Some(ast::Atom::CapturingGroup(Box::new_in( - ast::CapturingGroup { - span: self.span_factory.create(span_start, self.reader.span_position()), - name: group_name, - alternatives: disjunction, - }, - self.allocator, - )))); - } - - return Err(OxcDiagnostic::error("Unterminated group")); - } - - Ok(None) - } - - // ``` - // GroupSpecifier[UnicodeMode] :: - // ? GroupName[?UnicodeMode] - // ``` - // - fn consume_group_specifier(&mut self) -> Result>> { - if self.reader.eat('?') { - if let Some(group_name) = self.consume_group_name()? { - // TODO: Implement - // if (this._groupSpecifiers.hasInScope(this._lastStrValue)) { - // this.raise("Duplicate capture group name"); - // } - // this._groupSpecifiers.addToScope(this._lastStrValue); - return Ok(Some(group_name)); - } - - return Err(OxcDiagnostic::error("Invalid group")); - } - - Ok(None) - } - - // ``` - // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // ``` - pub(super) fn consume_non_capturing_group(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if self.reader.eat3('(', '?', ':') { - let disjunction = self.consume_disjunction()?; - - if self.reader.eat(')') { - return Ok(Some(ast::Atom::NonCapturingGroup(Box::new_in( - ast::NonCapturingGroup { - span: self.span_factory.create(span_start, self.reader.span_position()), - alternatives: disjunction, - }, - self.allocator, - )))); - } - - return Err(OxcDiagnostic::error("Unterminated group")); - } - - Ok(None) - } -} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/_atom_class.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_atom_class.rs deleted file mode 100644 index 15238afb20a3e..0000000000000 --- a/crates/oxc_regexp_parser/src/body_parser/parser/_atom_class.rs +++ /dev/null @@ -1,227 +0,0 @@ -use oxc_allocator::{Box, Vec}; -use oxc_diagnostics::{OxcDiagnostic, Result}; - -use crate::ast; - -impl<'a> super::parse::PatternParser<'a> { - // ``` - // NonemptyClassRanges[UnicodeMode] :: - // ClassAtom[?UnicodeMode] - // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] - // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] - // ``` - // - pub(super) fn consume_nonempty_class_ranges( - &mut self, - ) -> Result>> { - let mut contents = Vec::new_in(self.allocator); - - // NOTE: This implementation may not reflect the spec correctly. - // `ClassAtom`(= `NonemptyClassRanges`) and `NonemptyClassRangesNoDash` should be distinguished? - // But `regexpp` also handles them in the same way. - loop { - let range_span_start = self.reader.span_position(); - - let Some(first_class_atom) = self.consume_class_atom()? else { - // If there is no more characters, break the loop to return `[empty]` - break; - }; - - let span_start = self.reader.span_position(); - if self.reader.eat('-') { - let Some(second_class_atom) = self.consume_class_atom()? else { - contents.push(first_class_atom); - contents.push(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: '-' as u32, - }, - self.allocator, - ))); - // If `-` found but there is no more characters, - // push first atom and `-` as a character and continue - continue; - }; - - match (first_class_atom, second_class_atom) { - ( - ast::ClassRangesCharacterClassElement::Character(min_character), - ast::ClassRangesCharacterClassElement::Character(max_character), - ) => { - contents.push(ast::ClassRangesCharacterClassElement::CharacterClassRange( - Box::new_in( - ast::CharacterClassRange { - span: self - .span_factory - .create(range_span_start, self.reader.span_position()), - min: min_character.unbox(), - max: max_character.unbox(), - }, - self.allocator, - ), - )); - // If `-` and 2 characters found, push the range and continue - continue; - } - _ => { - return Err(OxcDiagnostic::error("Invalid character class range")); - } - } - } - - // If `-` not found, push the character and continue - contents.push(first_class_atom); - } - - Ok(contents) - } - - // ``` - // ClassAtom[UnicodeMode] :: - // - - // ClassAtomNoDash[?UnicodeMode] - // ``` - // - fn consume_class_atom(&mut self) -> Result>> { - let Some(cp) = self.reader.peek() else { - return Ok(None); - }; - - let span_start = self.reader.span_position(); - if cp == '-' as u32 { - self.reader.advance(); - - return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }, - self.allocator, - )))); - } - - if let Some(class_atom_no_dash) = self.consume_class_atom_no_dash()? { - return Ok(Some(class_atom_no_dash)); - } - - Ok(None) - } - - // ``` - // ClassAtomNoDash[UnicodeMode] :: - // SourceCharacter but not one of \ or ] or - - // \ ClassEscape[?UnicodeMode] - // ``` - // - fn consume_class_atom_no_dash( - &mut self, - ) -> Result>> { - let Some(cp) = self.reader.peek() else { - return Ok(None); - }; - - let span_start = self.reader.span_position(); - if cp != '\\' as u32 && cp != ']' as u32 && cp != '-' as u32 { - self.reader.advance(); - - return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }, - self.allocator, - )))); - } - - let span_start = self.reader.span_position(); - if self.reader.eat('\\') { - if let Some(class_escape) = self.consume_class_escape(span_start)? { - return Ok(Some(class_escape)); - } - - return Err(OxcDiagnostic::error("Invalid escape")); - } - - Ok(None) - } - - // ``` - // ClassEscape[UnicodeMode] :: - // b - // [+UnicodeMode] - - // CharacterClassEscape[?UnicodeMode] - // CharacterEscape[?UnicodeMode] - // ``` - // - fn consume_class_escape( - &mut self, - span_start: usize, - ) -> Result>> { - let Some(cp) = self.reader.peek() else { - return Ok(None); - }; - - if cp == 'b' as u32 { - self.reader.advance(); - - return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }, - self.allocator, - )))); - } - - if self.state.is_unicode_mode() && cp == '-' as u32 { - self.reader.advance(); - - return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: cp, - }, - self.allocator, - )))); - } - - if let Some(escape_character_set) = self.consume_character_class_escape(span_start) { - return Ok(Some(ast::ClassRangesCharacterClassElement::EscapeCharacterSet( - Box::new_in(escape_character_set, self.allocator), - ))); - } - if self.state.is_unicode_mode() { - if let Some(unicode_property_character_set) = - self.consume_character_class_escape_unicode(span_start)? - { - match unicode_property_character_set { - ast::UnicodePropertyCharacterSet::CharacterUnicodePropertyCharacterSet( - character_set, - ) => { - return Ok(Some( - ast::ClassRangesCharacterClassElement::CharacterUnicodePropertyCharacterSet( - character_set - ), - )); - } - // This is `unicode_sets_mode` only pattern. - // If `unicode_sets_mode: true`, this function should not be called at all. - ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet(_) => { - return Err(OxcDiagnostic::error( - "Unexpected StringsUnicodePropertyCharacterSet", - )); - } - } - } - } - - if let Some(character) = self.consume_character_escape(span_start)? { - return Ok(Some(ast::ClassRangesCharacterClassElement::Character(Box::new_in( - character, - self.allocator, - )))); - } - - Ok(None) - } -} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/_atom_escape.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_atom_escape.rs deleted file mode 100644 index e05f595fee052..0000000000000 --- a/crates/oxc_regexp_parser/src/body_parser/parser/_atom_escape.rs +++ /dev/null @@ -1,378 +0,0 @@ -use oxc_allocator::Box; -use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Atom as SpanAtom; - -use crate::{ - ast, - body_parser::{unicode, unicode_property}, -}; - -impl<'a> super::parse::PatternParser<'a> { - pub(super) fn consume_normal_backreference( - &mut self, - span_start: usize, - ) -> Option> { - let decimal = self.consume_decimal_escape()?; - - Some(ast::Backreference::NormalBackreference(Box::new_in( - ast::NormalBackreference { - span: self.span_factory.create(span_start, self.reader.span_position()), - r#ref: decimal, - }, - self.allocator, - ))) - } - - // ``` - // DecimalEscape :: - // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] - // ``` - // - fn consume_decimal_escape(&mut self) -> Option { - if unicode::is_non_zero_digit(self.reader.peek()?) { - let mut value = 0; - - while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - return Some(value); - } - - None - } - - // ``` - // CharacterClassEscape[UnicodeMode] :: - // d - // D - // s - // S - // w - // W - // [+UnicodeMode] p{ UnicodePropertyValueExpression } - // [+UnicodeMode] P{ UnicodePropertyValueExpression } - // ``` - // - pub(super) fn consume_character_class_escape( - &mut self, - span_start: usize, - ) -> Option { - if self.reader.eat('d') { - return Some(ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EscapeCharacterSetKind::Digit, - negate: false, - }); - } - if self.reader.eat('D') { - return Some(ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EscapeCharacterSetKind::Digit, - negate: true, - }); - } - if self.reader.eat('s') { - return Some(ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EscapeCharacterSetKind::Space, - negate: false, - }); - } - if self.reader.eat('S') { - return Some(ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EscapeCharacterSetKind::Space, - negate: true, - }); - } - if self.reader.eat('w') { - return Some(ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EscapeCharacterSetKind::Word, - negate: false, - }); - } - if self.reader.eat('W') { - return Some(ast::EscapeCharacterSet { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EscapeCharacterSetKind::Word, - negate: true, - }); - } - - None - } - pub(super) fn consume_character_class_escape_unicode( - &mut self, - span_start: usize, - ) -> Result>> { - let negate = if self.reader.eat('p') { - Some(false) - } else if self.reader.eat('P') { - Some(true) - } else { - None - }; - - if let Some(negate) = negate { - if self.reader.eat('{') { - if let Some((name, value, is_strings_related)) = - self.consume_unicode_property_value_expression()? - { - if negate && is_strings_related { - return Err(OxcDiagnostic::error("Invalid property name")); - } - - if self.reader.eat('}') { - let span = - self.span_factory.create(span_start, self.reader.span_position()); - return Ok(Some(if is_strings_related { - ast::UnicodePropertyCharacterSet::StringsUnicodePropertyCharacterSet( - Box::new_in( - ast::StringsUnicodePropertyCharacterSet { span, key: name }, - self.allocator, - ), - ) - } else { - ast::UnicodePropertyCharacterSet::CharacterUnicodePropertyCharacterSet( - Box::new_in( - ast::CharacterUnicodePropertyCharacterSet { - span, - key: name, - value, - negate, - }, - self.allocator, - ), - ) - })); - } - } - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - - Ok(None) - } - - // ``` - // UnicodePropertyValueExpression :: - // UnicodePropertyName = UnicodePropertyValue - // LoneUnicodePropertyNameOrValue - // ``` - // - /// Returns: `(name, value, is_strings_related_unicode_property)` - fn consume_unicode_property_value_expression( - &mut self, - ) -> Result, Option>, bool)>> { - let checkpoint = self.reader.checkpoint(); - - // UnicodePropertyName=UnicodePropertyValue - if let Some(name) = self.consume_unicode_property_name() { - if self.reader.eat('=') { - if let Some(value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property(&name, &value) { - return Ok(Some((name, Some(value), false))); - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - } - } - self.reader.rewind(checkpoint); - - // LoneUnicodePropertyNameOrValue - if let Some(name_or_value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { - return Ok(Some(("General_Category".into(), Some(name_or_value), false))); - } - - if unicode_property::is_valid_lone_unicode_property(&name_or_value) { - return Ok(Some((name_or_value, None, false))); - } - - if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { - // Early errors: - // It is a Syntax Error - // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter - // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings - // - listed in the “Property name” column of Table 68. - if !self.state.is_unicode_sets_mode() { - return Err(OxcDiagnostic::error("Syntax Error")); - } - - return Ok(Some((name_or_value, None, true))); - } - - return Err(OxcDiagnostic::error("Invalid property name")); - } - - Ok(None) - } - - fn consume_unicode_property_name(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let checkpoint = self.reader.checkpoint(); - while unicode::is_unicode_property_name_character(self.reader.peek()?) { - self.reader.advance(); - } - - if checkpoint == self.reader.checkpoint() { - return None; - } - - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) - } - - fn consume_unicode_property_value(&mut self) -> Option> { - let span_start = self.reader.span_position(); - - let checkpoint = self.reader.checkpoint(); - while unicode::is_unicode_property_value_character(self.reader.peek()?) { - self.reader.advance(); - } - - if checkpoint == self.reader.checkpoint() { - return None; - } - - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) - } - - // ``` - // CharacterEscape[UnicodeMode] :: - // ControlEscape - // c AsciiLetter - // 0 [lookahead ∉ DecimalDigit] - // HexEscapeSequence - // RegExpUnicodeEscapeSequence[?UnicodeMode] - // IdentityEscape[?UnicodeMode] - // ``` - // - pub(super) fn consume_character_escape( - &mut self, - span_start: usize, - ) -> Result> { - // e.g. \n - if let Some(control_escape) = self.reader.peek().and_then(unicode::map_control_escape) { - self.reader.advance(); - return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: control_escape, - })); - } - - // e.g. \cM - let checkpoint = self.reader.checkpoint(); - if self.reader.eat('c') { - if let Some(c_ascii_letter) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { - self.reader.advance(); - return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: c_ascii_letter, - })); - } - self.reader.rewind(checkpoint); - } - - // e.g. \0 - if self.reader.peek().map_or(false, |cp| cp == '0' as u32) - && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digits(cp)) - { - self.reader.advance(); - return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: 0x00, - })); - } - - // e.g. \x41 - if self.reader.eat('x') { - if let Some(hex_digits) = self.consume_fixed_hex_digits(2) { - return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: hex_digits, - })); - } - return Err(OxcDiagnostic::error("Invalid escape")); - } - - // e.g. \u{1f600} - if let Some(reg_exp_unicode_escape_sequence) = - self.consume_reg_exp_unicode_escape_sequence()? - { - return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: reg_exp_unicode_escape_sequence, - })); - } - - // e.g. \. - if let Some(identity_escape) = self.consume_identity_escape() { - return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), - value: identity_escape, - })); - } - - Ok(None) - } - - // ``` - // IdentityEscape[UnicodeMode] :: - // [+UnicodeMode] SyntaxCharacter - // [+UnicodeMode] / - // [~UnicodeMode] SourceCharacter but not UnicodeIDContinue - // ``` - // - fn consume_identity_escape(&mut self) -> Option { - let cp = self.reader.peek()?; - - if self.state.is_unicode_mode() { - if unicode::is_syntax_character(cp) { - self.reader.advance(); - return Some(cp); - } - if cp == '/' as u32 { - self.reader.advance(); - return Some(cp); - } - } - - if !self.state.is_unicode_mode() && !unicode::is_id_continue(cp) { - self.reader.advance(); - return Some(cp); - } - - None - } - - pub(super) fn consume_named_backreference( - &mut self, - span_start: usize, - ) -> Result>> { - if self.reader.eat('k') { - if let Some(group_name) = self.consume_group_name()? { - // TODO: Implement - // this._backreferenceNames.add(groupName); - - return Ok(Some(ast::Backreference::NamedBackreference(Box::new_in( - ast::NamedBackreference { - span: self.span_factory.create(span_start, self.reader.span_position()), - r#ref: group_name, - }, - self.allocator, - )))); - } - - return Err(OxcDiagnostic::error("Invalid named reference")); - } - - Ok(None) - } -} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs deleted file mode 100644 index 2dad8be6ec944..0000000000000 --- a/crates/oxc_regexp_parser/src/body_parser/parser/_parse.rs +++ /dev/null @@ -1,403 +0,0 @@ -use oxc_allocator::{Allocator, Box, Vec}; -use oxc_diagnostics::{OxcDiagnostic, Result}; - -use crate::{ - ast, - body_parser::{reader::Reader, state::State, unicode}, - options::ParserOptions, - span::SpanFactory, -}; - -pub struct PatternParser<'a> { - pub(super) allocator: &'a Allocator, - pub(super) source_text: &'a str, - pub(super) span_factory: SpanFactory, - pub(super) reader: Reader<'a>, - pub(super) state: State, -} - -impl<'a> PatternParser<'a> { - pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { - let unicode_mode = options.unicode_flag || options.unicode_sets_flag; - let unicode_sets_mode = options.unicode_sets_flag; - - Self { - allocator, - source_text, - span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(source_text, unicode_mode), - state: State::new(unicode_mode, unicode_sets_mode), - } - } - - pub fn parse(&mut self) -> Result> { - if self.source_text.is_empty() { - return Err(OxcDiagnostic::error("Empty")); - } - - self.consume_pattern() - } - - // ``` - // Pattern[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // ``` - // - fn consume_pattern(&mut self) -> Result> { - // TODO: Define state, use later somewhere - // this._groupSpecifiers.clear(); - // TODO: Define state, use later here - // this._backreferenceNames.clear(); - - let span_start = self.reader.span_position(); - let disjunction = self.consume_disjunction()?; - - if self.reader.peek().is_some() { - if self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unmatched ')'")); - } - if self.reader.eat('\\') { - return Err(OxcDiagnostic::error("'\\' at end of pattern")); - } - if self.reader.eat(']') || self.reader.eat('}') { - return Err(OxcDiagnostic::error("Lone quantifier brackets")); - } - return Err(OxcDiagnostic::error("Unexpected character")); - } - // TODO: Implement - // for (const name of this._backreferenceNames) { - // if (!this._groupSpecifiers.hasInPattern(name)) { - // this.raise("Invalid named capture referenced"); - // } - // } - - let pattern = ast::Pattern { - span: self.span_factory.create(span_start, self.reader.span_position()), - alternatives: disjunction, - }; - - // TODO: Implement, finalize backreferences with captured groups - // this.onPatternLeave(start, this.index); - - Ok(pattern) - } - - // ``` - // Disjunction[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // ``` - // - pub(super) fn consume_disjunction(&mut self) -> Result>> { - let mut disjunction = Vec::new_in(self.allocator); - - // TODO: Implement - // this._groupSpecifiers.enterDisjunction(); - - let mut i: usize = 0; - loop { - disjunction.push(self.consume_alternative(i)?); - - if self.reader.eat('|') { - i += 1; - continue; - } - - break; - } - - if self.reader.eat('{') { - return Err(OxcDiagnostic::error("Lone quantifier brackets")); - } - - // TODO: Implement - // this._groupSpecifiers.leaveDisjunction(); - - Ok(disjunction) - } - - // ``` - // Alternative[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // [empty] - // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // ``` - // - fn consume_alternative(&mut self, i: usize) -> Result> { - // TODO: Implement - let _ = i; - // this._groupSpecifiers.enterAlternative(i); - - let span_start = self.reader.span_position(); - - let mut terms = Vec::new_in(self.allocator); - while let Some(term) = self.consume_term()? { - terms.push(term); - } - - Ok(ast::Alternative { - span: self.span_factory.create(span_start, self.reader.span_position()), - terms, - }) - } - - // ``` - // Term[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // Assertion[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] - // Atom[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Quantifier - // ``` - // - fn consume_term(&mut self) -> Result>> { - if let Some(assertion) = self.consume_assertion()? { - return Ok(Some(ast::Term::Assertion(Box::new_in(assertion, self.allocator)))); - } - - let span_start = self.reader.span_position(); - match (self.consume_atom()?, self.consume_quantifier()?) { - (Some(atom), None) => Ok(Some(ast::Term::Atom(Box::new_in(atom, self.allocator)))), - (Some(atom), Some(((min, max), greedy))) => { - return Ok(Some(ast::Term::AtomWithQuantifier(Box::new_in( - ast::AtomWithQuantifier { - span: self.span_factory.create(span_start, self.reader.span_position()), - min, - max, - greedy, - atom, - }, - self.allocator, - )))); - } - (None, Some(_)) => Err(OxcDiagnostic::error("Nothing to repeat")), - (None, None) => Ok(None), - } - } - - // Assertion[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // ^ - // $ - // \b - // \B - // (?= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (?! Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (?<= Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (? - fn consume_assertion(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if self.reader.eat('^') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::EdgeAssertion(Box::new_in( - ast::EdgeAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EdgeAssertionKind::Start, - }, - self.allocator, - )), - self.allocator, - )))); - } - if self.reader.eat('$') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::EdgeAssertion(Box::new_in( - ast::EdgeAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::EdgeAssertionKind::End, - }, - self.allocator, - )), - self.allocator, - )))); - } - if self.reader.eat2('\\', 'B') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( - ast::WordBoundaryAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate: false, - }, - self.allocator, - )), - self.allocator, - )))); - } - if self.reader.eat2('\\', 'b') { - return Ok(Some(ast::Assertion::BoundaryAssertion(Box::new_in( - ast::BoundaryAssertion::WordBoundaryAssertion(Box::new_in( - ast::WordBoundaryAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), - negate: true, - }, - self.allocator, - )), - self.allocator, - )))); - } - - // Lookaround - let checkpoint = self.reader.checkpoint(); - if self.reader.eat2('(', '?') { - let lookaround = { - let is_lookbehind = self.reader.eat('<'); - - if self.reader.eat('=') { - Some((false, is_lookbehind)) - } else if self.reader.eat('!') { - Some((true, is_lookbehind)) - } else { - None - } - }; - - if let Some((negate, is_lookbehind)) = lookaround { - let alternatives = self.consume_disjunction()?; - if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated group")); - } - - let span = self.span_factory.create(span_start, self.reader.span_position()); - let lookaround_assertion = if is_lookbehind { - ast::LookaroundAssertion::LookbehindAssertion(Box::new_in( - ast::LookbehindAssertion { span, negate, alternatives }, - self.allocator, - )) - } else { - ast::LookaroundAssertion::LookaheadAssertion(Box::new_in( - ast::LookaheadAssertion { span, negate, alternatives }, - self.allocator, - )) - }; - - return Ok(Some(ast::Assertion::LookaroundAssertion(Box::new_in( - lookaround_assertion, - self.allocator, - )))); - } - - self.reader.rewind(checkpoint); - } - - Ok(None) - } - - // ``` - // Atom[UnicodeMode, UnicodeSetsMode, NamedCaptureGroups] :: - // PatternCharacter - // . - // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] - // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] - // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) - // ``` - // - fn consume_atom(&mut self) -> Result>> { - if let Some(atom) = self.consume_pattern_character() { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_dot() { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_atom_escape()? { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_character_class()? { - return Ok(Some(atom)); - } - // In the spec, (named) capturing group and non-capturing group are defined in that order. - // But if `?:` is not valid as a `GroupSpecifier`, why is it not defined in reverse order...? - if let Some(atom) = self.consume_non_capturing_group()? { - return Ok(Some(atom)); - } - if let Some(atom) = self.consume_capturing_group()? { - return Ok(Some(atom)); - } - - Ok(None) - } - - // ``` - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // ``` - // - // ``` - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits ,} - // { DecimalDigits , DecimalDigits } - // ``` - // - /// Returns: `((min, max?), greedy)` - #[allow(clippy::type_complexity)] - fn consume_quantifier(&mut self) -> Result), bool)>> { - let is_greedy = |reader: &mut Reader| !reader.eat('?'); - - if self.reader.eat('*') { - return Ok(Some(((0, None), is_greedy(&mut self.reader)))); - } - if self.reader.eat('+') { - return Ok(Some(((1, None), is_greedy(&mut self.reader)))); - } - if self.reader.eat('?') { - return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); - } - - if self.reader.eat('{') { - if let Some(min) = self.consume_decimal_digits() { - if self.reader.eat('}') { - return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); - } - - if self.reader.eat(',') { - if self.reader.eat('}') { - return Ok(Some(((min, None), is_greedy(&mut self.reader)))); - } - - if let Some(max) = self.consume_decimal_digits() { - if self.reader.eat('}') { - if max < min { - return Err(OxcDiagnostic::error( - "Numbers out of order in braced quantifier", - )); - } - - return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); - } - } - } - } - - return Err(OxcDiagnostic::error("Incomplete quantifier")); - } - - Ok(None) - } - - // ``` - // DecimalDigits[Sep] :: - // DecimalDigit - // DecimalDigits[?Sep] DecimalDigit - // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit - // ``` - // - fn consume_decimal_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_decimal_digits(cp)) { - // `- '0' as u32`: convert code point to digit - value = (10 * value) + (cp - '0' as u32) as usize; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } -} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/_shared.rs b/crates/oxc_regexp_parser/src/body_parser/parser/_shared.rs deleted file mode 100644 index abc72e627e53d..0000000000000 --- a/crates/oxc_regexp_parser/src/body_parser/parser/_shared.rs +++ /dev/null @@ -1,240 +0,0 @@ -use oxc_diagnostics::{OxcDiagnostic, Result}; -use oxc_span::Atom as SpanAtom; - -use crate::body_parser::unicode; - -impl<'a> super::parse::PatternParser<'a> { - pub(super) fn consume_fixed_hex_digits(&mut self, len: usize) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - for _ in 0..len { - let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) else { - self.reader.rewind(checkpoint); - return None; - }; - - value = (16 * value) + hex; - self.reader.advance(); - } - - Some(value) - } - - // ``` - // RegExpUnicodeEscapeSequence[UnicodeMode] :: - // [+UnicodeMode] u HexLeadSurrogate \u HexTrailSurrogate - // [+UnicodeMode] u HexLeadSurrogate - // [+UnicodeMode] u HexTrailSurrogate - // [+UnicodeMode] u HexNonSurrogate - // [~UnicodeMode] u Hex4Digits - // [+UnicodeMode] u{ CodePoint } - // ``` - // - pub(super) fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { - if !self.reader.eat('u') { - return Ok(None); - } - - if self.state.is_unicode_mode() { - let checkpoint = self.reader.checkpoint(); - - // HexLeadSurrogate + HexTrailSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if self.reader.eat2('\\', 'u') { - if let Some(trail_surrogate) = self - .consume_fixed_hex_digits(4) - .filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); - } - } - } - self.reader.rewind(checkpoint); - - // NOTE: `regexpp` seems not to support these 2 cases, why...? - - // HexLeadSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - return Ok(Some(lead_surrogate)); - } - self.reader.rewind(checkpoint); - - // HexTrailSurrogate - if let Some(trail_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(trail_surrogate)); - } - self.reader.rewind(checkpoint); - } - - // HexNonSurrogate and Hex4Digits are the same - if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { - return Ok(Some(hex_digits)); - } - - // {CodePoint} - if self.state.is_unicode_mode() { - let checkpoint = self.reader.checkpoint(); - - if self.reader.eat('{') { - if let Some(hex_digits) = - self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) - { - if self.reader.eat('}') { - return Ok(Some(hex_digits)); - } - } - } - self.reader.rewind(checkpoint); - } - - Err(OxcDiagnostic::error("Invalid unicode escape")) - } - - fn consume_hex_digits(&mut self) -> Option { - let checkpoint = self.reader.checkpoint(); - - let mut value = 0; - while let Some(hex) = self.reader.peek().and_then(unicode::map_hex_digit) { - value = (16 * value) + hex; - self.reader.advance(); - } - - if self.reader.checkpoint() != checkpoint { - return Some(value); - } - - None - } - - // ``` - // GroupName[UnicodeMode] :: - // < RegExpIdentifierName[?UnicodeMode] > - // ``` - // - pub(super) fn consume_group_name(&mut self) -> Result>> { - if !self.reader.eat('<') { - return Ok(None); - } - - if let Some(group_name) = self.consume_reg_exp_idenfigier_name()? { - if self.reader.eat('>') { - return Ok(Some(group_name)); - } - } - - Err(OxcDiagnostic::error("Invalid capture group name")) - } - - // ``` - // RegExpIdentifierName[UnicodeMode] :: - // RegExpIdentifierStart[?UnicodeMode] - // RegExpIdentifierName[?UnicodeMode] RegExpIdentifierPart[?UnicodeMode] - // ``` - // - fn consume_reg_exp_idenfigier_name(&mut self) -> Result>> { - let span_start = self.reader.span_position(); - - if self.consume_reg_exp_idenfigier_start()?.is_some() { - while self.consume_reg_exp_idenfigier_part()?.is_some() {} - - let span_end = self.reader.span_position(); - return Ok(Some(SpanAtom::from(&self.source_text[span_start..span_end]))); - } - - Ok(None) - } - - // ``` - // RegExpIdentifierStart[UnicodeMode] :: - // IdentifierStartChar - // \ RegExpUnicodeEscapeSequence[+UnicodeMode] - // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate - // ``` - // - fn consume_reg_exp_idenfigier_start(&mut self) -> Result> { - if let Some(cp) = self.reader.peek() { - if unicode::is_identifier_start_char(cp) { - self.reader.advance(); - return Ok(Some(cp)); - } - } - - if self.reader.eat('\\') { - if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { - return Ok(Some(cp)); - } - } - - if !self.state.is_unicode_mode() { - if let Some(lead_surrogate) = - self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if let Some(trail_surrogate) = - self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) - { - self.reader.advance(); - self.reader.advance(); - - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); - } - } - } - - Ok(None) - } - - // ``` - // RegExpIdentifierPart[UnicodeMode] :: - // IdentifierPartChar - // \ RegExpUnicodeEscapeSequence[+UnicodeMode] - // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate - // ``` - // - fn consume_reg_exp_idenfigier_part(&mut self) -> Result> { - if let Some(cp) = self.reader.peek() { - if unicode::is_identifier_part_char(cp) { - self.reader.advance(); - return Ok(Some(cp)); - } - } - - if self.reader.eat('\\') { - if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { - return Ok(Some(cp)); - } - } - - if !self.state.is_unicode_mode() { - if let Some(lead_surrogate) = - self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if let Some(trail_surrogate) = - self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) - { - self.reader.advance(); - self.reader.advance(); - - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); - } - } - } - - Ok(None) - } -} From 26921cd97ce605f7304bd891f6b34c9067c4c70f Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 15:39:27 +0900 Subject: [PATCH 082/143] Wip extended atom --- .../src/body_parser/parser/parse.rs | 74 +++++++++++++------ .../src/body_parser/unicode.rs | 4 - 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index e0904068df128..33d3d60add84e 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -263,7 +263,7 @@ impl<'a> PatternParser<'a> { fn parse_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); - // `PatternCharacter` + // PatternCharacter if let Some(cp) = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp)) { self.reader.advance(); @@ -274,21 +274,21 @@ impl<'a> PatternParser<'a> { }))); } - // `.` + // . if self.reader.eat('.') { return Ok(Some(ast::RootNode::Dot(ast::Dot { span: self.span_factory.create(span_start, self.reader.span_position()), }))); } - // `\ AtomEscape` + // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] if self.reader.eat('\\') { if let Some(atom_escape) = self.parse_atom_escape(span_start)? { return Ok(Some(atom_escape)); } } - // `CharacterClass` + // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] // TODO // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) @@ -296,8 +296,8 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::RootNode::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); } - // `( GroupSpecifier Disjunction )` - // `( Disjunction )` + // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ( Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(capturing_group) = self.parse_capturing_group()? { return Ok(Some(ast::RootNode::CapturingGroup(Box::new_in( capturing_group, @@ -322,25 +322,54 @@ impl<'a> PatternParser<'a> { fn parse_extended_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); - // `.` + // . if self.reader.eat('.') { return Ok(Some(ast::RootNode::Dot(ast::Dot { span: self.span_factory.create(span_start, self.reader.span_position()), }))); } - // `\ AtomEscape` - // `\ [lookahead = c]` - // `CharacterClass` - // `( GroupSpecifieropt Disjunction )` - // `(?: Disjunction )` - // `InvalidBracedQuantifier` - // `ExtendedPatternCharacter` + // \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] + if self.reader.eat('\\') { + if let Some(atom_escape) = self.parse_atom_escape(span_start)? { + return Ok(Some(atom_escape)); + } + + // \ [lookahead = c] + if self.reader.peek().filter(|&cp| cp == 'c' as u32).is_some() { + return Ok(Some(ast::RootNode::Value(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::Symbol, + value: '\\' as u32, + }))); + } + + return Err(OxcDiagnostic::error("Invalid escape")); + } + + // CharacterClass[~UnicodeMode, ~UnicodeSetsMode] // TODO - if self.reader.eat('👻') { - return Err(OxcDiagnostic::error("WIP...")); + // (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + if let Some(ignore_group) = self.parse_ignore_group()? { + return Ok(Some(ast::RootNode::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); + } + + // ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // ( Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + if let Some(capturing_group) = self.parse_capturing_group()? { + return Ok(Some(ast::RootNode::CapturingGroup(Box::new_in( + capturing_group, + self.allocator, + )))); } + + // InvalidBracedQuantifier + // TODO + + // ExtendedPatternCharacter + // TODO + Ok(None) } @@ -411,8 +440,9 @@ impl<'a> PatternParser<'a> { // CharacterEscape[?UnicodeMode, ?NamedCaptureGroups] // [+NamedCaptureGroups] k GroupName[?UnicodeMode] // ``` + // (Annex B) fn parse_atom_escape(&mut self, span_start: usize) -> Result>> { - // `DecimalEscape`: \1 means indexed reference + // DecimalEscape: \1 means indexed reference if let Some(index) = self.consume_decimal_escape() { // TODO: Check `CapturingGroupNumber` <= `CountLeftCapturingParensWithin` @@ -422,7 +452,7 @@ impl<'a> PatternParser<'a> { }))); } - // `CharacterClassEscape`: \d, \p{...} + // CharacterClassEscape: \d, \p{...} if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { return Ok(Some(ast::RootNode::CharacterClassEscape(character_class_escape))); } @@ -435,12 +465,12 @@ impl<'a> PatternParser<'a> { )))); } - // `CharacterEscape`: \n, \cM, \0, etc... + // CharacterEscape: \n, \cM, \0, etc... if let Some(character_escape) = self.parse_character_escape(span_start)? { return Ok(Some(ast::RootNode::Value(character_escape))); } - // `k GroupName`: \k means named reference + // k GroupName: \k means named reference if self.reader.eat('k') { if let Some(name) = self.consume_group_name()? { return Ok(Some(ast::RootNode::NamedReference(Box::new_in( @@ -464,7 +494,7 @@ impl<'a> PatternParser<'a> { // ``` fn consume_decimal_escape(&mut self) -> Option { if let Some(index) = self.consume_decimal_digits() { - // \0 is `CharacterEscape`, not `DecimalEscape` + // \0 is CharacterEscape, not DecimalEscape if index != 0 { return Some(index); } @@ -655,7 +685,7 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); if self.reader.eat('(') { - // `GroupSpecifier` is optional + // GroupSpecifier is optional if self.reader.eat('?') { if let Some(name) = self.consume_group_name()? { let disjunction = self.parse_disjunction()?; diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index 9755256cfb189..4413b1414d6bc 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -15,10 +15,6 @@ pub fn is_octal_digit(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_digit() && c < '8') } -pub fn is_id_continue(cp: u32) -> bool { - char::from_u32(cp).map_or(false, unicode_id_start::is_id_continue) -} - pub fn is_valid_unicode(cp: u32) -> bool { (0..=0x0010_ffff).contains(&cp) } From a42b55c72a53afb91953e6c8ce245fada88fccb8 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 24 Jul 2024 16:07:57 +0900 Subject: [PATCH 083/143] Parse extended atom (except for character_class) --- crates/oxc_regexp_parser/examples/parser.rs | 1 + .../src/body_parser/parser/parse.rs | 16 ++++++++++++++-- .../oxc_regexp_parser/src/body_parser/unicode.rs | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 37c1dc4877805..0a7a346e451e4 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -20,6 +20,7 @@ fn main() { (r"/\n\cM\0\x41\u{1f600}\./u", ParserOptions::default()), (r"/a\kx\1c/u", ParserOptions::default()), (r"/(cg)(?cg)(?:g)/", ParserOptions::default()), + (r"/{3}/", ParserOptions::default()), ] { println!("Test: {pat} + {options:?}"); let parser = Parser::new(&allocator, pat, options); diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 33d3d60add84e..0e54ad9804159 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -365,10 +365,22 @@ impl<'a> PatternParser<'a> { } // InvalidBracedQuantifier - // TODO + if self.consume_quantifier()?.is_some() { + return Err(OxcDiagnostic::error("Invalid braced quantifier")); + } // ExtendedPatternCharacter - // TODO + if let Some(cp) = + self.reader.peek().filter(|&cp| unicode::is_extended_pattern_character(cp)) + { + self.reader.advance(); + + return Ok(Some(ast::RootNode::Value(ast::Value { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::ValueKind::Symbol, + value: cp, + }))); + } Ok(None) } diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index 4413b1414d6bc..9fd47dd1a383a 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -1,3 +1,7 @@ +// ``` +// SyntaxCharacter :: one of +// ^ $ \ . * + ? ( ) [ ] { } | +// ``` pub fn is_syntax_character(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| { matches!( @@ -7,6 +11,16 @@ pub fn is_syntax_character(cp: u32) -> bool { }) } +// ``` +// ExtendedPatternCharacter :: +// SourceCharacter but not one of ^ $ \ . * + ? ( ) [ | +// ``` +pub fn is_extended_pattern_character(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| { + !matches!(c, '^' | '$' | '\\' | '.' | '*' | '+' | '?' | '(' | ')' | '[' | '|') + }) +} + pub fn is_decimal_digit(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_digit()) } From acd60bf794941f952e2a176027c63a962c016209 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 25 Jul 2024 10:13:09 +0900 Subject: [PATCH 084/143] Fix extended_atom pattern_character --- .../src/body_parser/parser/parse.rs | 186 ++++++++++-------- .../src/body_parser/unicode.rs | 10 - 2 files changed, 104 insertions(+), 92 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 0e54ad9804159..05550586653d9 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -160,19 +160,19 @@ impl<'a> PatternParser<'a> { } match (self.parse_extended_atom()?, self.consume_quantifier()?) { - (Some(atom), Some(((min, max), greedy))) => { + (Some(extended_atom), Some(((min, max), greedy))) => { Ok(Some(ast::RootNode::Quantifier(Box::new_in( ast::Quantifier { span: self.span_factory.create(span_start, self.reader.span_position()), min, max, greedy, - body: atom, + body: extended_atom, }, self.allocator, )))) } - (Some(atom), None) => Ok(Some(atom)), + (Some(extended_atom), None) => Ok(Some(extended_atom)), (None, Some(_)) => { Err(OxcDiagnostic::error("Lone `Quantifier`, expected `ExtendedAtom`")) } @@ -370,11 +370,7 @@ impl<'a> PatternParser<'a> { } // ExtendedPatternCharacter - if let Some(cp) = - self.reader.peek().filter(|&cp| unicode::is_extended_pattern_character(cp)) - { - self.reader.advance(); - + if let Some(cp) = self.consume_extended_pattern_character() { return Ok(Some(ast::RootNode::Value(ast::Value { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::ValueKind::Symbol, @@ -385,65 +381,6 @@ impl<'a> PatternParser<'a> { Ok(None) } - // ``` - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits[~Sep] } - // { DecimalDigits[~Sep] ,} - // { DecimalDigits[~Sep] , DecimalDigits[~Sep] } - // ``` - /// Returns: ((min, max), greedy) - #[allow(clippy::type_complexity)] - fn consume_quantifier(&mut self) -> Result), bool)>> { - let is_greedy = |reader: &mut Reader| !reader.eat('?'); - - if self.reader.eat('*') { - return Ok(Some(((0, None), is_greedy(&mut self.reader)))); - } - if self.reader.eat('+') { - return Ok(Some(((1, None), is_greedy(&mut self.reader)))); - } - if self.reader.eat('?') { - return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); - } - - if self.reader.eat('{') { - if let Some(min) = self.consume_decimal_digits() { - if self.reader.eat('}') { - return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); - } - - if self.reader.eat(',') { - if self.reader.eat('}') { - return Ok(Some(((min, None), is_greedy(&mut self.reader)))); - } - - if let Some(max) = self.consume_decimal_digits() { - if self.reader.eat('}') { - if max < min { - return Err(OxcDiagnostic::error( - "Numbers out of order in braced quantifier", - )); - } - - return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); - } - } - } - } - - return Err(OxcDiagnostic::error("Unterminated quantifier")); - } - - Ok(None) - } - // ``` // AtomEscape[UnicodeMode, NamedCaptureGroups] :: // [+UnicodeMode] DecimalEscape @@ -500,21 +437,6 @@ impl<'a> PatternParser<'a> { Err(OxcDiagnostic::error("Invalid atom escape")) } - // ``` - // DecimalEscape :: - // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] - // ``` - fn consume_decimal_escape(&mut self) -> Option { - if let Some(index) = self.consume_decimal_digits() { - // \0 is CharacterEscape, not DecimalEscape - if index != 0 { - return Some(index); - } - } - - None - } - // ``` // CharacterClassEscape :: // d @@ -756,6 +678,80 @@ impl<'a> PatternParser<'a> { // --- + // ``` + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits[~Sep] } + // { DecimalDigits[~Sep] ,} + // { DecimalDigits[~Sep] , DecimalDigits[~Sep] } + // ``` + /// Returns: ((min, max), greedy) + #[allow(clippy::type_complexity)] + fn consume_quantifier(&mut self) -> Result), bool)>> { + let is_greedy = |reader: &mut Reader| !reader.eat('?'); + + if self.reader.eat('*') { + return Ok(Some(((0, None), is_greedy(&mut self.reader)))); + } + if self.reader.eat('+') { + return Ok(Some(((1, None), is_greedy(&mut self.reader)))); + } + if self.reader.eat('?') { + return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat('{') { + if let Some(min) = self.consume_decimal_digits() { + if self.reader.eat('}') { + return Ok(Some(((min, Some(min)), is_greedy(&mut self.reader)))); + } + + if self.reader.eat(',') { + if self.reader.eat('}') { + return Ok(Some(((min, None), is_greedy(&mut self.reader)))); + } + + if let Some(max) = self.consume_decimal_digits() { + if self.reader.eat('}') { + if max < min { + return Err(OxcDiagnostic::error( + "Numbers out of order in braced quantifier", + )); + } + + return Ok(Some(((min, Some(max)), is_greedy(&mut self.reader)))); + } + } + } + } + + return Err(OxcDiagnostic::error("Unterminated quantifier")); + } + + Ok(None) + } + + // ``` + // DecimalEscape :: + // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] + // ``` + fn consume_decimal_escape(&mut self) -> Option { + if let Some(index) = self.consume_decimal_digits() { + // \0 is CharacterEscape, not DecimalEscape + if index != 0 { + return Some(index); + } + } + + None + } + // ``` // DecimalDigits[Sep] :: // DecimalDigit @@ -1135,6 +1131,32 @@ impl<'a> PatternParser<'a> { None } + // ``` + // ExtendedPatternCharacter :: + // SourceCharacter but not one of ^ $ \ . * + ? ( ) [ | + // ``` + fn consume_extended_pattern_character(&mut self) -> Option { + let cp = self.reader.peek()?; + + if cp == '^' as u32 + || cp == '$' as u32 + || cp == '\\' as u32 + || cp == '.' as u32 + || cp == '*' as u32 + || cp == '+' as u32 + || cp == '?' as u32 + || cp == '(' as u32 + || cp == ')' as u32 + || cp == '[' as u32 + || cp == '|' as u32 + { + return None; + } + + self.reader.advance(); + Some(cp) + } + fn consume_hex_digits(&mut self) -> Option { let checkpoint = self.reader.checkpoint(); diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index 9fd47dd1a383a..ac4412613dadd 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -11,16 +11,6 @@ pub fn is_syntax_character(cp: u32) -> bool { }) } -// ``` -// ExtendedPatternCharacter :: -// SourceCharacter but not one of ^ $ \ . * + ? ( ) [ | -// ``` -pub fn is_extended_pattern_character(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| { - !matches!(c, '^' | '$' | '\\' | '.' | '*' | '+' | '?' | '(' | ')' | '[' | '|') - }) -} - pub fn is_decimal_digit(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_digit()) } From f9c6b2f86655e4e09d35d6b32adf150121ec740b Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 25 Jul 2024 10:22:26 +0900 Subject: [PATCH 085/143] Fix lookbehind assertion --- .../src/body_parser/parser/parse.rs | 4 ++-- .../oxc_regexp_parser/src/body_parser/reader.rs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 05550586653d9..4f9011ed6feca 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -223,9 +223,9 @@ impl<'a> PatternParser<'a> { Some(ast::LookAroundGroupKind::Lookahead) } else if self.reader.eat3('(', '?', '!') { Some(ast::LookAroundGroupKind::NegativeLookahead) - } else if self.reader.eat3('(', '<', '=') { + } else if self.reader.eat4('(', '?', '<', '=') { Some(ast::LookAroundGroupKind::Lookbehind) - } else if self.reader.eat3('(', '<', '!') { + } else if self.reader.eat4('(', '?', '<', '!') { Some(ast::LookAroundGroupKind::NegativeLookbehind) } else { None diff --git a/crates/oxc_regexp_parser/src/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs index 916406d4e0982..4826a34f5d67e 100644 --- a/crates/oxc_regexp_parser/src/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/body_parser/reader.rs @@ -69,6 +69,9 @@ impl<'a> Reader<'a> { pub fn peek3(&self) -> Option { self.peek_nth(2) } + pub fn peek4(&self) -> Option { + self.peek_nth(3) + } // NOTE: Consider `peek(ch: char): bool` style API? @@ -99,6 +102,20 @@ impl<'a> Reader<'a> { } false } + pub fn eat4(&mut self, ch: char, ch2: char, ch3: char, ch4: char) -> bool { + if self.peek() == Some(ch as u32) + && self.peek2() == Some(ch2 as u32) + && self.peek3() == Some(ch3 as u32) + && self.peek4() == Some(ch4 as u32) + { + self.advance(); + self.advance(); + self.advance(); + self.advance(); + return true; + } + false + } } #[cfg(test)] From c35326a117de63f16bf847e89ce80541e78bb1ca Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 25 Jul 2024 10:36:26 +0900 Subject: [PATCH 086/143] Fix tests --- crates/oxc_regexp_parser/examples/parser.rs | 7 ++++++- .../src/body_parser/parser/mod.rs | 20 ++++++++++--------- .../src/body_parser/parser/parse.rs | 4 ++++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 0a7a346e451e4..e8a1e51e3b801 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -20,7 +20,12 @@ fn main() { (r"/\n\cM\0\x41\u{1f600}\./u", ParserOptions::default()), (r"/a\kx\1c/u", ParserOptions::default()), (r"/(cg)(?cg)(?:g)/", ParserOptions::default()), - (r"/{3}/", ParserOptions::default()), + (r"/{3}/", ParserOptions::default()), // Error + (r"/Em🥹j/", ParserOptions::default()), + (r"/^(?=ab)\b(?!cd)(?<=ef)\B(? PatternParser<'a> { let result = self.parse_disjunction()?; + if self.reader.peek().is_some() { + return Err(OxcDiagnostic::error("Could not parse the entire pattern")); + } + // TODO: Revisit `should_reparse` Ok(ast::Pattern { span: self.span_factory.create(0, self.source_text.len()), body: result }) From be1cddbcc8c6291badce919c3ca9e5b87b6afd58 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 25 Jul 2024 15:07:20 +0900 Subject: [PATCH 087/143] Arrange AST names --- crates/oxc_regexp_parser/src/ast.rs | 53 +++++++------- .../src/body_parser/parser/parse.rs | 72 +++++++++---------- 2 files changed, 63 insertions(+), 62 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 08f8043154d28..6cc2fe97e200c 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -46,33 +46,47 @@ pub struct Alternative<'a> { #[derive(Debug)] pub enum RootNode<'a> { - Assertion(Assertion), + BoundaryAssertion(BoundaryAssertion), + LookAroundAssertion(Box<'a, LookAroundAssertion<'a>>), Quantifier(Box<'a, Quantifier<'a>>), - Value(Value), + Character(Character), Dot(Dot), CharacterClassEscape(CharacterClassEscape), UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), CharacterClass(Box<'a, CharacterClass<'a>>), CapturingGroup(Box<'a, CapturingGroup<'a>>), - LookAroundGroup(Box<'a, LookAroundGroup<'a>>), IgnoreGroup(Box<'a, IgnoreGroup<'a>>), IndexedReference(IndexedReference), NamedReference(Box<'a, NamedReference<'a>>), } #[derive(Debug)] -pub struct Assertion { +pub struct BoundaryAssertion { pub span: Span, - pub kind: AssertionKind, + pub kind: BoundaryAssertionKind, } #[derive(Debug)] -pub enum AssertionKind { +pub enum BoundaryAssertionKind { Start, End, Boundary, NegativeBoundary, } +#[derive(Debug)] +pub struct LookAroundAssertion<'a> { + pub span: Span, + pub kind: LookAroundAssertionKind, + pub body: Disjunction<'a>, +} +#[derive(Debug)] +pub enum LookAroundAssertionKind { + Lookahead, + NegativeLookahead, + Lookbehind, + NegativeLookbehind, +} + #[derive(Debug)] pub struct Quantifier<'a> { pub span: Span, @@ -83,13 +97,13 @@ pub struct Quantifier<'a> { } #[derive(Debug)] -pub struct Value { +pub struct Character { pub span: Span, - pub kind: ValueKind, + pub kind: CharacterKind, pub value: u32, } #[derive(Debug)] -pub enum ValueKind { +pub enum CharacterKind { ControlLetter, HexadecimalEscape, Identifier, @@ -127,6 +141,7 @@ pub struct UnicodePropertyEscape<'a> { pub negative: bool, pub name: SpanAtom<'a>, pub value: Option>, + // TODO: Should add strings related flag? } #[derive(Debug)] @@ -147,13 +162,13 @@ pub enum CharacterClassBody<'a> { CharacterClassRange(Box<'a, CharacterClassRange>), CharacterClassEscape(CharacterClassEscape), UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), - Value(Value), + Character(Character), } #[derive(Debug)] pub struct CharacterClassRange { pub span: Span, - pub min: Value, - pub max: Value, + pub min: Character, + pub max: Character, } #[derive(Debug)] @@ -163,20 +178,6 @@ pub struct CapturingGroup<'a> { pub body: Disjunction<'a>, } -#[derive(Debug)] -pub struct LookAroundGroup<'a> { - pub span: Span, - pub kind: LookAroundGroupKind, - pub body: Disjunction<'a>, -} -#[derive(Debug)] -pub enum LookAroundGroupKind { - Lookahead, - NegativeLookahead, - Lookbehind, - NegativeLookbehind, -} - #[derive(Debug)] pub struct IgnoreGroup<'a> { pub span: Span, diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 86f3b329c25c4..f5c3af401ee74 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -137,11 +137,11 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); if let Some(assertion) = self.parse_assertion()? { // `QuantifiableAssertion` = (Negative)Lookahead: `(?=...)` or `(?!...)` - if let ast::RootNode::LookAroundGroup(look_around) = &assertion { + if let ast::RootNode::LookAroundAssertion(look_around) = &assertion { if matches!( look_around.kind, - ast::LookAroundGroupKind::Lookahead - | ast::LookAroundGroupKind::NegativeLookahead + ast::LookAroundAssertionKind::Lookahead + | ast::LookAroundAssertionKind::NegativeLookahead ) { if let Some(((min, max), greedy)) = self.consume_quantifier()? { return Ok(Some(ast::RootNode::Quantifier(Box::new_in( @@ -205,32 +205,32 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); let kind = if self.reader.eat('^') { - Some(ast::AssertionKind::Start) + Some(ast::BoundaryAssertionKind::Start) } else if self.reader.eat('$') { - Some(ast::AssertionKind::End) + Some(ast::BoundaryAssertionKind::End) } else if self.reader.eat2('\\', 'b') { - Some(ast::AssertionKind::Boundary) + Some(ast::BoundaryAssertionKind::Boundary) } else if self.reader.eat2('\\', 'B') { - Some(ast::AssertionKind::NegativeBoundary) + Some(ast::BoundaryAssertionKind::NegativeBoundary) } else { None }; if let Some(kind) = kind { - return Ok(Some(ast::RootNode::Assertion(ast::Assertion { + return Ok(Some(ast::RootNode::BoundaryAssertion(ast::BoundaryAssertion { span: self.span_factory.create(span_start, self.reader.span_position()), kind, }))); } let kind = if self.reader.eat3('(', '?', '=') { - Some(ast::LookAroundGroupKind::Lookahead) + Some(ast::LookAroundAssertionKind::Lookahead) } else if self.reader.eat3('(', '?', '!') { - Some(ast::LookAroundGroupKind::NegativeLookahead) + Some(ast::LookAroundAssertionKind::NegativeLookahead) } else if self.reader.eat4('(', '?', '<', '=') { - Some(ast::LookAroundGroupKind::Lookbehind) + Some(ast::LookAroundAssertionKind::Lookbehind) } else if self.reader.eat4('(', '?', '<', '!') { - Some(ast::LookAroundGroupKind::NegativeLookbehind) + Some(ast::LookAroundAssertionKind::NegativeLookbehind) } else { None }; @@ -242,8 +242,8 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Unterminated lookaround group")); } - return Ok(Some(ast::RootNode::LookAroundGroup(Box::new_in( - ast::LookAroundGroup { + return Ok(Some(ast::RootNode::LookAroundAssertion(Box::new_in( + ast::LookAroundAssertion { span: self.span_factory.create(span_start, self.reader.span_position()), kind, body: disjunction, @@ -271,9 +271,9 @@ impl<'a> PatternParser<'a> { if let Some(cp) = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp)) { self.reader.advance(); - return Ok(Some(ast::RootNode::Value(ast::Value { + return Ok(Some(ast::RootNode::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::Symbol, + kind: ast::CharacterKind::Symbol, value: cp, }))); } @@ -341,9 +341,9 @@ impl<'a> PatternParser<'a> { // \ [lookahead = c] if self.reader.peek().filter(|&cp| cp == 'c' as u32).is_some() { - return Ok(Some(ast::RootNode::Value(ast::Value { + return Ok(Some(ast::RootNode::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::Symbol, + kind: ast::CharacterKind::Symbol, value: '\\' as u32, }))); } @@ -375,9 +375,9 @@ impl<'a> PatternParser<'a> { // ExtendedPatternCharacter if let Some(cp) = self.consume_extended_pattern_character() { - return Ok(Some(ast::RootNode::Value(ast::Value { + return Ok(Some(ast::RootNode::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::Symbol, + kind: ast::CharacterKind::Symbol, value: cp, }))); } @@ -420,7 +420,7 @@ impl<'a> PatternParser<'a> { // CharacterEscape: \n, \cM, \0, etc... if let Some(character_escape) = self.parse_character_escape(span_start)? { - return Ok(Some(ast::RootNode::Value(character_escape))); + return Ok(Some(ast::RootNode::Character(character_escape))); } // k GroupName: \k means named reference @@ -529,14 +529,14 @@ impl<'a> PatternParser<'a> { // IdentityEscape[?UnicodeMode, ?NamedCaptureGroups] // ``` // (Annex B) - fn parse_character_escape(&mut self, span_start: usize) -> Result> { + fn parse_character_escape(&mut self, span_start: usize) -> Result> { // e.g. \n if let Some(cp) = self.reader.peek().and_then(unicode::map_control_escape) { self.reader.advance(); - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::SingleEscape, + kind: ast::CharacterKind::SingleEscape, value: cp, })); } @@ -546,9 +546,9 @@ impl<'a> PatternParser<'a> { if self.reader.eat('c') { if let Some(cp) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { self.reader.advance(); - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::ControlLetter, + kind: ast::CharacterKind::ControlLetter, value: cp, })); } @@ -561,9 +561,9 @@ impl<'a> PatternParser<'a> { { self.reader.advance(); - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::Null, + kind: ast::CharacterKind::Null, value: 0x0000, })); } @@ -571,9 +571,9 @@ impl<'a> PatternParser<'a> { // e.g. \x41 if self.reader.eat('x') { if let Some(cp) = self.consume_fixed_hex_digits(2) { - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::HexadecimalEscape, + kind: ast::CharacterKind::HexadecimalEscape, value: cp, })); } @@ -583,9 +583,9 @@ impl<'a> PatternParser<'a> { // e.g. \u{1f600} if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::UnicodeEscape, + kind: ast::CharacterKind::UnicodeEscape, value: cp, })); } @@ -593,9 +593,9 @@ impl<'a> PatternParser<'a> { // e.g. \18 if !self.state.unicode_mode { if let Some(cp) = self.consume_legacy_octal_escape_sequence() { - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::Octal, + kind: ast::CharacterKind::Octal, value: cp, })); } @@ -603,9 +603,9 @@ impl<'a> PatternParser<'a> { // e.g. \. if let Some(cp) = self.consume_identity_escape() { - return Ok(Some(ast::Value { + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::ValueKind::Identifier, + kind: ast::CharacterKind::Identifier, value: cp, })); } From 27911e242fab1b079cc6bd5bbd3d3c3633cb7753 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 25 Jul 2024 15:20:14 +0900 Subject: [PATCH 088/143] Fix terms in AST --- crates/oxc_regexp_parser/src/ast.rs | 9 ++-- .../src/body_parser/parser/parse.rs | 50 +++++++++---------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 6cc2fe97e200c..8966921ad1720 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -41,14 +41,17 @@ pub struct Disjunction<'a> { #[derive(Debug)] pub struct Alternative<'a> { pub span: Span, - pub body: Vec<'a, RootNode<'a>>, + pub body: Vec<'a, Term<'a>>, } #[derive(Debug)] -pub enum RootNode<'a> { +pub enum Term<'a> { + // Assertion, QuantifiableAssertion BoundaryAssertion(BoundaryAssertion), LookAroundAssertion(Box<'a, LookAroundAssertion<'a>>), + // Quantifier Quantifier(Box<'a, Quantifier<'a>>), + // Atom, ExtendedAtom Character(Character), Dot(Dot), CharacterClassEscape(CharacterClassEscape), @@ -93,7 +96,7 @@ pub struct Quantifier<'a> { pub min: u32, pub max: Option, pub greedy: bool, - pub body: RootNode<'a>, + pub body: Term<'a>, } #[derive(Debug)] diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index f5c3af401ee74..4ddb8cc0f6c58 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -101,7 +101,7 @@ impl<'a> PatternParser<'a> { // [~UnicodeMode] ExtendedAtom[?NamedCaptureGroups] // ``` // (Annex B) - fn parse_term(&mut self) -> Result>> { + fn parse_term(&mut self) -> Result>> { // [+UnicodeMode] Assertion // [+UnicodeMode] Atom Quantifier // [+UnicodeMode] Atom @@ -113,7 +113,7 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); return match (self.parse_atom()?, self.consume_quantifier()?) { (Some(atom), Some(((min, max), greedy))) => { - Ok(Some(ast::RootNode::Quantifier(Box::new_in( + Ok(Some(ast::Term::Quantifier(Box::new_in( ast::Quantifier { span: self.span_factory.create(span_start, self.reader.span_position()), greedy, @@ -137,14 +137,14 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); if let Some(assertion) = self.parse_assertion()? { // `QuantifiableAssertion` = (Negative)Lookahead: `(?=...)` or `(?!...)` - if let ast::RootNode::LookAroundAssertion(look_around) = &assertion { + if let ast::Term::LookAroundAssertion(look_around) = &assertion { if matches!( look_around.kind, ast::LookAroundAssertionKind::Lookahead | ast::LookAroundAssertionKind::NegativeLookahead ) { if let Some(((min, max), greedy)) = self.consume_quantifier()? { - return Ok(Some(ast::RootNode::Quantifier(Box::new_in( + return Ok(Some(ast::Term::Quantifier(Box::new_in( ast::Quantifier { span: self .span_factory @@ -165,7 +165,7 @@ impl<'a> PatternParser<'a> { match (self.parse_extended_atom()?, self.consume_quantifier()?) { (Some(extended_atom), Some(((min, max), greedy))) => { - Ok(Some(ast::RootNode::Quantifier(Box::new_in( + Ok(Some(ast::Term::Quantifier(Box::new_in( ast::Quantifier { span: self.span_factory.create(span_start, self.reader.span_position()), min, @@ -201,7 +201,7 @@ impl<'a> PatternParser<'a> { // (?! Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` // (Annex B) - fn parse_assertion(&mut self) -> Result>> { + fn parse_assertion(&mut self) -> Result>> { let span_start = self.reader.span_position(); let kind = if self.reader.eat('^') { @@ -217,7 +217,7 @@ impl<'a> PatternParser<'a> { }; if let Some(kind) = kind { - return Ok(Some(ast::RootNode::BoundaryAssertion(ast::BoundaryAssertion { + return Ok(Some(ast::Term::BoundaryAssertion(ast::BoundaryAssertion { span: self.span_factory.create(span_start, self.reader.span_position()), kind, }))); @@ -242,7 +242,7 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Unterminated lookaround group")); } - return Ok(Some(ast::RootNode::LookAroundAssertion(Box::new_in( + return Ok(Some(ast::Term::LookAroundAssertion(Box::new_in( ast::LookAroundAssertion { span: self.span_factory.create(span_start, self.reader.span_position()), kind, @@ -264,14 +264,14 @@ impl<'a> PatternParser<'a> { // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` - fn parse_atom(&mut self) -> Result>> { + fn parse_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); // PatternCharacter if let Some(cp) = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp)) { self.reader.advance(); - return Ok(Some(ast::RootNode::Character(ast::Character { + return Ok(Some(ast::Term::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::Symbol, value: cp, @@ -280,7 +280,7 @@ impl<'a> PatternParser<'a> { // . if self.reader.eat('.') { - return Ok(Some(ast::RootNode::Dot(ast::Dot { + return Ok(Some(ast::Term::Dot(ast::Dot { span: self.span_factory.create(span_start, self.reader.span_position()), }))); } @@ -297,13 +297,13 @@ impl<'a> PatternParser<'a> { // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(ignore_group) = self.parse_ignore_group()? { - return Ok(Some(ast::RootNode::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); + return Ok(Some(ast::Term::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); } // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ( Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(capturing_group) = self.parse_capturing_group()? { - return Ok(Some(ast::RootNode::CapturingGroup(Box::new_in( + return Ok(Some(ast::Term::CapturingGroup(Box::new_in( capturing_group, self.allocator, )))); @@ -323,12 +323,12 @@ impl<'a> PatternParser<'a> { // InvalidBracedQuantifier // ExtendedPatternCharacter // ``` - fn parse_extended_atom(&mut self) -> Result>> { + fn parse_extended_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); // . if self.reader.eat('.') { - return Ok(Some(ast::RootNode::Dot(ast::Dot { + return Ok(Some(ast::Term::Dot(ast::Dot { span: self.span_factory.create(span_start, self.reader.span_position()), }))); } @@ -341,7 +341,7 @@ impl<'a> PatternParser<'a> { // \ [lookahead = c] if self.reader.peek().filter(|&cp| cp == 'c' as u32).is_some() { - return Ok(Some(ast::RootNode::Character(ast::Character { + return Ok(Some(ast::Term::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::Symbol, value: '\\' as u32, @@ -356,13 +356,13 @@ impl<'a> PatternParser<'a> { // (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(ignore_group) = self.parse_ignore_group()? { - return Ok(Some(ast::RootNode::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); + return Ok(Some(ast::Term::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); } // ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) // ( Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(capturing_group) = self.parse_capturing_group()? { - return Ok(Some(ast::RootNode::CapturingGroup(Box::new_in( + return Ok(Some(ast::Term::CapturingGroup(Box::new_in( capturing_group, self.allocator, )))); @@ -375,7 +375,7 @@ impl<'a> PatternParser<'a> { // ExtendedPatternCharacter if let Some(cp) = self.consume_extended_pattern_character() { - return Ok(Some(ast::RootNode::Character(ast::Character { + return Ok(Some(ast::Term::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::Symbol, value: cp, @@ -394,12 +394,12 @@ impl<'a> PatternParser<'a> { // [+NamedCaptureGroups] k GroupName[?UnicodeMode] // ``` // (Annex B) - fn parse_atom_escape(&mut self, span_start: usize) -> Result>> { + fn parse_atom_escape(&mut self, span_start: usize) -> Result>> { // DecimalEscape: \1 means indexed reference if let Some(index) = self.consume_decimal_escape() { // TODO: Check `CapturingGroupNumber` <= `CountLeftCapturingParensWithin` - return Ok(Some(ast::RootNode::IndexedReference(ast::IndexedReference { + return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { span: self.span_factory.create(span_start, self.reader.span_position()), index, }))); @@ -407,12 +407,12 @@ impl<'a> PatternParser<'a> { // CharacterClassEscape: \d, \p{...} if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { - return Ok(Some(ast::RootNode::CharacterClassEscape(character_class_escape))); + return Ok(Some(ast::Term::CharacterClassEscape(character_class_escape))); } if let Some(unicode_property_escape) = self.parse_character_class_escape_unicode(span_start)? { - return Ok(Some(ast::RootNode::UnicodePropertyEscape(Box::new_in( + return Ok(Some(ast::Term::UnicodePropertyEscape(Box::new_in( unicode_property_escape, self.allocator, )))); @@ -420,13 +420,13 @@ impl<'a> PatternParser<'a> { // CharacterEscape: \n, \cM, \0, etc... if let Some(character_escape) = self.parse_character_escape(span_start)? { - return Ok(Some(ast::RootNode::Character(character_escape))); + return Ok(Some(ast::Term::Character(character_escape))); } // k GroupName: \k means named reference if self.reader.eat('k') { if let Some(name) = self.consume_group_name()? { - return Ok(Some(ast::RootNode::NamedReference(Box::new_in( + return Ok(Some(ast::Term::NamedReference(Box::new_in( ast::NamedReference { span: self.span_factory.create(span_start, self.reader.span_position()), name, From 06cd580e7e5e27bbbba5c5b2c528ad14f1f93bc3 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 26 Jul 2024 09:41:19 +0900 Subject: [PATCH 089/143] Wip character_class --- crates/oxc_regexp_parser/README.md | 7 ++ crates/oxc_regexp_parser/src/ast.rs | 11 ++- .../src/body_parser/parser/parse.rs | 74 ++++++++++++++++++- 3 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 crates/oxc_regexp_parser/README.md diff --git a/crates/oxc_regexp_parser/README.md b/crates/oxc_regexp_parser/README.md new file mode 100644 index 0000000000000..5809f708bd625 --- /dev/null +++ b/crates/oxc_regexp_parser/README.md @@ -0,0 +1,7 @@ +# oxc_regexp_parser + +Follows ECMAScript® 2025 Language Specification + +- https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects +- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regular-expressions-patterns + diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 8966921ad1720..457f22028aac8 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -151,17 +151,20 @@ pub struct UnicodePropertyEscape<'a> { pub struct CharacterClass<'a> { pub span: Span, pub negative: bool, - pub kind: CharacterClassKind, - pub body: Vec<'a, CharacterClassBody<'a>>, + pub kind: CharacterClassContentsKind, + pub body: Vec<'a, CharacterClassContents<'a>>, } #[derive(Debug)] -pub enum CharacterClassKind { +pub enum CharacterClassContentsKind { + // NonemptyClassRanges + Ranges, + // ClassSetExpression Union, Intersection, Subtraction, } #[derive(Debug)] -pub enum CharacterClassBody<'a> { +pub enum CharacterClassContents<'a> { CharacterClassRange(Box<'a, CharacterClassRange>), CharacterClassEscape(CharacterClassEscape), UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 4ddb8cc0f6c58..440e56e97ab0e 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -293,7 +293,12 @@ impl<'a> PatternParser<'a> { } // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] - // TODO + if let Some(character_class) = self.parse_character_class()? { + return Ok(Some(ast::Term::CharacterClass(Box::new_in( + character_class, + self.allocator, + )))); + } // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(ignore_group) = self.parse_ignore_group()? { @@ -613,6 +618,73 @@ impl<'a> PatternParser<'a> { Ok(None) } + // ``` + // CharacterClass[UnicodeMode, UnicodeSetsMode] :: + // [ [lookahead ≠ ^] ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] + // [^ ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] + // ``` + fn parse_character_class(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if self.reader.eat('[') { + let negative = self.reader.eat('^'); + let (kind, body) = self.parse_class_contents()?; + + if self.reader.eat(']') { + return Ok(Some(ast::CharacterClass { + span: self.span_factory.create(span_start, self.reader.span_position()), + negative, + kind, + body, + })); + } + + return Err(OxcDiagnostic::error("Unterminated character class")); + } + + Ok(None) + } + + // ``` + // ClassContents[UnicodeMode, UnicodeSetsMode] :: + // [empty] + // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] + // [+UnicodeSetsMode] ClassSetExpression + // ``` + fn parse_class_contents( + &mut self, + ) -> Result<(ast::CharacterClassContentsKind, Vec<'a, ast::CharacterClassContents<'a>>)> { + // [empty] + if self.reader.peek().filter(|&cp| cp == ']' as u32).is_some() { + return Ok((ast::CharacterClassContentsKind::Union, Vec::new_in(self.allocator))); + } + + // [+UnicodeSetsMode] ClassSetExpression + if self.state.unicode_sets_mode { + return Err(OxcDiagnostic::error("TODO: ClassSetExpression")); + } + + // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] + let nonempty_class_ranges = self.parse_nonempty_class_ranges()?; + Ok((ast::CharacterClassContentsKind::Union, nonempty_class_ranges)) + } + + // ``` + // NonemptyClassRanges[UnicodeMode] :: + // ClassAtom[?UnicodeMode] + // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] + // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] + // ``` + fn parse_nonempty_class_ranges(&mut self) -> Result>> { + let body = Vec::new_in(self.allocator); + + if body.len() == 99 { + return Err(OxcDiagnostic::error("TODO")); + } + + Ok(body) + } + // ``` // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // From 9d09bcf75796ae2ba204f908db866eeb87bd7edd Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 26 Jul 2024 14:36:01 +0900 Subject: [PATCH 090/143] Add strings unicode flag --- crates/oxc_regexp_parser/src/ast.rs | 2 +- crates/oxc_regexp_parser/src/body_parser/parser/parse.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 457f22028aac8..698f19c1f0b8d 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -142,9 +142,9 @@ pub enum CharacterClassEscapeKind { pub struct UnicodePropertyEscape<'a> { pub span: Span, pub negative: bool, + pub strings: bool, pub name: SpanAtom<'a>, pub value: Option>, - // TODO: Should add strings related flag? } #[derive(Debug)] diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 440e56e97ab0e..5c1869acb08e7 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -513,6 +513,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::UnicodePropertyEscape { span: self.span_factory.create(span_start, self.reader.span_position()), negative, + strings: is_strings_related, name, value, })); From 04febf171e05d4c486e766200c980da14cefde11 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 10:56:22 +0900 Subject: [PATCH 091/143] Apply fmt --- crates/oxc_regexp_parser/src/ast.rs | 7 +- .../src/body_parser/parser/parse.rs | 221 +++++++++++++++++- 2 files changed, 216 insertions(+), 12 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 698f19c1f0b8d..35e2b72ac6c24 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -99,13 +99,13 @@ pub struct Quantifier<'a> { pub body: Term<'a>, } -#[derive(Debug)] +#[derive(Debug, Copy, Clone)] pub struct Character { pub span: Span, pub kind: CharacterKind, pub value: u32, } -#[derive(Debug)] +#[derive(Debug, Copy, Clone)] pub enum CharacterKind { ControlLetter, HexadecimalEscape, @@ -156,9 +156,6 @@ pub struct CharacterClass<'a> { } #[derive(Debug)] pub enum CharacterClassContentsKind { - // NonemptyClassRanges - Ranges, - // ClassSetExpression Union, Intersection, Subtraction, diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 5c1869acb08e7..5b3e964bce306 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -666,8 +666,11 @@ impl<'a> PatternParser<'a> { } // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] - let nonempty_class_ranges = self.parse_nonempty_class_ranges()?; - Ok((ast::CharacterClassContentsKind::Union, nonempty_class_ranges)) + if let Some(nonempty_class_ranges) = self.parse_nonempty_class_ranges()? { + return Ok((ast::CharacterClassContentsKind::Union, nonempty_class_ranges)); + } + + Err(OxcDiagnostic::error("Empty class ranges")) } // ``` @@ -676,14 +679,218 @@ impl<'a> PatternParser<'a> { // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] // ``` - fn parse_nonempty_class_ranges(&mut self) -> Result>> { - let body = Vec::new_in(self.allocator); + fn parse_nonempty_class_ranges( + &mut self, + ) -> Result>>> { + let Some(class_atom) = self.parse_class_atom()? else { + return Err(OxcDiagnostic::error("Empty class atom")); + }; + + // ClassAtom[?UnicodeMode] + if self.reader.peek().filter(|&cp| cp == ']' as u32).is_some() { + let mut body = Vec::new_in(self.allocator); + body.push(class_atom); + return Ok(Some(body)); + } + + // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] + if self.reader.peek().filter(|&cp| cp == '-' as u32).is_some() + && self.reader.peek2().filter(|&cp| cp != ']' as u32).is_some() + { + let span_start = self.reader.span_position(); + self.reader.advance(); + let dash = ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: '-' as u32, + }); + + let Some(class_atom_to) = self.parse_class_atom()? else { + return Err(OxcDiagnostic::error("Missing class atom pair")); + }; + + let mut body = Vec::new_in(self.allocator); + if let ( + ast::CharacterClassContents::Character(from), + ast::CharacterClassContents::Character(to), + ) = (&class_atom, &class_atom_to) + { + body.push(ast::CharacterClassContents::CharacterClassRange(Box::new_in( + ast::CharacterClassRange { + span: from.span.merge(&to.span), + min: *from, + max: *to, + }, + self.allocator, + ))); + } else { + if self.state.unicode_mode { + return Err(OxcDiagnostic::error("Invalid character class range")); + } + + body.push(class_atom); + body.push(dash); + body.push(class_atom_to); + } + + let (_, class_contents) = self.parse_class_contents()?; + body.extend(class_contents); + + return Ok(Some(body)); + } + + // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] + // `NoDash` part is already covered + let Some(class_ranges) = self.parse_nonempty_class_ranges()? else { + return Err(OxcDiagnostic::error("Missing class ranges")); + }; + + let mut body = Vec::new_in(self.allocator); + body.push(class_atom); + body.extend(class_ranges); + + Ok(Some(body)) + } + + // ``` + // ClassAtom[UnicodeMode] :: + // - + // ClassAtomNoDash[?UnicodeMode] + // ``` + fn parse_class_atom(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + if self.reader.eat('-') { + return Ok(Some(ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: '-' as u32, + }))); + } + + self.parse_class_atom_no_dash() + } + + // ``` + // ClassAtomNoDash[UnicodeMode, NamedCaptureGroups] :: + // SourceCharacter but not one of \ or ] or - + // \ ClassEscape[?UnicodeMode, ?NamedCaptureGroups] + // \ [lookahead = c] + // ``` + // (Annex B) + fn parse_class_atom_no_dash(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + + if let Some(cp) = self + .reader + .peek() + .filter(|&cp| cp != '\\' as u32 && cp != ']' as u32 && cp != '-' as u32) + { + self.reader.advance(); + + return Ok(Some(ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: cp, + }))); + } + + if self.reader.eat('\\') { + if self.reader.peek().filter(|&cp| cp == 'c' as u32).is_some() { + return Ok(Some(ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: '\\' as u32, + }))); + } + + if let Some(class_escape) = self.parse_class_escape(span_start)? { + return Ok(Some(class_escape)); + } + + return Err(OxcDiagnostic::error("Invalid class escape")); + } + + Ok(None) + } + + // ``` + // ClassEscape[UnicodeMode, NamedCaptureGroups] :: + // b + // [+UnicodeMode] - + // [~UnicodeMode] c ClassControlLetter + // CharacterClassEscape[?UnicodeMode] + // CharacterEscape[?UnicodeMode, ?NamedCaptureGroups] + // + // ClassControlLetter :: + // DecimalDigit + // _ + // ``` + // (Annex B) + fn parse_class_escape( + &mut self, + span_start: usize, + ) -> Result>> { + // b + if self.reader.eat('b') { + return Ok(Some(ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: 'b' as u32, + }))); + } - if body.len() == 99 { - return Err(OxcDiagnostic::error("TODO")); + // [+UnicodeMode] - + if self.state.unicode_mode && self.reader.eat('-') { + return Ok(Some(ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: '-' as u32, + }))); + } + + // [~UnicodeMode] c ClassControlLetter + if !self.state.unicode_mode { + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('c') { + if let Some(cp) = self + .reader + .peek() + .filter(|&cp| unicode::is_decimal_digit(cp) || cp == '-' as u32) + { + self.reader.advance(); + + return Ok(Some(ast::CharacterClassContents::Character(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::ControlLetter, + value: cp, + }))); + } + + self.reader.rewind(checkpoint); + } } - Ok(body) + // CharacterClassEscape[?UnicodeMode] + if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { + return Ok(Some(ast::CharacterClassContents::CharacterClassEscape( + character_class_escape, + ))); + } + if let Some(unicode_property_escape) = + self.parse_character_class_escape_unicode(span_start)? + { + return Ok(Some(ast::CharacterClassContents::UnicodePropertyEscape(Box::new_in( + unicode_property_escape, + self.allocator, + )))); + } + + // CharacterEscape[?UnicodeMode, ?NamedCaptureGroups] + if let Some(character_escape) = self.parse_character_escape(span_start)? { + return Ok(Some(ast::CharacterClassContents::Character(character_escape))); + } + + Ok(None) } // ``` From 55c214db2082d5dbc5675e776a3882bd92c6389c Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 11:18:18 +0900 Subject: [PATCH 092/143] Finish legacy character class --- .../src/body_parser/parser/mod.rs | 20 +++++++++++++------ .../src/body_parser/parser/parse.rs | 7 ++++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index ec9d9143c018c..7f3c42a76421c 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -1,5 +1,3 @@ -/// Main entry point for `PatternParser` -/// All others are just split files to `impl PatternParser` mod parse; pub use parse::PatternParser; @@ -39,11 +37,21 @@ mod test { ("(?:abc)", ParserOptions::default()), ("a]", ParserOptions::default()), ("a}", ParserOptions::default()), + ("]", ParserOptions::default()), + ("[]", ParserOptions::default()), + ("[a]", ParserOptions::default()), + ("[ab]", ParserOptions::default()), + ("[a-b]", ParserOptions::default()), + ("[-]", ParserOptions::default()), + ("[a-]", ParserOptions::default()), + ("[-a]", ParserOptions::default()), + ("[-a-]", ParserOptions::default()), + (r"[a\-b]", ParserOptions::default()), ] { - assert!( - PatternParser::new(&allocator, source_text, *options).parse().is_ok(), - "{source_text} should be parsed with {options:?}!", - ); + let res = PatternParser::new(&allocator, source_text, *options).parse(); + if let Err(err) = res { + panic!("Failed to parse {source_text} with {options:?}\n💥 {err}"); + } } } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 5b3e964bce306..718eee774afa5 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -357,7 +357,12 @@ impl<'a> PatternParser<'a> { } // CharacterClass[~UnicodeMode, ~UnicodeSetsMode] - // TODO + if let Some(character_class) = self.parse_character_class()? { + return Ok(Some(ast::Term::CharacterClass(Box::new_in( + character_class, + self.allocator, + )))); + } // (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(ignore_group) = self.parse_ignore_group()? { From 68393b5f6d5c587f68df06e5e5c444f5e2593b65 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 11:37:02 +0900 Subject: [PATCH 093/143] Update tests --- .../src/body_parser/parser/mod.rs | 58 +++++++++++-------- .../src/body_parser/parser/parse.rs | 2 +- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index 7f3c42a76421c..6bd511fd712d6 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -18,6 +18,8 @@ mod test { ("a+", ParserOptions::default()), ("a*", ParserOptions::default()), ("a?", ParserOptions::default()), + ("(?=a){1}", ParserOptions::default()), + ("(?!a){1}", ParserOptions::default()), ("a{1}", ParserOptions::default()), ("a{1,}", ParserOptions::default()), ("a{1,2}", ParserOptions::default()), @@ -47,6 +49,12 @@ mod test { ("[-a]", ParserOptions::default()), ("[-a-]", ParserOptions::default()), (r"[a\-b]", ParserOptions::default()), + (r"[-a-b]", ParserOptions::default()), + (r"[a-b-]", ParserOptions::default()), + (r"[a\-b-]", ParserOptions::default()), + (r"[\[\]\-]", ParserOptions::default()), + ("[a-z0-9]", ParserOptions::default()), + ("[a-a]", ParserOptions::default()), ] { let res = PatternParser::new(&allocator, source_text, *options).parse(); if let Err(err) = res { @@ -61,33 +69,35 @@ mod test { for (source_text, options) in &[ ("a)", ParserOptions::default()), - (r"b\", ParserOptions::default()), - ("c]", ParserOptions::default().with_unicode_flags(true, false)), - ("d}", ParserOptions::default().with_unicode_flags(true, false)), - ("e|+", ParserOptions::default()), - ("f|{", ParserOptions::default()), - ("g{", ParserOptions::default()), - ("g{1", ParserOptions::default()), - ("g{1,", ParserOptions::default()), - ("g{,", ParserOptions::default()), - ("g{2,1}", ParserOptions::default()), - ("(?=h", ParserOptions::default()), - ("(?", ParserOptions::default()), + (r"\p{Emoji_Presentation", ParserOptions::default().with_unicode_flags(true, false)), + (r"\p{Script=", ParserOptions::default().with_unicode_flags(true, false)), + (r"\ka", ParserOptions::default().with_unicode_flags(true, false)), + (r"\k<", ParserOptions::default().with_unicode_flags(true, false)), + (r"\k", ParserOptions::default()), + ("(?=a){1}", ParserOptions::default().with_unicode_flags(true, false)), + ("(?!a){1}", ParserOptions::default().with_unicode_flags(true, false)), ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 718eee774afa5..4eee339ccddb1 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -239,7 +239,7 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated lookaround group")); + return Err(OxcDiagnostic::error("Unterminated lookaround assertion")); } return Ok(Some(ast::Term::LookAroundAssertion(Box::new_in( From 72955309fb092b31f569cd597e53270dd307900d Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 12:24:40 +0900 Subject: [PATCH 094/143] Wip SS:EarlyErrors --- crates/oxc_regexp_parser/src/body_parser/parser/mod.rs | 5 +++++ .../oxc_regexp_parser/src/body_parser/parser/parse.rs | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index 6bd511fd712d6..a6d4f3cc93970 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -55,6 +55,7 @@ mod test { (r"[\[\]\-]", ParserOptions::default()), ("[a-z0-9]", ParserOptions::default()), ("[a-a]", ParserOptions::default()), + (r"[\d-\D]", ParserOptions::default()), ] { let res = PatternParser::new(&allocator, source_text, *options).parse(); if let Err(err) = res { @@ -92,12 +93,16 @@ mod test { (r"\p{Script=", ParserOptions::default().with_unicode_flags(true, false)), (r"\ka", ParserOptions::default().with_unicode_flags(true, false)), (r"\k<", ParserOptions::default().with_unicode_flags(true, false)), + (r"\k<>", ParserOptions::default()), + (r"\k<>", ParserOptions::default().with_unicode_flags(true, false)), (r"\k", ParserOptions::default()), ("(?=a){1}", ParserOptions::default().with_unicode_flags(true, false)), ("(?!a){1}", ParserOptions::default().with_unicode_flags(true, false)), + (r"[\d-\D]", ParserOptions::default().with_unicode_flags(true, false)), + ("[z-a]", ParserOptions::default()), ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 4eee339ccddb1..890d3ffc43c99 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -380,6 +380,7 @@ impl<'a> PatternParser<'a> { // InvalidBracedQuantifier if self.consume_quantifier()?.is_some() { + // (Annex B) [SS:EE] It is a Syntax Error if any source text is matched by this production. return Err(OxcDiagnostic::error("Invalid braced quantifier")); } @@ -445,6 +446,7 @@ impl<'a> PatternParser<'a> { )))); } + // [SS:EE] It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. return Err(OxcDiagnostic::error("Invalid named reference")); } @@ -720,6 +722,11 @@ impl<'a> PatternParser<'a> { ast::CharacterClassContents::Character(to), ) = (&class_atom, &class_atom_to) { + // [SS:EE] It is a Syntax Error if IsCharacterClass of the first ClassAtom is false, IsCharacterClass of the second ClassAtom is false, and the CharacterValue of the first ClassAtom is strictly greater than the CharacterValue of the second ClassAtom. + if to.value < from.value { + return Err(OxcDiagnostic::error("Character class range out of order")); + } + body.push(ast::CharacterClassContents::CharacterClassRange(Box::new_in( ast::CharacterClassRange { span: from.span.merge(&to.span), @@ -729,6 +736,8 @@ impl<'a> PatternParser<'a> { self.allocator, ))); } else { + // [SS:EE] It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. + // (Annex B) if self.state.unicode_mode { return Err(OxcDiagnostic::error("Invalid character class range")); } @@ -1009,6 +1018,7 @@ impl<'a> PatternParser<'a> { if let Some(max) = self.consume_decimal_digits() { if self.reader.eat('}') { if max < min { + // [SS:EE] It is a Syntax Error if the MV of the first DecimalDigits is strictly greater than the MV of the second DecimalDigits. return Err(OxcDiagnostic::error( "Numbers out of order in braced quantifier", )); From 9c495e6175826b891e9fd0a8d21356eb250799a7 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 13:23:38 +0900 Subject: [PATCH 095/143] Wip early errors --- .../src/body_parser/parser/parse.rs | 128 +++++++++++------- .../src/body_parser/unicode.rs | 7 + 2 files changed, 85 insertions(+), 50 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 890d3ffc43c99..842309a25e389 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -380,7 +380,9 @@ impl<'a> PatternParser<'a> { // InvalidBracedQuantifier if self.consume_quantifier()?.is_some() { - // (Annex B) [SS:EE] It is a Syntax Error if any source text is matched by this production. + // [SS:EE] ExtendedAtom :: InvalidBracedQuantifier + // It is a Syntax Error if any source text is matched by this production. + // (Annex B) return Err(OxcDiagnostic::error("Invalid braced quantifier")); } @@ -446,7 +448,8 @@ impl<'a> PatternParser<'a> { )))); } - // [SS:EE] It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. + // [SS:EE] AtomEscape :: k GroupName + // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. return Err(OxcDiagnostic::error("Invalid named reference")); } @@ -722,7 +725,9 @@ impl<'a> PatternParser<'a> { ast::CharacterClassContents::Character(to), ) = (&class_atom, &class_atom_to) { - // [SS:EE] It is a Syntax Error if IsCharacterClass of the first ClassAtom is false, IsCharacterClass of the second ClassAtom is false, and the CharacterValue of the first ClassAtom is strictly greater than the CharacterValue of the second ClassAtom. + // [SS:EE] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents + // [SS:EE] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents + // It is a Syntax Error if IsCharacterClass of the first ClassAtom is false, IsCharacterClass of the second ClassAtom is false, and the CharacterValue of the first ClassAtom is strictly greater than the CharacterValue of the second ClassAtom. if to.value < from.value { return Err(OxcDiagnostic::error("Character class range out of order")); } @@ -736,7 +741,9 @@ impl<'a> PatternParser<'a> { self.allocator, ))); } else { - // [SS:EE] It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. + // [SS:EE] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents + // [SS:EE] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents + // It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. // (Annex B) if self.state.unicode_mode { return Err(OxcDiagnostic::error("Invalid character class range")); @@ -1018,7 +1025,8 @@ impl<'a> PatternParser<'a> { if let Some(max) = self.consume_decimal_digits() { if self.reader.eat('}') { if max < min { - // [SS:EE] It is a Syntax Error if the MV of the first DecimalDigits is strictly greater than the MV of the second DecimalDigits. + // [SS:EE] QuantifierPrefix :: { DecimalDigits , DecimalDigits } + // It is a Syntax Error if the MV of the first DecimalDigits is strictly greater than the MV of the second DecimalDigits. return Err(OxcDiagnostic::error( "Numbers out of order in braced quantifier", )); @@ -1211,6 +1219,63 @@ impl<'a> PatternParser<'a> { if self.reader.eat('\\') { if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + // [SS:EE] RegExpIdentifierStart :: \ RegExpUnicodeEscapeSequence + // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierStartChar lexical grammar production. + if !unicode::is_identifier_start_char(cp) { + return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + } + + return Ok(Some(cp)); + } + } + + if !self.state.unicode_mode { + if let Some(lead_surrogate) = + self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if let Some(trail_surrogate) = + self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) + { + self.reader.advance(); + self.reader.advance(); + let cp = unicode::combine_surrogate_pair(lead_surrogate, trail_surrogate); + + // [SS:EE] RegExpIdentifierStart :: UnicodeLeadSurrogate UnicodeTrailSurrogate + // It is a Syntax Error if the RegExpIdentifierCodePoint of RegExpIdentifierStart is not matched by the UnicodeIDStart lexical grammar production. + if !unicode::is_unicode_id_start(cp) { + return Err(OxcDiagnostic::error("Invalid surrogate pair")); + } + + return Ok(Some(cp)); + } + } + } + + Ok(None) + } + + // ``` + // RegExpIdentifierPart[UnicodeMode] :: + // IdentifierPartChar + // \ RegExpUnicodeEscapeSequence[+UnicodeMode] + // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate + // ``` + fn consume_reg_exp_idenfigier_part(&mut self) -> Result> { + if let Some(cp) = self.reader.peek() { + if unicode::is_identifier_part_char(cp) { + self.reader.advance(); + return Ok(Some(cp)); + } + } + + if self.reader.eat('\\') { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + // [SS:EE] RegExpIdentifierPart :: \ RegExpUnicodeEscapeSequence + // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierPartChar lexical grammar production. + if !unicode::is_identifier_part_char(cp) { + return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + } + return Ok(Some(cp)); } } @@ -1225,10 +1290,14 @@ impl<'a> PatternParser<'a> { self.reader.advance(); self.reader.advance(); - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); + let cp = unicode::combine_surrogate_pair(lead_surrogate, trail_surrogate); + // [SS:EE] RegExpIdentifierPart :: UnicodeLeadSurrogate UnicodeTrailSurrogate + // It is a Syntax Error if the RegExpIdentifierCodePoint of RegExpIdentifierPart is not matched by the UnicodeIDContinue lexical grammar production. + if !unicode::is_unicode_id_continue(cp) { + return Err(OxcDiagnostic::error("Invalid surrogate pair")); + } + + return Ok(Some(cp)); } } } @@ -1312,47 +1381,6 @@ impl<'a> PatternParser<'a> { Err(OxcDiagnostic::error("Invalid unicode escape")) } - // ``` - // RegExpIdentifierPart[UnicodeMode] :: - // IdentifierPartChar - // \ RegExpUnicodeEscapeSequence[+UnicodeMode] - // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate - // ``` - fn consume_reg_exp_idenfigier_part(&mut self) -> Result> { - if let Some(cp) = self.reader.peek() { - if unicode::is_identifier_part_char(cp) { - self.reader.advance(); - return Ok(Some(cp)); - } - } - - if self.reader.eat('\\') { - if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { - return Ok(Some(cp)); - } - } - - if !self.state.unicode_mode { - if let Some(lead_surrogate) = - self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if let Some(trail_surrogate) = - self.reader.peek2().filter(|&cp| unicode::is_trail_surrogate(cp)) - { - self.reader.advance(); - self.reader.advance(); - - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); - } - } - } - - Ok(None) - } - // ``` // LegacyOctalEscapeSequence :: // 0 [lookahead ∈ { 8, 9 }] diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index ac4412613dadd..3f387e1f988c5 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -43,6 +43,13 @@ pub fn is_unicode_property_value_character(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_alphanumeric() || c == '_') } +pub fn is_unicode_id_start(cp: u32) -> bool { + char::from_u32(cp).map_or(false, unicode_id_start::is_id_start) +} +pub fn is_unicode_id_continue(cp: u32) -> bool { + char::from_u32(cp).map_or(false, unicode_id_start::is_id_continue) +} + pub fn is_identifier_start_char(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_start(c) || c == '$' || c == '_') } From 61cd500a0ce1ec770469dc0aca050493eb271344 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 15:31:47 +0900 Subject: [PATCH 096/143] Implement unicode_property checks --- Cargo.lock | 1 + crates/oxc_regexp_parser/Cargo.toml | 1 + .../src/body_parser/parser/parse.rs | 40 +- .../src/body_parser/unicode_property.rs | 355 +++++++++++++++++- 4 files changed, 376 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 549ee93b01fcf..e2cdde58fb058 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1694,6 +1694,7 @@ dependencies = [ "oxc_allocator", "oxc_diagnostics", "oxc_span", + "phf", "rustc-hash", "unicode-id-start", ] diff --git a/crates/oxc_regexp_parser/Cargo.toml b/crates/oxc_regexp_parser/Cargo.toml index 3e3704d3e9e04..7aa81556361e1 100644 --- a/crates/oxc_regexp_parser/Cargo.toml +++ b/crates/oxc_regexp_parser/Cargo.toml @@ -24,5 +24,6 @@ oxc_allocator = { workspace = true } oxc_diagnostics = { workspace = true } oxc_span = { workspace = true } +phf = { workspace = true, features = ["macros"] } rustc-hash = { workspace = true } unicode-id-start = { workspace = true } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 842309a25e389..3d745251a6e29 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -515,6 +515,8 @@ impl<'a> PatternParser<'a> { if let Some((name, value, is_strings_related)) = self.consume_unicode_property_value_expression()? { + // [SS:EE] CharacterClassEscape :: P{ UnicodePropertyValueExpression } + // It is a Syntax Error if MayContainStrings of the UnicodePropertyValueExpression is true. if negative && is_strings_related { return Err(OxcDiagnostic::error("Invalid property name")); } @@ -641,6 +643,19 @@ impl<'a> PatternParser<'a> { let negative = self.reader.eat('^'); let (kind, body) = self.parse_class_contents()?; + // [SS:EE] CharacterClass :: [^ ClassContents ] + // It is a Syntax Error if MayContainStrings of the ClassContents is true. + if negative + && body.iter().any(|item| match item { + ast::CharacterClassContents::UnicodePropertyEscape(unicode_propery_escape) => { + unicode_propery_escape.strings + } + _ => false, + }) + { + return Err(OxcDiagnostic::error("Invalid character class")); + } + if self.reader.eat(']') { return Ok(Some(ast::CharacterClass { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -1098,11 +1113,15 @@ impl<'a> PatternParser<'a> { if let Some(name) = self.consume_unicode_property_name() { if self.reader.eat('=') { if let Some(value) = self.consume_unicode_property_value() { - if unicode_property::is_valid_unicode_property(&name, &value) { - return Ok(Some((name, Some(value), false))); + // [SS:EE] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue + // It is a Syntax Error if the source text matched by UnicodePropertyName is not a Unicode property name or property alias listed in the “Property name and aliases” column of Table 65. + // [SS:EE] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue + // It is a Syntax Error if the source text matched by UnicodePropertyValue is not a property value or property value alias for the Unicode property or property alias given by the source text matched by UnicodePropertyName listed in PropertyValueAliases.txt. + if !unicode_property::is_valid_unicode_property(&name, &value) { + return Err(OxcDiagnostic::error("Invalid property name")); } - return Err(OxcDiagnostic::error("Invalid property name")); + return Ok(Some((name, Some(value), false))); } } } @@ -1110,22 +1129,21 @@ impl<'a> PatternParser<'a> { // LoneUnicodePropertyNameOrValue if let Some(name_or_value) = self.consume_unicode_property_value() { + // [SS:EE] UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue + // It is a Syntax Error if the source text matched by LoneUnicodePropertyNameOrValue is not a Unicode property value or property value alias for the General_Category (gc) property listed in PropertyValueAliases.txt, nor a binary property or binary property alias listed in the “Property name and aliases” column of Table 66, nor a binary property of strings listed in the “Property name” column of Table 67. if unicode_property::is_valid_unicode_property("General_Category", &name_or_value) { return Ok(Some(("General_Category".into(), Some(name_or_value), false))); } - if unicode_property::is_valid_lone_unicode_property(&name_or_value) { return Ok(Some((name_or_value, None, false))); } - + // [SS:EE] UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue + // It is a Syntax Error if the enclosing Pattern does not have a [UnicodeSetsMode] parameter and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings listed in the “Property name” column of Table 67. if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { - // Early errors: - // It is a Syntax Error - // - if the enclosing Pattern does not have a [UnicodeSetsMode] parameter - // - and the source text matched by LoneUnicodePropertyNameOrValue is a binary property of strings - // - listed in the “Property name” column of Table 68. if !self.state.unicode_sets_mode { - return Err(OxcDiagnostic::error("Syntax Error")); + return Err(OxcDiagnostic::error( + "UnicodeSetsMode is required for binary property of strings", + )); } return Ok(Some((name_or_value, None, true))); diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs index dccea49d889b8..f071a38397285 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs @@ -1,15 +1,350 @@ -pub fn is_valid_unicode_property(_name: &str, _value: &str) -> bool { - // TODO: Implement - true -} +use phf::{phf_set, Set}; -pub fn is_valid_lone_unicode_property(_name_or_value: &str) -> bool { - // TODO: Implement - true +// https://tc39.es/ecma262/multipage/text-processing.html#table-nonbinary-unicode-properties +pub fn is_valid_unicode_property(name: &str, value: &str) -> bool { + if matches!(name, "General_Category" | "gc") { + return GC_PROPERTY_VALUES.contains(value); + } + if matches!(name, "Script" | "sc") { + return SC_PROPERTY_VALUES.contains(value); + } + if matches!(name, "Script_Extensions" | "scx") { + return SC_PROPERTY_VALUES.contains(value) || SCX_PROPERTY_VALUES.contains(value); + } + false } +pub fn is_valid_lone_unicode_property(name_or_value: &str) -> bool { + BINARY_UNICODE_PROPERTIES.contains(name_or_value) +} /// This should be used with `unicode_sets_mode` -pub fn is_valid_lone_unicode_property_of_strings(_name_or_value: &str) -> bool { - // TODO: Implement - true +pub fn is_valid_lone_unicode_property_of_strings(name_or_value: &str) -> bool { + BINARY_UNICODE_PROPERTIES_OF_STRINGS.contains(name_or_value) } + +// https://unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt +static GC_PROPERTY_VALUES: Set<&'static str> = phf_set! { +"C", "Other", +"Cc", "Control", +"Cf", "Format", +"Cn", "Unassigned", +"Co", "Private_Use", +"Cs", "Surrogate", +"L", "Letter", +"LC", "Cased_Letter", +"Ll", "Lowercase_Letter", +"Lm", "Modifier_Letter", +"Lo", "Other_Letter", +"Lt", "Titlecase_Letter", +"Lu", "Uppercase_Letter", +"M", "Mark", +"Mc", "Spacing_Mark", +"Me", "Enclosing_Mark", +"Mn", "Nonspacing_Mark", +"N", "Number", +"Nd", "Decimal_Number", +"Nl", "Letter_Number", +"No", "Other_Number", +"P", "Punctuation", +"Pc", "Connector_Punctuation", +"Pd", "Dash_Punctuation", +"Pe", "Close_Punctuation", +"Pf", "Final_Punctuation", +"Pi", "Initial_Punctuation", +"Po", "Other_Punctuation", +"Ps", "Open_Punctuation", +"S", "Symbol", +"Sc", "Currency_Symbol", +"Sk", "Modifier_Symbol", +"Sm", "Math_Symbol", +"So", "Other_Symbol", +"Z", "Separator", +"Zl", "Line_Separator", +"Zp", "Paragraph_Separator", +"Zs", "Space_Separator" +}; +static SC_PROPERTY_VALUES: Set<&'static str> = phf_set! { +"Adlm", "Adlam", +"Aghb", "Caucasian_Albanian", +"Ahom", +"Arab", "Arabic", +"Armi", "Imperial_Aramaic", +"Armn", "Armenian", +"Avst", "Avestan", +"Bali", "Balinese", +"Bamu", "Bamum", +"Bass", "Bassa_Vah", +"Batk", "Batak", +"Beng", "Bengali", +"Bhks", "Bhaiksuki", +"Bopo", "Bopomofo", +"Brah", "Brahmi", +"Brai", "Braille", +"Bugi", "Buginese", +"Buhd", "Buhid", +"Cakm", "Chakma", +"Cans", "Canadian_Aboriginal", +"Cari", "Carian", +"Cham", +"Cher", "Cherokee", +"Chrs", "Chorasmian", +"Copt", "Coptic", +"Cpmn", "Cypro_Minoan", +"Cprt", "Cypriot", +"Cyrl", "Cyrillic", +"Deva", "Devanagari", +"Diak", "Dives_Akuru", +"Dogr", "Dogra", +"Dsrt", "Deseret", +"Dupl", "Duployan", +"Egyp", "Egyptian_Hieroglyphs", +"Elba", "Elbasan", +"Elym", "Elymaic", +"Ethi", "Ethiopic", +"Geor", "Georgian", +"Glag", "Glagolitic", +"Gong", "Gunjala_Gondi", +"Gonm", "Masaram_Gondi", +"Goth", "Gothic", +"Gran", "Grantha", +"Grek", "Greek", +"Gujr", "Gujarati", +"Guru", "Gurmukhi", +"Hang", "Hangul", +"Hani", "Han", +"Hano", "Hanunoo", +"Hatr", "Hatran", +"Hebr", "Hebrew", +"Hira", "Hiragana", +"Hluw", "Anatolian_Hieroglyphs", +"Hmng", "Pahawh_Hmong", +"Hmnp", "Nyiakeng_Puachue_Hmong", +"Hrkt", "Katakana_Or_Hiragana", +"Hung", "Old_Hungarian", +"Ital", "Old_Italic", +"Java", "Javanese", +"Kali", "Kayah_Li", +"Kana", "Katakana", +"Kawi", +"Khar", "Kharoshthi", +"Khmr", "Khmer", +"Khoj", "Khojki", +"Kits", "Khitan_Small_Script", +"Knda", "Kannada", +"Kthi", "Kaithi", +"Lana", "Tai_Tham", +"Laoo", "Lao", +"Latn", "Latin", +"Lepc", "Lepcha", +"Limb", "Limbu", +"Lina", "Linear_A", +"Linb", "Linear_B", +"Lisu", +"Lyci", "Lycian", +"Lydi", "Lydian", +"Mahj", "Mahajani", +"Maka", "Makasar", +"Mand", "Mandaic", +"Mani", "Manichaean", +"Marc", "Marchen", +"Medf", "Medefaidrin", +"Mend", "Mende_Kikakui", +"Merc", "Meroitic_Cursive", +"Mero", "Meroitic_Hieroglyphs", +"Mlym", "Malayalam", +"Modi", +"Mong", "Mongolian", +"Mroo", "Mro", +"Mtei", "Meetei_Mayek", +"Mult", "Multani", +"Mymr", "Myanmar", +"Nagm", "Nag_Mundari", +"Nand", "Nandinagari", +"Narb", "Old_North_Arabian", +"Nbat", "Nabataean", +"Newa", +"Nkoo", "Nko", +"Nshu", "Nushu", +"Ogam", "Ogham", +"Olck", "Ol_Chiki", +"Orkh", "Old_Turkic", +"Orya", "Oriya", +"Osge", "Osage", +"Osma", "Osmanya", +"Ougr", "Old_Uyghur", +"Palm", "Palmyrene", +"Pauc", "Pau_Cin_Hau", +"Perm", "Old_Permic", +"Phag", "Phags_Pa", +"Phli", "Inscriptional_Pahlavi", +"Phlp", "Psalter_Pahlavi", +"Phnx", "Phoenician", +"Plrd", "Miao", +"Prti", "Inscriptional_Parthian", +"Rjng", "Rejang", +"Rohg", "Hanifi_Rohingya", +"Runr", "Runic", +"Samr", "Samaritan", +"Sarb", "Old_South_Arabian", +"Saur", "Saurashtra", +"Sgnw", "SignWriting", +"Shaw", "Shavian", +"Shrd", "Sharada", +"Sidd", "Siddham", +"Sind", "Khudawadi", +"Sinh", "Sinhala", +"Sogd", "Sogdian", +"Sogo", "Old_Sogdian", +"Sora", "Sora_Sompeng", +"Soyo", "Soyombo", +"Sund", "Sundanese", +"Sylo", "Syloti_Nagri", +"Syrc", "Syriac", +"Tagb", "Tagbanwa", +"Takr", "Takri", +"Tale", "Tai_Le", +"Talu", "New_Tai_Lue", +"Taml", "Tamil", +"Tang", "Tangut", +"Tavt", "Tai_Viet", +"Telu", "Telugu", +"Tfng", "Tifinagh", +"Tglg", "Tagalog", +"Thaa", "Thaana", +"Thai", +"Tibt", "Tibetan", +"Tirh", "Tirhuta", +"Tnsa", "Tangsa", +"Toto", +"Ugar", "Ugaritic", +"Vaii", "Vai", +"Vith", "Vithkuqi", +"Wara", "Warang_Citi", +"Wcho", "Wancho", +"Xpeo", "Old_Persian", +"Xsux", "Cuneiform", +"Yezi", "Yezidi", +"Yiii", "Yi", +"Zanb", "Zanabazar_Square", +"Zinh", "Inherited", +"Zyyy", "Common", +"Zzzz", "Unknown" +}; +static SCX_PROPERTY_VALUES: Set<&'static str> = phf_set! { +// Empty +}; + +// Table 66: Binary Unicode property aliases +// https://tc39.es/ecma262/multipage/text-processing.html#table-binary-unicode-properties +static BINARY_UNICODE_PROPERTIES: Set<&'static str> = phf_set! { +"ASCII", +"ASCII_Hex_Digit", +"AHex", +"Alphabetic", +"Alpha", +"Any", +"Assigned", +"Bidi_Control", +"Bidi_C", +"Bidi_Mirrored", +"Bidi_M", +"Case_Ignorable", +"CI", +"Cased", +"Changes_When_Casefolded", +"CWCF", +"Changes_When_Casemapped", +"CWCM", +"Changes_When_Lowercased", +"CWL", +"Changes_When_NFKC_Casefolded", +"CWKCF", +"Changes_When_Titlecased", +"CWT", +"Changes_When_Uppercased", +"CWU", +"Dash", +"Default_Ignorable_Code_Point", +"DI", +"Deprecated", +"Dep", +"Diacritic", +"Dia", +"Emoji", +"Emoji_Component", +"EComp", +"Emoji_Modifier", +"EMod", +"Emoji_Modifier_Base", +"EBase", +"Emoji_Presentation", +"EPres", +"Extended_Pictographic", +"ExtPict", +"Extender", +"Ext", +"Grapheme_Base", +"Gr_Base", +"Grapheme_Extend", +"Gr_Ext", +"Hex_Digit", +"Hex", +"IDS_Binary_Operator", +"IDSB", +"IDS_Trinary_Operator", +"IDST", +"ID_Continue", +"IDC", +"ID_Start", +"IDS", +"Ideographic", +"Ideo", +"Join_Control", +"Join_C", +"Logical_Order_Exception", +"LOE", +"Lowercase", +"Lower", +"Math", +"Noncharacter_Code_Point", +"NChar", +"Pattern_Syntax", +"Pat_Syn", +"Pattern_White_Space", +"Pat_WS", +"Quotation_Mark", +"QMark", +"Radical", +"Regional_Indicator", +"RI", +"Sentence_Terminal", +"STerm", +"Soft_Dotted", +"SD", +"Terminal_Punctuation", +"Term", +"Unified_Ideograph", +"UIdeo", +"Uppercase", +"Upper", +"Variation_Selector", +"VS", +"White_Space", +"space", +"XID_Continue", +"XIDC", +"XID_Start", +"XIDS", +}; + +// Table 67: Binary Unicode properties of strings +// https://tc39.es/ecma262/multipage/text-processing.html#table-binary-unicode-properties-of-strings +static BINARY_UNICODE_PROPERTIES_OF_STRINGS: Set<&'static str> = phf_set! { +"Basic_Emoji", +"Emoji_Keycap_Sequence", +"RGI_Emoji_Modifier_Sequence", +"RGI_Emoji_Flag_Sequence", +"RGI_Emoji_Tag_Sequence", +"RGI_Emoji_ZWJ_Sequence", +"RGI_Emoji", +}; From 5ad4315dfe9565548571f668ffe11717c0ea69ed Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 15:48:52 +0900 Subject: [PATCH 097/143] Fix typos --- .typos.toml | 5 ++++- crates/oxc_regexp_parser/src/body_parser/parser/parse.rs | 4 ++-- crates/oxc_regexp_parser/src/body_parser/unicode_property.rs | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.typos.toml b/.typos.toml index 28aa370e20bff..90b4a15728c68 100644 --- a/.typos.toml +++ b/.typos.toml @@ -20,7 +20,10 @@ extend-exclude = [ ] [default] -extend-ignore-re = ["(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"] +extend-ignore-re = [ + "(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", + "(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on", +] [default.extend-words] trivias = "trivias" diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 3d745251a6e29..44519843148a6 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -647,8 +647,8 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if MayContainStrings of the ClassContents is true. if negative && body.iter().any(|item| match item { - ast::CharacterClassContents::UnicodePropertyEscape(unicode_propery_escape) => { - unicode_propery_escape.strings + ast::CharacterClassContents::UnicodePropertyEscape(unicode_property_escape) => { + unicode_property_escape.strings } _ => false, }) diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs index f071a38397285..51f38325cc39e 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs @@ -22,6 +22,7 @@ pub fn is_valid_lone_unicode_property_of_strings(name_or_value: &str) -> bool { BINARY_UNICODE_PROPERTIES_OF_STRINGS.contains(name_or_value) } +// spellchecker:off // https://unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt static GC_PROPERTY_VALUES: Set<&'static str> = phf_set! { "C", "Other", @@ -348,3 +349,4 @@ static BINARY_UNICODE_PROPERTIES_OF_STRINGS: Set<&'static str> = phf_set! { "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji", }; +// spellchecker:on From f9fcf10e637e45350e1fb70d3c690cbce907a3c7 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 16:40:48 +0900 Subject: [PATCH 098/143] Make quantifier optional --- .../src/body_parser/parser/mod.rs | 27 ++++++++++++------- .../src/body_parser/parser/parse.rs | 3 ++- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index a6d4f3cc93970..b692004d968ea 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -21,6 +21,11 @@ mod test { ("(?=a){1}", ParserOptions::default()), ("(?!a){1}", ParserOptions::default()), ("a{1}", ParserOptions::default()), + ("a{1", ParserOptions::default()), + ("a|{", ParserOptions::default()), + ("a{", ParserOptions::default()), + ("a{,", ParserOptions::default()), + ("a{1,", ParserOptions::default()), ("a{1,}", ParserOptions::default()), ("a{1,2}", ParserOptions::default()), ("a|b", ParserOptions::default()), @@ -30,10 +35,18 @@ mod test { (r"^(?=ab)\b(?!cd)(?<=ef)\B(? PatternParser<'a> { return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); } + let checkpoint = self.reader.checkpoint(); if self.reader.eat('{') { if let Some(min) = self.consume_decimal_digits() { if self.reader.eat('}') { @@ -1053,7 +1054,7 @@ impl<'a> PatternParser<'a> { } } - return Err(OxcDiagnostic::error("Unterminated quantifier")); + self.reader.rewind(checkpoint); } Ok(None) From 0c9c0281a25e34cf0a2ada3a8335a0337c00d777 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 29 Jul 2024 17:01:30 +0900 Subject: [PATCH 099/143] Fix unicode_escape --- crates/oxc_regexp_parser/src/body_parser/parser/mod.rs | 8 ++++++-- crates/oxc_regexp_parser/src/body_parser/parser/parse.rs | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index b692004d968ea..35e51c6e01d90 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -48,6 +48,11 @@ mod test { ParserOptions::default().with_unicode_flags(true, true), ), (r"\n\cM\0\x41\u1f60\.\/", ParserOptions::default()), + (r"\u", ParserOptions::default()), + (r"\u{", ParserOptions::default()), + (r"\u{}", ParserOptions::default()), + (r"\u{0}", ParserOptions::default()), + (r"\u{1f600}", ParserOptions::default()), (r"\u{1f600}", ParserOptions::default().with_unicode_flags(true, false)), ("(?:abc)", ParserOptions::default()), ("a]", ParserOptions::default()), @@ -96,8 +101,7 @@ mod test { ("(?=a", ParserOptions::default()), ("(? PatternParser<'a> { // [+UnicodeMode] u{ CodePoint } // ``` fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { + let checkpoint = self.reader.checkpoint(); + if !self.reader.eat('u') { return Ok(None); } @@ -1397,7 +1399,12 @@ impl<'a> PatternParser<'a> { self.reader.rewind(checkpoint); } - Err(OxcDiagnostic::error("Invalid unicode escape")) + if self.state.unicode_mode { + return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + } + + self.reader.rewind(checkpoint); + Ok(None) } // ``` From 5fa7ce95ec2a7177a0ab24151b7613fd9d0982e0 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 30 Jul 2024 10:25:55 +0900 Subject: [PATCH 100/143] Avoid recursion --- .../src/body_parser/parser/mod.rs | 5 + .../src/body_parser/parser/parse.rs | 92 +++++++++---------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index 35e51c6e01d90..c01223ae7e1bc 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -74,6 +74,9 @@ mod test { ("[a-z0-9]", ParserOptions::default()), ("[a-a]", ParserOptions::default()), (r"[\d-\D]", ParserOptions::default()), + (r"^([\ud801[\udc28-\udc4f])$", ParserOptions::default()), + (r"[a-c]]", ParserOptions::default()), + (r"[ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ]", ParserOptions::default()), ] { let res = PatternParser::new(&allocator, source_text, *options).parse(); if let Err(err) = res { @@ -116,6 +119,8 @@ mod test { ("(?!a){1}", ParserOptions::default().with_unicode_flags(true, false)), (r"[\d-\D]", ParserOptions::default().with_unicode_flags(true, false)), ("[z-a]", ParserOptions::default()), + (r"[a-c]]", ParserOptions::default().with_unicode_flags(true, false)), + (r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", ParserOptions::default()), ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 4d8273f3719df..6ba46dfdb2921 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -689,13 +689,8 @@ impl<'a> PatternParser<'a> { if self.state.unicode_sets_mode { return Err(OxcDiagnostic::error("TODO: ClassSetExpression")); } - // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] - if let Some(nonempty_class_ranges) = self.parse_nonempty_class_ranges()? { - return Ok((ast::CharacterClassContentsKind::Union, nonempty_class_ranges)); - } - - Err(OxcDiagnostic::error("Empty class ranges")) + self.parse_nonempty_class_ranges() } // ``` @@ -703,27 +698,29 @@ impl<'a> PatternParser<'a> { // ClassAtom[?UnicodeMode] // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] + // + // NonemptyClassRangesNoDash[UnicodeMode] :: + // ClassAtom[?UnicodeMode] + // ClassAtomNoDash[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] + // ClassAtomNoDash[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] // ``` fn parse_nonempty_class_ranges( &mut self, - ) -> Result>>> { - let Some(class_atom) = self.parse_class_atom()? else { - return Err(OxcDiagnostic::error("Empty class atom")); - }; + ) -> Result<(ast::CharacterClassContentsKind, Vec<'a, ast::CharacterClassContents<'a>>)> { + let mut body = Vec::new_in(self.allocator); - // ClassAtom[?UnicodeMode] - if self.reader.peek().filter(|&cp| cp == ']' as u32).is_some() { - let mut body = Vec::new_in(self.allocator); - body.push(class_atom); - return Ok(Some(body)); - } + loop { + let Some(class_atom) = self.parse_class_atom()? else { + break; + }; - // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] - if self.reader.peek().filter(|&cp| cp == '-' as u32).is_some() - && self.reader.peek2().filter(|&cp| cp != ']' as u32).is_some() - { let span_start = self.reader.span_position(); - self.reader.advance(); + if !self.reader.eat('-') { + // ClassAtom[?UnicodeMode] + body.push(class_atom); + continue; + } + let dash = ast::CharacterClassContents::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::Symbol, @@ -731,10 +728,16 @@ impl<'a> PatternParser<'a> { }); let Some(class_atom_to) = self.parse_class_atom()? else { - return Err(OxcDiagnostic::error("Missing class atom pair")); + // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] + // => ClassAtom[?UnicodeMode] ClassAtom[?UnicodeMode] + // => ClassAtom[?UnicodeMode] - + body.push(class_atom); + body.push(dash); + continue; }; - let mut body = Vec::new_in(self.allocator); + // ClassAtom[?UnicodeMode] - ClassAtom[?UnicodeMode] ClassContents[?UnicodeMode, ~UnicodeSetsMode] + // If both sides are characters, it is a range. if let ( ast::CharacterClassContents::Character(from), ast::CharacterClassContents::Character(to), @@ -755,37 +758,28 @@ impl<'a> PatternParser<'a> { }, self.allocator, ))); - } else { - // [SS:EE] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents - // [SS:EE] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents - // It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. - // (Annex B) - if self.state.unicode_mode { - return Err(OxcDiagnostic::error("Invalid character class range")); - } - - body.push(class_atom); - body.push(dash); - body.push(class_atom_to); + continue; } - let (_, class_contents) = self.parse_class_contents()?; - body.extend(class_contents); + // If not, it is just a union of characters. - return Ok(Some(body)); - } - - // ClassAtom[?UnicodeMode] NonemptyClassRangesNoDash[?UnicodeMode] - // `NoDash` part is already covered - let Some(class_ranges) = self.parse_nonempty_class_ranges()? else { - return Err(OxcDiagnostic::error("Missing class ranges")); - }; + // [SS:EE] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents + // [SS:EE] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents + // It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. + // (Annex B) + if self.state.unicode_mode { + return Err(OxcDiagnostic::error("Invalid character class range")); + } - let mut body = Vec::new_in(self.allocator); - body.push(class_atom); - body.extend(class_ranges); + body.push(class_atom); + body.push(dash); + body.push(class_atom_to); + } - Ok(Some(body)) + if body.is_empty() { + return Err(OxcDiagnostic::error("Empty class ranges")); + } + Ok((ast::CharacterClassContentsKind::Union, body)) } // ``` From 9b54fc0838c67ca146236316dd874e01ad57c906 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 30 Jul 2024 10:26:29 +0900 Subject: [PATCH 101/143] Fmt --- crates/oxc_regexp_parser/src/body_parser/parser/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index c01223ae7e1bc..60133dd618df1 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -76,7 +76,10 @@ mod test { (r"[\d-\D]", ParserOptions::default()), (r"^([\ud801[\udc28-\udc4f])$", ParserOptions::default()), (r"[a-c]]", ParserOptions::default()), - (r"[ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ]", ParserOptions::default()), + ( + r"[ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ]", + ParserOptions::default(), + ), ] { let res = PatternParser::new(&allocator, source_text, *options).parse(); if let Err(err) = res { @@ -120,7 +123,10 @@ mod test { (r"[\d-\D]", ParserOptions::default().with_unicode_flags(true, false)), ("[z-a]", ParserOptions::default()), (r"[a-c]]", ParserOptions::default().with_unicode_flags(true, false)), - (r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", ParserOptions::default()), + ( + r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", + ParserOptions::default(), + ), ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), From 83f6232e611c6d88689f966ae7104893a5ad2f30 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 30 Jul 2024 10:54:44 +0900 Subject: [PATCH 102/143] Pass local unicode_mode --- .../src/body_parser/parser/mod.rs | 1 + .../src/body_parser/parser/parse.rs | 23 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs index 60133dd618df1..119e8a204d778 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs @@ -55,6 +55,7 @@ mod test { (r"\u{1f600}", ParserOptions::default()), (r"\u{1f600}", ParserOptions::default().with_unicode_flags(true, false)), ("(?:abc)", ParserOptions::default()), + (r"(?<\u{1d49c}>.)\x1f", ParserOptions::default()), ("a]", ParserOptions::default()), ("a}", ParserOptions::default()), ("]", ParserOptions::default()), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index 6ba46dfdb2921..a79c60feac542 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -600,7 +600,7 @@ impl<'a> PatternParser<'a> { } // e.g. \u{1f600} - if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(self.state.unicode_mode)? { return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::UnicodeEscape, @@ -1223,15 +1223,13 @@ impl<'a> PatternParser<'a> { // [~UnicodeMode] UnicodeLeadSurrogate UnicodeTrailSurrogate // ``` fn consume_reg_exp_idenfigier_start(&mut self) -> Result> { - if let Some(cp) = self.reader.peek() { - if unicode::is_identifier_start_char(cp) { - self.reader.advance(); - return Ok(Some(cp)); - } + if let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_identifier_start_char(cp)) { + self.reader.advance(); + return Ok(Some(cp)); } if self.reader.eat('\\') { - if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(true)? { // [SS:EE] RegExpIdentifierStart :: \ RegExpUnicodeEscapeSequence // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierStartChar lexical grammar production. if !unicode::is_identifier_start_char(cp) { @@ -1282,7 +1280,7 @@ impl<'a> PatternParser<'a> { } if self.reader.eat('\\') { - if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence()? { + if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(true)? { // [SS:EE] RegExpIdentifierPart :: \ RegExpUnicodeEscapeSequence // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierPartChar lexical grammar production. if !unicode::is_identifier_part_char(cp) { @@ -1327,14 +1325,17 @@ impl<'a> PatternParser<'a> { // [~UnicodeMode] u Hex4Digits // [+UnicodeMode] u{ CodePoint } // ``` - fn consume_reg_exp_unicode_escape_sequence(&mut self) -> Result> { + fn consume_reg_exp_unicode_escape_sequence( + &mut self, + unicode_mode: bool, + ) -> Result> { let checkpoint = self.reader.checkpoint(); if !self.reader.eat('u') { return Ok(None); } - if self.state.unicode_mode { + if unicode_mode { let checkpoint = self.reader.checkpoint(); // HexLeadSurrogate + HexTrailSurrogate @@ -1378,7 +1379,7 @@ impl<'a> PatternParser<'a> { } // {CodePoint} - if self.state.unicode_mode { + if unicode_mode { let checkpoint = self.reader.checkpoint(); if self.reader.eat('{') { From 063aa1335c1f6e3e0b35a77267b4ca39512a1788 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 30 Jul 2024 13:52:24 +0900 Subject: [PATCH 103/143] NamedCaptureGroups is off by default in Annex B --- .../src/body_parser/parser/parse.rs | 32 ++++++++++++++----- .../src/body_parser/state.rs | 5 +-- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs index a79c60feac542..5c0eacba78a31 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs @@ -19,15 +19,24 @@ pub struct PatternParser<'a> { impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + let has_group_names = |_source_text: &str| { + // TODO: If GroupName exists, return true, otherwise false + false + }; + let unicode_mode = options.unicode_flag || options.unicode_sets_flag; let unicode_sets_mode = options.unicode_sets_flag; + // In Annex B, this is `false` by default. + // But it is `true` if `GroupName` is found in pattern or `u` or `v` flag is set. + let named_capture_groups = + options.unicode_flag || options.unicode_sets_flag || has_group_names(source_text); Self { allocator, source_text, span_factory: SpanFactory::new(options.span_offset), reader: Reader::new(source_text, unicode_mode), - state: State::new(unicode_mode, unicode_sets_mode), + state: State::new(unicode_mode, unicode_sets_mode, named_capture_groups), } } @@ -437,8 +446,12 @@ impl<'a> PatternParser<'a> { } // k GroupName: \k means named reference - if self.reader.eat('k') { + if self.state.named_capture_groups && self.reader.eat('k') { if let Some(name) = self.consume_group_name()? { + // [SS:EE] AtomEscape :: k GroupName + // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. + // TODO + return Ok(Some(ast::Term::NamedReference(Box::new_in( ast::NamedReference { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -448,8 +461,6 @@ impl<'a> PatternParser<'a> { )))); } - // [SS:EE] AtomEscape :: k GroupName - // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. return Err(OxcDiagnostic::error("Invalid named reference")); } @@ -1470,10 +1481,15 @@ impl<'a> PatternParser<'a> { return Some(cp); } - // `NamedCaptureGroups` is always enabled - if !self.state.unicode_mode && (cp != 'c' as u32 && cp != 'k' as u32) { - self.reader.advance(); - return Some(cp); + if !self.state.unicode_mode { + if self.state.named_capture_groups && (cp != 'c' as u32 && cp != 'k' as u32) { + self.reader.advance(); + return Some(cp); + } + if cp != 'c' as u32 { + self.reader.advance(); + return Some(cp); + } } None diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 730a0dc41fcbd..1af8024f910a8 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -1,10 +1,11 @@ pub struct State { pub unicode_mode: bool, pub unicode_sets_mode: bool, + pub named_capture_groups: bool, } impl State { - pub fn new(unicode_mode: bool, unicode_sets_mode: bool) -> Self { - Self { unicode_mode, unicode_sets_mode } + pub fn new(unicode_mode: bool, unicode_sets_mode: bool, named_capture_groups: bool) -> Self { + Self { unicode_mode, unicode_sets_mode, named_capture_groups } } } From c046b52b0c9ced8f124f4670c139aca1b7706920 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 30 Jul 2024 14:00:12 +0900 Subject: [PATCH 104/143] Flatten dirs --- .../oxc_regexp_parser/src/body_parser/mod.rs | 180 ++++++++++++++++++ .../{parser/parse.rs => parser.rs} | 10 +- .../src/body_parser/parser/mod.rs | 165 ---------------- 3 files changed, 183 insertions(+), 172 deletions(-) rename crates/oxc_regexp_parser/src/body_parser/{parser/parse.rs => parser.rs} (99%) delete mode 100644 crates/oxc_regexp_parser/src/body_parser/parser/mod.rs diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index 98e6044b44acc..a96af98733643 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -5,3 +5,183 @@ mod unicode; mod unicode_property; pub use parser::PatternParser; + +#[cfg(test)] +mod test { + use crate::{ParserOptions, PatternParser}; + use oxc_allocator::Allocator; + + // NOTE: These may be useless when integlation tests are added + #[test] + fn should_pass() { + let allocator = Allocator::default(); + + for (source_text, options) in &[ + ("", ParserOptions::default()), + ("a", ParserOptions::default()), + ("a+", ParserOptions::default()), + ("a*", ParserOptions::default()), + ("a?", ParserOptions::default()), + ("(?=a){1}", ParserOptions::default()), + ("(?!a){1}", ParserOptions::default()), + ("a{1}", ParserOptions::default()), + ("a{1", ParserOptions::default()), + ("a|{", ParserOptions::default()), + ("a{", ParserOptions::default()), + ("a{,", ParserOptions::default()), + ("a{1,", ParserOptions::default()), + ("a{1,}", ParserOptions::default()), + ("a{1,2}", ParserOptions::default()), + ("a|b", ParserOptions::default()), + ("a|b|c", ParserOptions::default()), + ("a|b+?|c", ParserOptions::default()), + ("a+b*?c{1}d{2,}e{3,4}?", ParserOptions::default()), + (r"^(?=ab)\b(?!cd)(?<=ef)\B(?.)\x1f", ParserOptions::default()), + ("a]", ParserOptions::default()), + ("a}", ParserOptions::default()), + ("]", ParserOptions::default()), + ("[]", ParserOptions::default()), + ("[a]", ParserOptions::default()), + ("[ab]", ParserOptions::default()), + ("[a-b]", ParserOptions::default()), + ("[-]", ParserOptions::default()), + ("[a-]", ParserOptions::default()), + ("[-a]", ParserOptions::default()), + ("[-a-]", ParserOptions::default()), + (r"[a\-b]", ParserOptions::default()), + (r"[-a-b]", ParserOptions::default()), + (r"[a-b-]", ParserOptions::default()), + (r"[a\-b-]", ParserOptions::default()), + (r"[\[\]\-]", ParserOptions::default()), + ("[a-z0-9]", ParserOptions::default()), + ("[a-a]", ParserOptions::default()), + (r"[\d-\D]", ParserOptions::default()), + (r"^([\ud801[\udc28-\udc4f])$", ParserOptions::default()), + (r"[a-c]]", ParserOptions::default()), + ( + r"[ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ]", + ParserOptions::default(), + ), + (r"(?A)\k", ParserOptions::default()), + (r"(?)\k", ParserOptions::default()), + (r"\k", ParserOptions::default()), + (r"\k<4>", ParserOptions::default()), + (r"(?)\k", ParserOptions::default()), + (r"(?)\k", ParserOptions::default().with_unicode_flags(true, false)), + (r"\1", ParserOptions::default()), + ] { + let res = PatternParser::new(&allocator, source_text, *options).parse(); + if let Err(err) = res { + panic!("Failed to parse {source_text} with {options:?}\n💥 {err}"); + } + } + } + + #[test] + fn should_fail() { + let allocator = Allocator::default(); + + for (source_text, options) in &[ + ("a)", ParserOptions::default()), + (r"a\", ParserOptions::default()), + ("a]", ParserOptions::default().with_unicode_flags(true, false)), + ("a}", ParserOptions::default().with_unicode_flags(true, false)), + ("a|+", ParserOptions::default()), + ("a|{", ParserOptions::default().with_unicode_flags(true, false)), + ("a{", ParserOptions::default().with_unicode_flags(true, false)), + ("a{1", ParserOptions::default().with_unicode_flags(true, false)), + ("a{1,", ParserOptions::default().with_unicode_flags(true, false)), + ("a{,", ParserOptions::default().with_unicode_flags(true, false)), + ("a{2,1}", ParserOptions::default()), + ("(?=a", ParserOptions::default()), + ("(?", ParserOptions::default().with_unicode_flags(true, false)), + (r"\k<4>", ParserOptions::default().with_unicode_flags(true, false)), + (r"\k)\k", ParserOptions::default()), + ("a(?:", ParserOptions::default()), + ("(a", ParserOptions::default()), + ("(?", ParserOptions::default()), + ("(?=a){1}", ParserOptions::default().with_unicode_flags(true, false)), + ("(?!a){1}", ParserOptions::default().with_unicode_flags(true, false)), + (r"[\d-\D]", ParserOptions::default().with_unicode_flags(true, false)), + ("[z-a]", ParserOptions::default()), + (r"[a-c]]", ParserOptions::default().with_unicode_flags(true, false)), + ( + r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", + ParserOptions::default(), + ), + ] { + assert!( + PatternParser::new(&allocator, source_text, *options).parse().is_err(), + "{source_text} should fail to parse with {options:?}!" + ); + } + } + + #[test] + fn should_handle_empty() { + let allocator = Allocator::default(); + let pattern = PatternParser::new(&allocator, "", ParserOptions::default()).parse().unwrap(); + + assert_eq!(pattern.body.body[0].body.len(), 1); + } + + #[test] + fn should_handle_unicode() { + let allocator = Allocator::default(); + let source_text = "このEmoji🥹の数が変わる"; + + let pattern = PatternParser::new( + &allocator, + source_text, + ParserOptions::default().with_unicode_flags(true, false), + ) + .parse() + .unwrap(); + assert_eq!(pattern.body.body[0].body.len(), 14); + let pattern = PatternParser::new( + &allocator, + source_text, + ParserOptions::default().with_unicode_flags(true, true), + ) + .parse() + .unwrap(); + assert_eq!(pattern.body.body[0].body.len(), 14); + + let pattern = + PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); + assert_eq!(pattern.body.body[0].body.len(), 15); + } +} diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs similarity index 99% rename from crates/oxc_regexp_parser/src/body_parser/parser/parse.rs rename to crates/oxc_regexp_parser/src/body_parser/parser.rs index 5c0eacba78a31..0e285bfc662c3 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser/parse.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -19,6 +19,9 @@ pub struct PatternParser<'a> { impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { + // For `new RegExp("")` or `new RegExp()` (= empty) + let source_text = if source_text.is_empty() { "(?:)" } else { source_text }; + let has_group_names = |_source_text: &str| { // TODO: If GroupName exists, return true, otherwise false false @@ -41,19 +44,12 @@ impl<'a> PatternParser<'a> { } pub fn parse(&mut self) -> Result> { - // For `new RegExp("")` or `new RegExp()` (= empty) - if self.source_text.is_empty() { - self.source_text = "(?:)"; - } - let result = self.parse_disjunction()?; if self.reader.peek().is_some() { return Err(OxcDiagnostic::error("Could not parse the entire pattern")); } - // TODO: Revisit `should_reparse` - Ok(ast::Pattern { span: self.span_factory.create(0, self.source_text.len()), body: result }) } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs deleted file mode 100644 index 119e8a204d778..0000000000000 --- a/crates/oxc_regexp_parser/src/body_parser/parser/mod.rs +++ /dev/null @@ -1,165 +0,0 @@ -mod parse; - -pub use parse::PatternParser; - -#[cfg(test)] -mod test { - use crate::{ParserOptions, PatternParser}; - use oxc_allocator::Allocator; - - // NOTE: These may be useless when integlation tests are added - #[test] - fn should_pass() { - let allocator = Allocator::default(); - - for (source_text, options) in &[ - ("", ParserOptions::default()), - ("a", ParserOptions::default()), - ("a+", ParserOptions::default()), - ("a*", ParserOptions::default()), - ("a?", ParserOptions::default()), - ("(?=a){1}", ParserOptions::default()), - ("(?!a){1}", ParserOptions::default()), - ("a{1}", ParserOptions::default()), - ("a{1", ParserOptions::default()), - ("a|{", ParserOptions::default()), - ("a{", ParserOptions::default()), - ("a{,", ParserOptions::default()), - ("a{1,", ParserOptions::default()), - ("a{1,}", ParserOptions::default()), - ("a{1,2}", ParserOptions::default()), - ("a|b", ParserOptions::default()), - ("a|b|c", ParserOptions::default()), - ("a|b+?|c", ParserOptions::default()), - ("a+b*?c{1}d{2,}e{3,4}?", ParserOptions::default()), - (r"^(?=ab)\b(?!cd)(?<=ef)\B(?.)\x1f", ParserOptions::default()), - ("a]", ParserOptions::default()), - ("a}", ParserOptions::default()), - ("]", ParserOptions::default()), - ("[]", ParserOptions::default()), - ("[a]", ParserOptions::default()), - ("[ab]", ParserOptions::default()), - ("[a-b]", ParserOptions::default()), - ("[-]", ParserOptions::default()), - ("[a-]", ParserOptions::default()), - ("[-a]", ParserOptions::default()), - ("[-a-]", ParserOptions::default()), - (r"[a\-b]", ParserOptions::default()), - (r"[-a-b]", ParserOptions::default()), - (r"[a-b-]", ParserOptions::default()), - (r"[a\-b-]", ParserOptions::default()), - (r"[\[\]\-]", ParserOptions::default()), - ("[a-z0-9]", ParserOptions::default()), - ("[a-a]", ParserOptions::default()), - (r"[\d-\D]", ParserOptions::default()), - (r"^([\ud801[\udc28-\udc4f])$", ParserOptions::default()), - (r"[a-c]]", ParserOptions::default()), - ( - r"[ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ]", - ParserOptions::default(), - ), - ] { - let res = PatternParser::new(&allocator, source_text, *options).parse(); - if let Err(err) = res { - panic!("Failed to parse {source_text} with {options:?}\n💥 {err}"); - } - } - } - - #[test] - fn should_fail() { - let allocator = Allocator::default(); - - for (source_text, options) in &[ - ("a)", ParserOptions::default()), - (r"a\", ParserOptions::default()), - ("a]", ParserOptions::default().with_unicode_flags(true, false)), - ("a}", ParserOptions::default().with_unicode_flags(true, false)), - ("a|+", ParserOptions::default()), - ("a|{", ParserOptions::default().with_unicode_flags(true, false)), - ("a{", ParserOptions::default().with_unicode_flags(true, false)), - ("a{1", ParserOptions::default().with_unicode_flags(true, false)), - ("a{1,", ParserOptions::default().with_unicode_flags(true, false)), - ("a{,", ParserOptions::default().with_unicode_flags(true, false)), - ("a{2,1}", ParserOptions::default()), - ("(?=a", ParserOptions::default()), - ("(?", ParserOptions::default()), - (r"\k<>", ParserOptions::default().with_unicode_flags(true, false)), - (r"\k", ParserOptions::default()), - ("(?=a){1}", ParserOptions::default().with_unicode_flags(true, false)), - ("(?!a){1}", ParserOptions::default().with_unicode_flags(true, false)), - (r"[\d-\D]", ParserOptions::default().with_unicode_flags(true, false)), - ("[z-a]", ParserOptions::default()), - (r"[a-c]]", ParserOptions::default().with_unicode_flags(true, false)), - ( - r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", - ParserOptions::default(), - ), - ] { - assert!( - PatternParser::new(&allocator, source_text, *options).parse().is_err(), - "{source_text} should fail to parse with {options:?}!" - ); - } - } - - #[test] - fn should_handle_unicode() { - let allocator = Allocator::default(); - let source_text = "このEmoji🥹の数が変わる"; - - let pattern = PatternParser::new( - &allocator, - source_text, - ParserOptions::default().with_unicode_flags(true, false), - ) - .parse() - .unwrap(); - assert_eq!(pattern.body.body[0].body.len(), 14); - let pattern = PatternParser::new( - &allocator, - source_text, - ParserOptions::default().with_unicode_flags(true, true), - ) - .parse() - .unwrap(); - assert_eq!(pattern.body.body[0].body.len(), 14); - - let pattern = - PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.body.body[0].body.len(), 15); - } -} From 6de72819ab5e68b715a5367d75535d360dc9033c Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 31 Jul 2024 14:06:48 +0900 Subject: [PATCH 105/143] Pre parse to check capturing groups --- .../oxc_regexp_parser/src/body_parser/mod.rs | 7 +- .../src/body_parser/parser.rs | 97 +++++++++---- .../src/body_parser/state.rs | 127 +++++++++++++++++- crates/oxc_regexp_parser/src/options.rs | 5 +- 4 files changed, 197 insertions(+), 39 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index a96af98733643..ab9b2cb77da76 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -92,6 +92,8 @@ mod test { (r"(?)\k", ParserOptions::default()), (r"(?)\k", ParserOptions::default().with_unicode_flags(true, false)), (r"\1", ParserOptions::default()), + (r"(?..)(?..)", ParserOptions::default()), + (r"(?..)|(?..)", ParserOptions::default()), ] { let res = PatternParser::new(&allocator, source_text, *options).parse(); if let Err(err) = res { @@ -128,8 +130,9 @@ mod test { (r"\k<>", ParserOptions::default().with_unicode_flags(true, false)), (r"\k<4>", ParserOptions::default().with_unicode_flags(true, false)), (r"\k)\k", ParserOptions::default()), + (r"\1", ParserOptions::default().with_unicode_flags(true, false)), + (r"(?)\k", ParserOptions::default()), + (r"(?..)(?..)", ParserOptions::default()), ("a(?:", ParserOptions::default()), ("(a", ParserOptions::default()), ("(?", ParserOptions::default()), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 0e285bfc662c3..e957c576572fb 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1,6 +1,7 @@ use oxc_allocator::{Allocator, Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; +use rustc_hash::FxHashSet; use crate::{ ast, @@ -14,7 +15,7 @@ pub struct PatternParser<'a> { source_text: &'a str, span_factory: SpanFactory, reader: Reader<'a>, - state: State, + state: State<'a>, } impl<'a> PatternParser<'a> { @@ -22,28 +23,25 @@ impl<'a> PatternParser<'a> { // For `new RegExp("")` or `new RegExp()` (= empty) let source_text = if source_text.is_empty() { "(?:)" } else { source_text }; - let has_group_names = |_source_text: &str| { - // TODO: If GroupName exists, return true, otherwise false - false - }; - - let unicode_mode = options.unicode_flag || options.unicode_sets_flag; - let unicode_sets_mode = options.unicode_sets_flag; - // In Annex B, this is `false` by default. - // But it is `true` if `GroupName` is found in pattern or `u` or `v` flag is set. - let named_capture_groups = - options.unicode_flag || options.unicode_sets_flag || has_group_names(source_text); - Self { allocator, source_text, span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(source_text, unicode_mode), - state: State::new(unicode_mode, unicode_sets_mode, named_capture_groups), + reader: Reader::new(source_text, options.unicode_flag || options.unicode_sets_flag), + state: State::new(options.unicode_flag, options.unicode_sets_flag), } } pub fn parse(&mut self) -> Result> { + // TODO: Comment + self.state.count_capturing_groups(self.source_text); + + // [SS:EE] Pattern :: Disjunction + // It is a Syntax Error if CountLeftCapturingParensWithin(Pattern) ≥ 2**32 - 1. + if 2 ^ 32 < self.state.num_of_capturing_groups { + return Err(OxcDiagnostic::error("Too many capturing groups")); + } + let result = self.parse_disjunction()?; if self.reader.peek().is_some() { @@ -70,6 +68,23 @@ impl<'a> PatternParser<'a> { } } + for alternative in &body { + // Duplicated group names can be used across alternatives, but not within the same + let mut found_group_names = FxHashSet::default(); + + for term in &alternative.body { + if let ast::Term::CapturingGroup(capturing_group) = term { + if let Some(name) = &capturing_group.name { + // [SS:EE] Pattern :: Disjunction + // It is a Syntax Error if Pattern contains two or more GroupSpecifiers for which the CapturingGroupName of GroupSpecifier is the same. + if !found_group_names.insert(name.as_str()) { + return Err(OxcDiagnostic::error("Duplicated group name")); + } + } + } + } + } + Ok(ast::Disjunction { span: self.span_factory.create(span_start, self.reader.span_position()), body, @@ -413,14 +428,31 @@ impl<'a> PatternParser<'a> { // ``` // (Annex B) fn parse_atom_escape(&mut self, span_start: usize) -> Result>> { + let checkpoint = self.reader.checkpoint(); + // DecimalEscape: \1 means indexed reference if let Some(index) = self.consume_decimal_escape() { - // TODO: Check `CapturingGroupNumber` <= `CountLeftCapturingParensWithin` + if self.state.unicode_mode { + // [SS:EE] AtomEscape :: DecimalEscape + // It is a Syntax Error if the CapturingGroupNumber of DecimalEscape is strictly greater than CountLeftCapturingParensWithin(the Pattern containing AtomEscape). + if self.state.num_of_capturing_groups < index { + return Err(OxcDiagnostic::error("Invalid indexed reference")); + } - return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { - span: self.span_factory.create(span_start, self.reader.span_position()), - index, - }))); + return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { + span: self.span_factory.create(span_start, self.reader.span_position()), + index, + }))); + } + + if index <= self.state.num_of_capturing_groups { + return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { + span: self.span_factory.create(span_start, self.reader.span_position()), + index, + }))); + } + + self.reader.rewind(checkpoint); } // CharacterClassEscape: \d, \p{...} @@ -446,7 +478,9 @@ impl<'a> PatternParser<'a> { if let Some(name) = self.consume_group_name()? { // [SS:EE] AtomEscape :: k GroupName // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. - // TODO + if !self.state.found_group_names.contains(name.as_str()) { + return Err(OxcDiagnostic::error("Invalid named reference")); + } return Ok(Some(ast::Term::NamedReference(Box::new_in( ast::NamedReference { @@ -1472,20 +1506,25 @@ impl<'a> PatternParser<'a> { fn consume_identity_escape(&mut self) -> Option { let cp = self.reader.peek()?; - if self.state.unicode_mode && (unicode::is_syntax_character(cp) || cp == '/' as u32) { - self.reader.advance(); - return Some(cp); - } - - if !self.state.unicode_mode { - if self.state.named_capture_groups && (cp != 'c' as u32 && cp != 'k' as u32) { + if self.state.unicode_mode { + if unicode::is_syntax_character(cp) || cp == '/' as u32 { self.reader.advance(); return Some(cp); } - if cp != 'c' as u32 { + return None; + } + + if self.state.named_capture_groups { + if cp != 'c' as u32 && cp != 'k' as u32 { self.reader.advance(); return Some(cp); } + return None; + } + + if cp != 'c' as u32 { + self.reader.advance(); + return Some(cp); } None diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 1af8024f910a8..8e63156b2ce5c 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -1,11 +1,130 @@ -pub struct State { +use rustc_hash::FxHashSet; + +use super::reader::Reader; + +#[derive(Debug)] +pub struct State<'a> { pub unicode_mode: bool, pub unicode_sets_mode: bool, pub named_capture_groups: bool, + pub num_of_capturing_groups: u32, + pub found_group_names: FxHashSet<&'a str>, +} + +impl<'a> State<'a> { + pub fn new(unicode_flag: bool, unicode_sets_flag: bool) -> Self { + let unicode_mode = unicode_flag || unicode_sets_flag; + let unicode_sets_mode = unicode_sets_flag; + // In Annex B, this is `false` by default. + // But it is `true` + // - if `u` or `v` flag is set + // - or if `GroupName` is found in pattern + let named_capture_groups = unicode_flag || unicode_sets_flag; + + Self { + unicode_mode, + unicode_sets_mode, + named_capture_groups, + num_of_capturing_groups: 0, + found_group_names: FxHashSet::default(), + } + } + + pub fn count_capturing_groups(&mut self, source_text: &'a str) { + let (num_of_left_parens, named_capture_groups) = count_capturing_groups(source_text); + + // Enable `NamedCaptureGroups` if capturing group found + if !named_capture_groups.is_empty() { + self.named_capture_groups = true; + } + + self.num_of_capturing_groups = num_of_left_parens; + self.found_group_names = named_capture_groups; + } +} + +/// Returns: (num_of_left_parens, named_capture_groups) +fn count_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { + let mut num_of_left_parens = 0; + let mut named_capture_groups = FxHashSet::default(); + + let mut reader = Reader::new(source_text, true); + + let mut in_escape = false; + let mut in_character_class = false; + + // Count only normal capturing group(named, unnamed) + // (?...), (...) + // IgnoreGroup, and LookaroundAssertions are ignored + // (?:...) + // (?=...), (?!...), (?<=...), (?' as u32 { + break; + } + reader.advance(); + } + let span_end = reader.span_position(); + + if reader.eat('>') { + let group_name = &source_text[span_start..span_end]; + named_capture_groups.insert(group_name); + continue; + } + } + } + + reader.advance(); + } + + (num_of_left_parens, named_capture_groups) } -impl State { - pub fn new(unicode_mode: bool, unicode_sets_mode: bool, named_capture_groups: bool) -> Self { - Self { unicode_mode, unicode_sets_mode, named_capture_groups } +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_count_capturing_groups() { + for (source_text, expected_num_of_left_parens, expected_named_capture_groups_found) in [ + ("(foo)", 1, false), + ("(foo)(bar)", 2, false), + ("(foo(bar))", 2, false), + ("(foo)[(bar)]", 1, false), + (r"(foo)\(bar\)", 1, false), + ("(foo)(?bar)", 2, true), + ("(foo)(?=...)(?!...)(?<=...)(?bar)(?baz)", 3, true), + ] { + let (num_of_left_parens, named_capture_groups) = count_capturing_groups(source_text); + assert_eq!(expected_num_of_left_parens, num_of_left_parens); + assert_eq!(expected_named_capture_groups_found, !named_capture_groups.is_empty()); + } } } diff --git a/crates/oxc_regexp_parser/src/options.rs b/crates/oxc_regexp_parser/src/options.rs index 4a83dc9e0a02e..538b0b509de86 100644 --- a/crates/oxc_regexp_parser/src/options.rs +++ b/crates/oxc_regexp_parser/src/options.rs @@ -6,9 +6,6 @@ pub struct ParserOptions { pub unicode_flag: bool, /// The same as `v` flag, it extends `u` flag behavior. pub unicode_sets_flag: bool, - // Not planning to implement - // pub strict: bool, - // pub ecma_version: u32, // or Enum? } impl ParserOptions { @@ -18,7 +15,7 @@ impl ParserOptions { } #[must_use] - /// Only for `PattenrParser` alone usage. + /// Only for `PatternParser` alone usage API. /// `FlagParser` does not use these, (Literal)`Parser` internally updates with parsed flags. pub fn with_unicode_flags(self, unicode_flag: bool, unicode_sets_flag: bool) -> ParserOptions { ParserOptions { unicode_flag, unicode_sets_flag, ..self } From 41fb8f673cf1dcf026f6c2170148f0cd182d3a80 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 31 Jul 2024 14:47:35 +0900 Subject: [PATCH 106/143] Complete early errors --- .../oxc_regexp_parser/src/body_parser/mod.rs | 4 ++++ .../src/body_parser/parser.rs | 12 ++++++---- .../src/body_parser/state.rs | 23 +++++++++++-------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index ab9b2cb77da76..66294235c514c 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -89,9 +89,12 @@ mod test { (r"(?)\k", ParserOptions::default()), (r"\k", ParserOptions::default()), (r"\k<4>", ParserOptions::default()), + (r"\k", ParserOptions::default()), (r"(?)\k", ParserOptions::default()), (r"(?)\k", ParserOptions::default().with_unicode_flags(true, false)), (r"\1", ParserOptions::default()), + (r"\1()", ParserOptions::default()), + (r"\1()", ParserOptions::default().with_unicode_flags(true, false)), (r"(?..)(?..)", ParserOptions::default()), (r"(?..)|(?..)", ParserOptions::default()), ] { @@ -131,6 +134,7 @@ mod test { (r"\k<4>", ParserOptions::default().with_unicode_flags(true, false)), (r"\k", ParserOptions::default().with_unicode_flags(true, false)), (r"(?)\k", ParserOptions::default()), (r"(?..)(?..)", ParserOptions::default()), ("a(?:", ParserOptions::default()), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index e957c576572fb..8922bae38f642 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -33,8 +33,12 @@ impl<'a> PatternParser<'a> { } pub fn parse(&mut self) -> Result> { - // TODO: Comment - self.state.count_capturing_groups(self.source_text); + // Pre parse whole pattern to collect: + // - 1. the number of (named|unnamed) capturing groups + // - For `\1` in `\1()` to be handled as indexed reference + // - 2. names of named capturing groups + // - For `\k`, `\k(?)` to be handled as early error with `NamedCaptureGroups` + self.state.parse_capturing_groups(self.source_text); // [SS:EE] Pattern :: Disjunction // It is a Syntax Error if CountLeftCapturingParensWithin(Pattern) ≥ 2**32 - 1. @@ -433,7 +437,7 @@ impl<'a> PatternParser<'a> { // DecimalEscape: \1 means indexed reference if let Some(index) = self.consume_decimal_escape() { if self.state.unicode_mode { - // [SS:EE] AtomEscape :: DecimalEscape + // [SS:EE] AtomEscape :: DecimalEscape // It is a Syntax Error if the CapturingGroupNumber of DecimalEscape is strictly greater than CountLeftCapturingParensWithin(the Pattern containing AtomEscape). if self.state.num_of_capturing_groups < index { return Err(OxcDiagnostic::error("Invalid indexed reference")); @@ -479,7 +483,7 @@ impl<'a> PatternParser<'a> { // [SS:EE] AtomEscape :: k GroupName // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. if !self.state.found_group_names.contains(name.as_str()) { - return Err(OxcDiagnostic::error("Invalid named reference")); + return Err(OxcDiagnostic::error("Group specifier is empty")); } return Ok(Some(ast::Term::NamedReference(Box::new_in( diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 8e63156b2ce5c..9b54a96d5cdaf 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -30,8 +30,8 @@ impl<'a> State<'a> { } } - pub fn count_capturing_groups(&mut self, source_text: &'a str) { - let (num_of_left_parens, named_capture_groups) = count_capturing_groups(source_text); + pub fn parse_capturing_groups(&mut self, source_text: &'a str) { + let (num_of_left_parens, named_capture_groups) = parse_capturing_groups(source_text); // Enable `NamedCaptureGroups` if capturing group found if !named_capture_groups.is_empty() { @@ -44,7 +44,7 @@ impl<'a> State<'a> { } /// Returns: (num_of_left_parens, named_capture_groups) -fn count_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { +fn parse_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { let mut num_of_left_parens = 0; let mut named_capture_groups = FxHashSet::default(); @@ -58,16 +58,18 @@ fn count_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { // IgnoreGroup, and LookaroundAssertions are ignored // (?:...) // (?=...), (?!...), (?<=...), (?bar)", 2, true), ("(foo)(?=...)(?!...)(?<=...)(?bar)(?baz)", 3, true), + ("(?.)(?..)", 2, true), ] { - let (num_of_left_parens, named_capture_groups) = count_capturing_groups(source_text); + let (num_of_left_parens, named_capture_groups) = parse_capturing_groups(source_text); assert_eq!(expected_num_of_left_parens, num_of_left_parens); assert_eq!(expected_named_capture_groups_found, !named_capture_groups.is_empty()); } From 39846a764986fbd9957fbffe528f3f34c92228dd Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 31 Jul 2024 15:27:45 +0900 Subject: [PATCH 107/143] Update ast --- crates/oxc_regexp_parser/src/ast.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 35e2b72ac6c24..8f27299352359 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -3,7 +3,6 @@ use oxc_span::{Atom as SpanAtom, Span}; // NOTE: Should keep all `enum` size <= 16 -/// The root. #[derive(Debug)] pub struct RegExpLiteral<'a> { pub span: Span, @@ -11,7 +10,6 @@ pub struct RegExpLiteral<'a> { pub flags: Flags, } -/// The flags. #[derive(Debug)] pub struct Flags { pub span: Span, @@ -25,7 +23,6 @@ pub struct Flags { pub unicode_sets: bool, } -/// The pattern. #[derive(Debug)] pub struct Pattern<'a> { pub span: Span, @@ -115,7 +112,6 @@ pub enum CharacterKind { SingleEscape, Symbol, UnicodeEscape, - UnicodeCodePointEscape, // TODO: Should distinguish from `UnicodeEscape`? } #[derive(Debug)] @@ -190,7 +186,6 @@ pub struct IgnoreGroup<'a> { } #[derive(Debug)] pub struct ModifierFlags { - pub span: Span, pub ignore_case: bool, pub sticky: bool, pub multiline: bool, From a0e1340b3854ca8b80ad572e838d7b659375889f Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 31 Jul 2024 16:59:47 +0900 Subject: [PATCH 108/143] Adjust scope to ES2024 --- crates/oxc_regexp_parser/README.md | 6 +-- .../oxc_regexp_parser/src/body_parser/mod.rs | 8 +++- .../src/body_parser/parser.rs | 24 +++-------- .../src/body_parser/state.rs | 41 +++++++++++-------- 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/crates/oxc_regexp_parser/README.md b/crates/oxc_regexp_parser/README.md index 5809f708bd625..6a96a150b11d8 100644 --- a/crates/oxc_regexp_parser/README.md +++ b/crates/oxc_regexp_parser/README.md @@ -1,7 +1,7 @@ # oxc_regexp_parser -Follows ECMAScript® 2025 Language Specification +Follows ECMAScript® 2024 Language Specification -- https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects -- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regular-expressions-patterns +- https://tc39.es/ecma262/2024/multipage/text-processing.html#sec-regexp-regular-expression-objects +- https://tc39.es/ecma262/2024/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regular-expressions-patterns diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index 66294235c514c..f8ec6917dbb77 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -96,7 +96,10 @@ mod test { (r"\1()", ParserOptions::default()), (r"\1()", ParserOptions::default().with_unicode_flags(true, false)), (r"(?..)(?..)", ParserOptions::default()), - (r"(?..)|(?..)", ParserOptions::default()), + // TODO: ES2025 Duplicate named capturing groups + // (r"(?..)|(?..)", ParserOptions::default()), + // (r"(?[0-9]{4})-[0-9]{2}|[0-9]{2}-(?[0-9]{4})", ParserOptions::default()), + // (r"(?:(?x)|(?y))\k", ParserOptions::default()), ] { let res = PatternParser::new(&allocator, source_text, *options).parse(); if let Err(err) = res { @@ -149,6 +152,9 @@ mod test { r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", ParserOptions::default(), ), + // TODO: ES2025 Duplicate named capturing groups + (r"(?..)|(?..)", ParserOptions::default()), // This will be valid + // (r"(?|(?))", ParserOptions::default()), // Nested, still invalid ] { assert!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 8922bae38f642..78aacb4f65965 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1,7 +1,6 @@ use oxc_allocator::{Allocator, Box, Vec}; use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::Atom as SpanAtom; -use rustc_hash::FxHashSet; use crate::{ ast, @@ -46,6 +45,12 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Too many capturing groups")); } + // [SS:EE] Pattern :: Disjunction + // It is a Syntax Error if Pattern contains two or more GroupSpecifiers for which the CapturingGroupName of GroupSpecifier is the same. + if self.state.num_of_named_capture_groups as usize != self.state.found_group_names.len() { + return Err(OxcDiagnostic::error("Duplicated group name")); + } + let result = self.parse_disjunction()?; if self.reader.peek().is_some() { @@ -72,23 +77,6 @@ impl<'a> PatternParser<'a> { } } - for alternative in &body { - // Duplicated group names can be used across alternatives, but not within the same - let mut found_group_names = FxHashSet::default(); - - for term in &alternative.body { - if let ast::Term::CapturingGroup(capturing_group) = term { - if let Some(name) = &capturing_group.name { - // [SS:EE] Pattern :: Disjunction - // It is a Syntax Error if Pattern contains two or more GroupSpecifiers for which the CapturingGroupName of GroupSpecifier is the same. - if !found_group_names.insert(name.as_str()) { - return Err(OxcDiagnostic::error("Duplicated group name")); - } - } - } - } - } - Ok(ast::Disjunction { span: self.span_factory.create(span_start, self.reader.span_position()), body, diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 9b54a96d5cdaf..a5cc1adbedf18 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -8,6 +8,7 @@ pub struct State<'a> { pub unicode_sets_mode: bool, pub named_capture_groups: bool, pub num_of_capturing_groups: u32, + pub num_of_named_capture_groups: u32, pub found_group_names: FxHashSet<&'a str>, } @@ -26,12 +27,14 @@ impl<'a> State<'a> { unicode_sets_mode, named_capture_groups, num_of_capturing_groups: 0, + num_of_named_capture_groups: 0, found_group_names: FxHashSet::default(), } } pub fn parse_capturing_groups(&mut self, source_text: &'a str) { - let (num_of_left_parens, named_capture_groups) = parse_capturing_groups(source_text); + let (num_of_left_parens, num_of_named_capture_groups, named_capture_groups) = + parse_capturing_groups(source_text); // Enable `NamedCaptureGroups` if capturing group found if !named_capture_groups.is_empty() { @@ -39,13 +42,15 @@ impl<'a> State<'a> { } self.num_of_capturing_groups = num_of_left_parens; + self.num_of_named_capture_groups = num_of_named_capture_groups; self.found_group_names = named_capture_groups; } } /// Returns: (num_of_left_parens, named_capture_groups) -fn parse_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { +fn parse_capturing_groups(source_text: &str) -> (u32, u32, FxHashSet<&str>) { let mut num_of_left_parens = 0; + let mut num_of_named_capture_groups = 0; let mut named_capture_groups = FxHashSet::default(); let mut reader = Reader::new(source_text, true); @@ -97,6 +102,7 @@ fn parse_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { if reader.eat('>') { let group_name = &source_text[span_start..span_end]; named_capture_groups.insert(group_name); + num_of_named_capture_groups += 1; continue; } } @@ -105,7 +111,7 @@ fn parse_capturing_groups(source_text: &str) -> (u32, FxHashSet<&str>) { reader.advance(); } - (num_of_left_parens, named_capture_groups) + (num_of_left_parens, num_of_named_capture_groups, named_capture_groups) } #[cfg(test)] @@ -114,22 +120,23 @@ mod tests { #[test] fn test_count_capturing_groups() { - for (source_text, expected_num_of_left_parens, expected_named_capture_groups_found) in [ - ("()", 1, false), - (r"\1()", 1, false), - ("(foo)", 1, false), - ("(foo)(bar)", 2, false), - ("(foo(bar))", 2, false), - ("(foo)[(bar)]", 1, false), - (r"(foo)\(bar\)", 1, false), - ("(foo)(?bar)", 2, true), - ("(foo)(?=...)(?!...)(?<=...)(?bar)(?baz)", 3, true), - ("(?.)(?..)", 2, true), + for (source_text, expected_num_of_left_parens, expected_num_of_named_capture_groups) in [ + ("()", 1, 0), + (r"\1()", 1, 0), + ("(foo)", 1, 0), + ("(foo)(bar)", 2, 0), + ("(foo(bar))", 2, 0), + ("(foo)[(bar)]", 1, 0), + (r"(foo)\(bar\)", 1, 0), + ("(foo)(?bar)", 2, 1), + ("(foo)(?=...)(?!...)(?<=...)(?bar)(?baz)", 3, 2), + ("(?.)(?..)", 2, 2), ] { - let (num_of_left_parens, named_capture_groups) = parse_capturing_groups(source_text); + let (num_of_left_parens, num_of_named_capture_groups, _) = + parse_capturing_groups(source_text); assert_eq!(expected_num_of_left_parens, num_of_left_parens); - assert_eq!(expected_named_capture_groups_found, !named_capture_groups.is_empty()); + assert_eq!(expected_num_of_named_capture_groups, num_of_named_capture_groups); } } } From e0f4ed649a0edcb98dbfe3f503fd49e9a7ee453d Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 31 Jul 2024 17:25:17 +0900 Subject: [PATCH 109/143] Update comment --- .../src/body_parser/parser.rs | 14 ++++--- .../src/body_parser/state.rs | 38 ++++++++++--------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 78aacb4f65965..fef568a35b61d 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -33,10 +33,15 @@ impl<'a> PatternParser<'a> { pub fn parse(&mut self) -> Result> { // Pre parse whole pattern to collect: - // - 1. the number of (named|unnamed) capturing groups + // - the number of (named|unnamed) capturing groups // - For `\1` in `\1()` to be handled as indexed reference - // - 2. names of named capturing groups - // - For `\k`, `\k(?)` to be handled as early error with `NamedCaptureGroups` + // - names of named capturing groups + // - For `\k`, `\k(?)` to be handled as early error in `+NamedCaptureGroups` + // + // NOTE: It means that this perform 2 loops for every cases. + // - Pros: Code is simple enough and easy to understand + // - Cons: 1st pass is completely useless if the pattern does not contain any capturing groups + // We may revisit this if we need performance rather than simplicity. self.state.parse_capturing_groups(self.source_text); // [SS:EE] Pattern :: Disjunction @@ -44,10 +49,9 @@ impl<'a> PatternParser<'a> { if 2 ^ 32 < self.state.num_of_capturing_groups { return Err(OxcDiagnostic::error("Too many capturing groups")); } - // [SS:EE] Pattern :: Disjunction // It is a Syntax Error if Pattern contains two or more GroupSpecifiers for which the CapturingGroupName of GroupSpecifier is the same. - if self.state.num_of_named_capture_groups as usize != self.state.found_group_names.len() { + if self.state.num_of_named_capturing_groups as usize != self.state.found_group_names.len() { return Err(OxcDiagnostic::error("Duplicated group name")); } diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index a5cc1adbedf18..7793950e44aa4 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -2,13 +2,16 @@ use rustc_hash::FxHashSet; use super::reader::Reader; +/// Currently all of properties are read only. #[derive(Debug)] pub struct State<'a> { + // Mode flags pub unicode_mode: bool, pub unicode_sets_mode: bool, pub named_capture_groups: bool, + // Other states pub num_of_capturing_groups: u32, - pub num_of_named_capture_groups: u32, + pub num_of_named_capturing_groups: u32, pub found_group_names: FxHashSet<&'a str>, } @@ -17,7 +20,7 @@ impl<'a> State<'a> { let unicode_mode = unicode_flag || unicode_sets_flag; let unicode_sets_mode = unicode_sets_flag; // In Annex B, this is `false` by default. - // But it is `true` + // It is `true` // - if `u` or `v` flag is set // - or if `GroupName` is found in pattern let named_capture_groups = unicode_flag || unicode_sets_flag; @@ -27,38 +30,38 @@ impl<'a> State<'a> { unicode_sets_mode, named_capture_groups, num_of_capturing_groups: 0, - num_of_named_capture_groups: 0, + num_of_named_capturing_groups: 0, found_group_names: FxHashSet::default(), } } pub fn parse_capturing_groups(&mut self, source_text: &'a str) { - let (num_of_left_parens, num_of_named_capture_groups, named_capture_groups) = + let (num_of_left_parens, num_of_named_capturing_groups, named_capturing_groups) = parse_capturing_groups(source_text); // Enable `NamedCaptureGroups` if capturing group found - if !named_capture_groups.is_empty() { + if 0 < num_of_named_capturing_groups { self.named_capture_groups = true; } self.num_of_capturing_groups = num_of_left_parens; - self.num_of_named_capture_groups = num_of_named_capture_groups; - self.found_group_names = named_capture_groups; + self.num_of_named_capturing_groups = num_of_named_capturing_groups; + self.found_group_names = named_capturing_groups; } } -/// Returns: (num_of_left_parens, named_capture_groups) +/// Returns: (num_of_left_parens, num_of_named_capturing_groups, named_capturing_groups) fn parse_capturing_groups(source_text: &str) -> (u32, u32, FxHashSet<&str>) { let mut num_of_left_parens = 0; - let mut num_of_named_capture_groups = 0; - let mut named_capture_groups = FxHashSet::default(); + let mut num_of_named_capturing_groups = 0; + let mut named_capturing_groups = FxHashSet::default(); let mut reader = Reader::new(source_text, true); let mut in_escape = false; let mut in_character_class = false; - // Count only normal capturing group(named, unnamed) + // Count only normal CapturingGroup(named, unnamed) // (?...), (...) // IgnoreGroup, and LookaroundAssertions are ignored // (?:...) @@ -101,8 +104,9 @@ fn parse_capturing_groups(source_text: &str) -> (u32, u32, FxHashSet<&str>) { if reader.eat('>') { let group_name = &source_text[span_start..span_end]; - named_capture_groups.insert(group_name); - num_of_named_capture_groups += 1; + // May be duplicated + named_capturing_groups.insert(group_name); + num_of_named_capturing_groups += 1; continue; } } @@ -111,7 +115,7 @@ fn parse_capturing_groups(source_text: &str) -> (u32, u32, FxHashSet<&str>) { reader.advance(); } - (num_of_left_parens, num_of_named_capture_groups, named_capture_groups) + (num_of_left_parens, num_of_named_capturing_groups, named_capturing_groups) } #[cfg(test)] @@ -120,7 +124,7 @@ mod tests { #[test] fn test_count_capturing_groups() { - for (source_text, expected_num_of_left_parens, expected_num_of_named_capture_groups) in [ + for (source_text, expected_num_of_left_parens, expected_num_of_named_capturing_groups) in [ ("()", 1, 0), (r"\1()", 1, 0), ("(foo)", 1, 0), @@ -133,10 +137,10 @@ mod tests { ("(foo)(?bar)(?baz)", 3, 2), ("(?.)(?..)", 2, 2), ] { - let (num_of_left_parens, num_of_named_capture_groups, _) = + let (num_of_left_parens, num_of_named_capturing_groups, _) = parse_capturing_groups(source_text); assert_eq!(expected_num_of_left_parens, num_of_left_parens); - assert_eq!(expected_num_of_named_capture_groups, num_of_named_capture_groups); + assert_eq!(expected_num_of_named_capturing_groups, num_of_named_capturing_groups); } } } From c5a3494a1f43ae229c1710628d46e562c699dc2a Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 31 Jul 2024 17:28:12 +0900 Subject: [PATCH 110/143] Fmt --- crates/oxc_regexp_parser/src/body_parser/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index fef568a35b61d..41718fa77fb9c 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -39,7 +39,7 @@ impl<'a> PatternParser<'a> { // - For `\k`, `\k(?)` to be handled as early error in `+NamedCaptureGroups` // // NOTE: It means that this perform 2 loops for every cases. - // - Pros: Code is simple enough and easy to understand + // - Pros: Code is simple enough and easy to understand // - Cons: 1st pass is completely useless if the pattern does not contain any capturing groups // We may revisit this if we need performance rather than simplicity. self.state.parse_capturing_groups(self.source_text); From c349187814949759d6e4172d0b76fb02b8c1602d Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 1 Aug 2024 17:56:16 +0900 Subject: [PATCH 111/143] Wip class_set_expression --- crates/oxc_regexp_parser/examples/parser.rs | 7 + crates/oxc_regexp_parser/src/ast.rs | 16 + .../src/body_parser/parser.rs | 296 +++++++++++++++++- .../src/body_parser/unicode.rs | 55 ++++ 4 files changed, 367 insertions(+), 7 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index e8a1e51e3b801..c8585d47098d1 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -26,6 +26,13 @@ fn main() { (r"/^(? { #[derive(Debug)] pub enum CharacterClassContentsKind { Union, + /// `UnicodeSetsMode` only Intersection, + /// `UnicodeSetsMode` only Subtraction, } #[derive(Debug)] @@ -162,6 +164,10 @@ pub enum CharacterClassContents<'a> { CharacterClassEscape(CharacterClassEscape), UnicodePropertyEscape(Box<'a, UnicodePropertyEscape<'a>>), Character(Character), + /// `UnicodeSetsMode` only + NestedCharacterClass(Box<'a, CharacterClass<'a>>), + /// `UnicodeSetsMode` only + ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), } #[derive(Debug)] pub struct CharacterClassRange { @@ -169,6 +175,16 @@ pub struct CharacterClassRange { pub min: Character, pub max: Character, } +#[derive(Debug)] +pub struct ClassStringDisjunction<'a> { + pub span: Span, + pub body: Vec<'a, ClassString<'a>>, +} +#[derive(Debug)] +pub struct ClassString<'a> { + pub span: Span, + pub body: Vec<'a, Character>, +} #[derive(Debug)] pub struct CapturingGroup<'a> { diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 41718fa77fb9c..a4a61be4d452a 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -277,7 +277,7 @@ impl<'a> PatternParser<'a> { // . // \ AtomEscape[?UnicodeMode, ?NamedCaptureGroups] // CharacterClass[?UnicodeMode, ?UnicodeSetsMode] - // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ( GroupSpecifier[?UnicodeMode][opt] Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` fn parse_atom(&mut self) -> Result>> { @@ -321,7 +321,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Term::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); } - // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ( GroupSpecifier[?UnicodeMode][opt] Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ( Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(capturing_group) = self.parse_capturing_group()? { return Ok(Some(ast::Term::CapturingGroup(Box::new_in( @@ -339,7 +339,7 @@ impl<'a> PatternParser<'a> { // \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] // \ [lookahead = c] // CharacterClass[~UnicodeMode, ~UnicodeSetsMode] - // ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // ( GroupSpecifier[~UnicodeMode][opt] Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) // (?: Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) // InvalidBracedQuantifier // ExtendedPatternCharacter @@ -385,7 +385,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Term::IgnoreGroup(Box::new_in(ignore_group, self.allocator)))); } - // ( GroupSpecifier[~UnicodeMode]opt Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) + // ( GroupSpecifier[~UnicodeMode][opt] Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) // ( Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] ) if let Some(capturing_group) = self.parse_capturing_group()? { return Ok(Some(ast::Term::CapturingGroup(Box::new_in( @@ -724,7 +724,7 @@ impl<'a> PatternParser<'a> { // [+UnicodeSetsMode] ClassSetExpression if self.state.unicode_sets_mode { - return Err(OxcDiagnostic::error("TODO: ClassSetExpression")); + return self.parse_class_set_expression(); } // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] self.parse_nonempty_class_ranges() @@ -961,7 +961,289 @@ impl<'a> PatternParser<'a> { } // ``` - // ( GroupSpecifier[?UnicodeMode]opt Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) + // ClassSetExpression :: + // ClassUnion + // ClassIntersection + // ClassSubtraction + // ``` + fn parse_class_set_expression( + &mut self, + ) -> Result<(ast::CharacterClassContentsKind, Vec<'a, ast::CharacterClassContents<'a>>)> { + // ClassUnion :: ClassSetRange ClassUnion[opt] + if let Some(class_set_range) = self.parse_class_set_range()? { + return self.parse_class_set_union(class_set_range); + } + + if let Some(class_set_operand) = self.parse_class_set_operand()? { + // ClassIntersection + if self.reader.peek().filter(|&cp| cp == '&' as u32).is_some() + && self.reader.peek2().filter(|&cp| cp == '&' as u32).is_some() + { + return self.parse_class_set_intersection(class_set_operand); + } + // ClassSubtraction + if self.reader.peek().filter(|&cp| cp == '-' as u32).is_some() + && self.reader.peek2().filter(|&cp| cp == '-' as u32).is_some() + { + return self.parse_class_set_subtraction(class_set_operand); + } + + // ClassUnion :: ClassSetOperand ClassUnion[opt] + return self.parse_class_set_union(class_set_operand); + } + + Err(OxcDiagnostic::error("Invalid character in character class")) + } + + // ``` + // ClassUnion :: + // ClassSetRange ClassUnion[opt] + // ClassSetOperand ClassUnion[opt] + // ``` + fn parse_class_set_union( + &mut self, + class_set_range_or_class_set_operand: ast::CharacterClassContents<'a>, + ) -> Result<(ast::CharacterClassContentsKind, Vec<'a, ast::CharacterClassContents<'a>>)> { + let mut body = Vec::new_in(self.allocator); + body.push(class_set_range_or_class_set_operand); + + loop { + if let Some(class_set_range) = self.parse_class_set_range()? { + body.push(class_set_range); + continue; + } + if let Some(class_set_operand) = self.parse_class_set_operand()? { + body.push(class_set_operand); + continue; + } + + break; + } + + Ok((ast::CharacterClassContentsKind::Union, body)) + } + + // ``` + // ClassIntersection :: + // ClassSetOperand && [lookahead ≠ &] ClassSetOperand + // ClassIntersection && [lookahead ≠ &] ClassSetOperand + // ``` + fn parse_class_set_intersection( + &mut self, + class_set_operand: ast::CharacterClassContents<'a>, + ) -> Result<(ast::CharacterClassContentsKind, Vec<'a, ast::CharacterClassContents<'a>>)> { + let mut body = Vec::new_in(self.allocator); + body.push(class_set_operand); + + loop { + if self.reader.peek().filter(|&cp| cp == ']' as u32).is_some() { + break; + } + + if self.reader.eat2('&', '&') { + if self.reader.eat('&') { + return Err(OxcDiagnostic::error("Unexpected &")); + } + + if let Some(class_set_operand) = self.parse_class_set_operand()? { + body.push(class_set_operand); + continue; + } + } + + return Err(OxcDiagnostic::error("Invalid character in character class")); + } + + Ok((ast::CharacterClassContentsKind::Intersection, body)) + } + + // ``` + // ClassSubtraction :: + // ClassSetOperand -- ClassSetOperand + // ClassSubtraction -- ClassSetOperand + // ``` + fn parse_class_set_subtraction( + &mut self, + class_set_operand: ast::CharacterClassContents<'a>, + ) -> Result<(ast::CharacterClassContentsKind, Vec<'a, ast::CharacterClassContents<'a>>)> { + let mut body = Vec::new_in(self.allocator); + body.push(class_set_operand); + + loop { + if self.reader.peek().filter(|&cp| cp == ']' as u32).is_some() { + break; + } + + if self.reader.eat2('-', '-') { + if let Some(class_set_operand) = self.parse_class_set_operand()? { + body.push(class_set_operand); + continue; + } + } + + return Err(OxcDiagnostic::error("Invalid character in character class")); + } + + Ok((ast::CharacterClassContentsKind::Subtraction, body)) + } + + // ``` + // ClassSetRange :: + // ClassSetCharacter - ClassSetCharacter + // ``` + fn parse_class_set_range(&mut self) -> Result>> { + let checkpoint = self.reader.checkpoint(); + if let Some(class_set_character) = self.parse_class_set_character()? { + if self.reader.eat('-') { + if let Some(class_set_character_to) = self.parse_class_set_character()? { + return Ok(Some(ast::CharacterClassContents::CharacterClassRange( + Box::new_in( + ast::CharacterClassRange { + span: class_set_character.span.merge(&class_set_character_to.span), + min: class_set_character, + max: class_set_character_to, + }, + self.allocator, + ), + ))); + } + } + } + self.reader.rewind(checkpoint); + + Ok(None) + } + + // ``` + // ClassSetOperand :: + // NestedClass + // ClassStringDisjunction + // ClassSetCharacter + // + // NestedClass :: + // [ [lookahead ≠ ^] ClassContents[+UnicodeMode, +UnicodeSetsMode] ] + // [^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] + // \ CharacterClassEscape[+UnicodeMode] + // + // ClassStringDisjunction :: + // \q{ ClassStringDisjunctionContents } + // ``` + fn parse_class_set_operand(&mut self) -> Result>> { + // NestedClass :: CharacterClass + if let Some(character_class) = self.parse_character_class()? { + return Ok(Some(ast::CharacterClassContents::NestedCharacterClass(Box::new_in( + character_class, + self.allocator, + )))); + } + + // NestedClass :: \ CharacterClassEscape + let span_start = self.reader.span_position(); + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('\\') { + if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { + return Ok(Some(ast::CharacterClassContents::CharacterClassEscape( + character_class_escape, + ))); + } + if let Some(unicode_property_escape) = + self.parse_character_class_escape_unicode(span_start)? + { + return Ok(Some(ast::CharacterClassContents::UnicodePropertyEscape(Box::new_in( + unicode_property_escape, + self.allocator, + )))); + } + + self.reader.rewind(checkpoint); + } + + // ClassStringDisjunction + let span_start = self.reader.span_position(); + if self.reader.eat3('\\', 'q', '{') { + // TODO + // let class_string_disjunction_contents = self.parse_class_string_disjunction_contents()?; + let class_string_disjunction_contents = Vec::new_in(self.allocator); + + if self.reader.eat('}') { + return Ok(Some(ast::CharacterClassContents::ClassStringDisjunction(Box::new_in( + ast::ClassStringDisjunction { + span: self.span_factory.create(span_start, self.reader.span_position()), + body: class_string_disjunction_contents, + }, + self.allocator, + )))); + } + + return Err(OxcDiagnostic::error("Unterminated class string disjunction")); + } + + // ClassSetCharacter + if let Some(class_set_character) = self.parse_class_set_character()? { + return Ok(Some(ast::CharacterClassContents::Character(class_set_character))); + } + + Ok(None) + } + + // TODO + // fn parse_class_string_disjunction_contents(&mut self) {} + + // ``` + // ClassSetCharacter :: + // [lookahead ∉ ClassSetReservedDoublePunctuator] SourceCharacter but not ClassSetSyntaxCharacter + // \ CharacterEscape[+UnicodeMode] + // \ ClassSetReservedPunctuator + // \b + // ``` + fn parse_class_set_character(&mut self) -> Result> { + let span_start = self.reader.span_position(); + + if let (Some(cp1), Some(cp2)) = (self.reader.peek(), self.reader.peek2()) { + if !unicode::is_class_set_reserved_double_punctuator(cp1, cp2) + && !unicode::is_class_set_syntax_character(cp1) + { + self.reader.advance(); + + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: cp1, + })); + } + } + + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('\\') { + if let Some(character_escape) = self.parse_character_escape(span_start)? { + return Ok(Some(character_escape)); + } + if let Some(cp) = + self.reader.peek().filter(|&cp| unicode::is_class_set_reserved_punctuator(cp)) + { + self.reader.advance(); + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Identifier, + value: cp, + })); + } + if self.reader.eat('b') { + return Ok(Some(ast::Character { + span: self.span_factory.create(span_start, self.reader.span_position()), + kind: ast::CharacterKind::Symbol, + value: 'b' as u32, + })); + } + + self.reader.rewind(checkpoint); + } + + Ok(None) + } + + // ``` + // ( GroupSpecifier[?UnicodeMode][opt] Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // // GroupSpecifier[UnicodeMode] :: // ? GroupName[?UnicodeMode] @@ -1093,7 +1375,7 @@ impl<'a> PatternParser<'a> { // ``` // DecimalEscape :: - // NonZeroDigit DecimalDigits[~Sep]opt [lookahead ∉ DecimalDigit] + // NonZeroDigit DecimalDigits[~Sep][opt] [lookahead ∉ DecimalDigit] // ``` fn consume_decimal_escape(&mut self) -> Option { if let Some(index) = self.consume_decimal_digits() { diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index 3f387e1f988c5..78768b6f713be 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -11,6 +11,61 @@ pub fn is_syntax_character(cp: u32) -> bool { }) } +// ``` +// ClassSetSyntaxCharacter :: one of +// ( ) [ ] { } / - \ | +// ``` +pub fn is_class_set_syntax_character(cp: u32) -> bool { + char::from_u32(cp) + .map_or(false, |c| matches!(c, '(' | ')' | '[' | ']' | '{' | '}' | '/' | '-' | '\\' | '|')) +} + +// ``` +// ClassSetReservedDoublePunctuator :: one of +// && !! ## $$ %% ** ++ ,, .. :: ;; << == >> ?? @@ ^^ `` ~~ +// ```` +pub fn is_class_set_reserved_double_punctuator(cp1: u32, cp2: u32) -> bool { + char::from_u32(cp1).map_or(false, |c1| { + char::from_u32(cp2).map_or(false, |c2| { + matches!( + (c1, c2), + ('&', '&') + | ('!', '!') + | ('#', '#') + | ('$', '$') + | ('%', '%') + | ('*', '*') + | ('+', '+') + | (',', ',') + | ('.', '.') + | (':', ':') + | (';', ';') + | ('<', '<') + | ('=', '=') + | ('>', '>') + | ('?', '?') + | ('@', '@') + | ('^', '^') + | ('`', '`') + | ('~', '~') + ) + }) + }) +} + +// ``` +// ClassSetReservedPunctuator :: one of +// & - ! # % , : ; < = > @ ` ~ +// ``` +pub fn is_class_set_reserved_punctuator(cp: u32) -> bool { + char::from_u32(cp).map_or(false, |c| { + matches!( + c, + '&' | '-' | '!' | '#' | '%' | ',' | ':' | ';' | '<' | '=' | '>' | '@' | '`' | '~' + ) + }) +} + pub fn is_decimal_digit(cp: u32) -> bool { char::from_u32(cp).map_or(false, |c| c.is_ascii_digit()) } From 0dc7c04818f06fa4a0541bffeff55e53ca29433a Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 2 Aug 2024 10:04:11 +0900 Subject: [PATCH 112/143] Complete ClassSetExpression --- .../src/body_parser/parser.rs | 49 +++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index a4a61be4d452a..61a994c89b41f 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1130,6 +1130,7 @@ impl<'a> PatternParser<'a> { // ``` fn parse_class_set_operand(&mut self) -> Result>> { // NestedClass :: CharacterClass + // NOTE: This can be recursive! e.g. `/[a[b[c[d[e]f]g]h]i]j]/v` if let Some(character_class) = self.parse_character_class()? { return Ok(Some(ast::CharacterClassContents::NestedCharacterClass(Box::new_in( character_class, @@ -1161,9 +1162,8 @@ impl<'a> PatternParser<'a> { // ClassStringDisjunction let span_start = self.reader.span_position(); if self.reader.eat3('\\', 'q', '{') { - // TODO - // let class_string_disjunction_contents = self.parse_class_string_disjunction_contents()?; - let class_string_disjunction_contents = Vec::new_in(self.allocator); + let class_string_disjunction_contents = + self.parse_class_string_disjunction_contents()?; if self.reader.eat('}') { return Ok(Some(ast::CharacterClassContents::ClassStringDisjunction(Box::new_in( @@ -1186,8 +1186,47 @@ impl<'a> PatternParser<'a> { Ok(None) } - // TODO - // fn parse_class_string_disjunction_contents(&mut self) {} + // ``` + // ClassStringDisjunctionContents :: + // ClassString + // ClassString | ClassStringDisjunctionContents + // ``` + fn parse_class_string_disjunction_contents(&mut self) -> Result>> { + let mut body = Vec::new_in(self.allocator); + + loop { + let class_string = self.parse_class_string()?; + body.push(class_string); + + if !self.reader.eat('|') { + break; + } + } + + Ok(body) + } + + // ``` + // ClassString :: + // [empty] + // NonEmptyClassString + // + // NonEmptyClassString :: + // ClassSetCharacter NonEmptyClassString[opt] + // ``` + fn parse_class_string(&mut self) -> Result> { + let span_start = self.reader.span_position(); + + let mut body = Vec::new_in(self.allocator); + while let Some(class_set_character) = self.parse_class_set_character()? { + body.push(class_set_character); + } + + Ok(ast::ClassString { + span: self.span_factory.create(span_start, self.reader.span_position()), + body, + }) + } // ``` // ClassSetCharacter :: From fc426cc6a82a11477851d6b78c99ee115dc13667 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 2 Aug 2024 10:10:31 +0900 Subject: [PATCH 113/143] Wip SS:EE --- crates/oxc_regexp_parser/src/body_parser/parser.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 61a994c89b41f..50948c82b45d6 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1096,6 +1096,12 @@ impl<'a> PatternParser<'a> { if let Some(class_set_character) = self.parse_class_set_character()? { if self.reader.eat('-') { if let Some(class_set_character_to) = self.parse_class_set_character()? { + // [SS:EE] ClassSetRange :: ClassSetCharacter - ClassSetCharacter + // It is a Syntax Error if the CharacterValue of the first ClassSetCharacter is strictly greater than the CharacterValue of the second ClassSetCharacter. + if class_set_character_to.value < class_set_character.value { + return Err(OxcDiagnostic::error("Character set class range out of order")); + } + return Ok(Some(ast::CharacterClassContents::CharacterClassRange( Box::new_in( ast::CharacterClassRange { @@ -1137,7 +1143,6 @@ impl<'a> PatternParser<'a> { self.allocator, )))); } - // NestedClass :: \ CharacterClassEscape let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); From c191baaba183fa33e28876f4a9afa488e9d0b65e Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 2 Aug 2024 11:15:12 +0900 Subject: [PATCH 114/143] Fix negative flag bug --- crates/oxc_regexp_parser/src/body_parser/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 50948c82b45d6..666153f5f3e5b 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -541,9 +541,9 @@ impl<'a> PatternParser<'a> { } let negative = if self.reader.eat('p') { - true - } else if self.reader.eat('P') { false + } else if self.reader.eat('P') { + true } else { return Ok(None); }; From 1878416cf6fde84ee585071047512d11462bf710 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 2 Aug 2024 14:29:45 +0900 Subject: [PATCH 115/143] Complete all spec --- crates/oxc_regexp_parser/examples/parser.rs | 6 +- .../oxc_regexp_parser/src/body_parser/mod.rs | 82 +++++++++- .../src/body_parser/parser.rs | 149 ++++++++++++++---- 3 files changed, 195 insertions(+), 42 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index c8585d47098d1..1f6d2a7bf2ee3 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -33,8 +33,12 @@ fn main() { (r"/[a&&&]/v", ParserOptions::default()), // Error (r"/[a---]/v", ParserOptions::default()), // Error (r"/[^a--b--c]/v", ParserOptions::default()), + (r"/[a[b[c[d[e[f[g[h[i[j[k[l]]]]]]]]]]]]/v", ParserOptions::default()), + (r"/[\q{abc|d|e|}]/v", ParserOptions::default()), + (r"/\p{Basic_Emoji}/v", ParserOptions::default()), + (r"/[[^\q{}]]/v", ParserOptions::default()), // Error ] { - println!("Test: {pat} + {options:?}"); + println!("Test: {pat}"); let parser = Parser::new(&allocator, pat, options); let ret = parser.parse(); diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index f8ec6917dbb77..706bafe560751 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -40,17 +40,14 @@ mod test { ("a.b..", ParserOptions::default()), (r"\d\D\s\S\w\W", ParserOptions::default()), ( - r"\p{Emoji_Presentation}\P{Script_Extensions=Latin}\p{Sc}|\p{P}", + r"\p{Emoji_Presentation}\P{Script_Extensions=Latin}\p{Sc}|\p{Basic_Emoji}", ParserOptions::default(), ), ( r"\p{Emoji_Presentation}\P{Script_Extensions=Latin}\p{Sc}|\p{P}", ParserOptions::default().with_unicode_flags(true, false), ), - ( - r"\p{Emoji_Presentation}\P{Script_Extensions=Latin}\p{Sc}|\p{P}", - ParserOptions::default().with_unicode_flags(true, true), - ), + (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_flags(true, true)), (r"\n\cM\0\x41\u1f60\.\/", ParserOptions::default()), (r"\u", ParserOptions::default()), (r"\u{", ParserOptions::default()), @@ -123,7 +120,6 @@ mod test { ("a{1", ParserOptions::default().with_unicode_flags(true, false)), ("a{1,", ParserOptions::default().with_unicode_flags(true, false)), ("a{,", ParserOptions::default().with_unicode_flags(true, false)), - ("a{2,1}", ParserOptions::default()), ("(?=a", ParserOptions::default()), ("(?", ParserOptions::default().with_unicode_flags(true, false)), - (r"(?)\k", ParserOptions::default()), - (r"(?..)(?..)", ParserOptions::default()), ("a(?:", ParserOptions::default()), ("(a", ParserOptions::default()), ("(?", ParserOptions::default()), @@ -163,6 +157,78 @@ mod test { } } + #[test] + fn should_fail_early_errors() { + let allocator = Allocator::default(); + + for (source_text, options, is_err) in &[ + (r"(?..)(?..)", ParserOptions::default(), true), + (r"a{2,1}", ParserOptions::default(), true), + (r"(?)\k", ParserOptions::default(), true), + (r"()\2", ParserOptions::default().with_unicode_flags(true, false), true), + (r"[a-\d]", ParserOptions::default().with_unicode_flags(true, false), true), + (r"[\d-z]", ParserOptions::default().with_unicode_flags(true, false), true), + (r"[\d-\d]", ParserOptions::default().with_unicode_flags(true, false), true), + (r"[z-a]", ParserOptions::default(), true), + (r"\u{110000}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"(?<\uD800\uDBFF>)", ParserOptions::default(), true), + (r"\u{0}\u{110000}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"(?)", ParserOptions::default(), true), + (r"\p{Foo=Bar}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"\p{Foo}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"\P{Basic_Emoji}", ParserOptions::default().with_unicode_flags(true, true), true), + (r"[^\p{Basic_Emoji}]", ParserOptions::default().with_unicode_flags(true, true), true), + ( + r"[[^\p{Basic_Emoji}]]", + ParserOptions::default().with_unicode_flags(true, true), + true, + ), + (r"[[^\q{}]]", ParserOptions::default().with_unicode_flags(true, true), true), + (r"[[^\q{ng}]]", ParserOptions::default().with_unicode_flags(true, true), true), + (r"[[^\q{a|}]]", ParserOptions::default().with_unicode_flags(true, true), true), + (r"[[^\q{ng}\q{o|k}]]", ParserOptions::default().with_unicode_flags(true, true), true), + ( + r"[[^\q{o|k}\q{ng}\q{o|k}]]", + ParserOptions::default().with_unicode_flags(true, true), + true, + ), + ( + r"[[^\q{o|k}\q{o|k}\q{ng}]]", + ParserOptions::default().with_unicode_flags(true, true), + true, + ), + (r"[[^\q{}&&\q{ng}]]", ParserOptions::default().with_unicode_flags(true, true), true), + ( + r"[[^\q{ng}&&\q{o|k}]]", + ParserOptions::default().with_unicode_flags(true, true), + false, + ), + ( + r"[[^\q{ng}&&\q{o|k}&&\q{ng}]]", + ParserOptions::default().with_unicode_flags(true, true), + false, + ), + ( + r"[[^\q{ng}--\q{o|k}]]", + ParserOptions::default().with_unicode_flags(true, true), + true, + ), + ( + r"[[^\q{o|k}--\q{ng}]]", + ParserOptions::default().with_unicode_flags(true, true), + false, + ), + (r"[[z-a]]", ParserOptions::default().with_unicode_flags(true, true), true), + ] { + assert_eq!( + PatternParser::new(&allocator, source_text, *options).parse().is_err(), + *is_err, + "{source_text} should early error with {options:?}!" + ); + } + } + #[test] fn should_handle_empty() { let allocator = Allocator::default(); diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 666153f5f3e5b..65dfec3c54840 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -554,6 +554,9 @@ impl<'a> PatternParser<'a> { { // [SS:EE] CharacterClassEscape :: P{ UnicodePropertyValueExpression } // It is a Syntax Error if MayContainStrings of the UnicodePropertyValueExpression is true. + // MayContainStrings is true + // - if the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue + // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) if negative && is_strings_related { return Err(OxcDiagnostic::error("Invalid property name")); } @@ -684,6 +687,10 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if MayContainStrings of the ClassContents is true. if negative && body.iter().any(|item| match item { + // MayContainStrings is true + // - if ClassContents contains UnicodePropertyValueExpression + // - and the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue + // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) ast::CharacterClassContents::UnicodePropertyEscape(unicode_property_escape) => { unicode_property_escape.strings } @@ -1126,42 +1133,12 @@ impl<'a> PatternParser<'a> { // ClassStringDisjunction // ClassSetCharacter // - // NestedClass :: - // [ [lookahead ≠ ^] ClassContents[+UnicodeMode, +UnicodeSetsMode] ] - // [^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] - // \ CharacterClassEscape[+UnicodeMode] - // // ClassStringDisjunction :: // \q{ ClassStringDisjunctionContents } // ``` fn parse_class_set_operand(&mut self) -> Result>> { - // NestedClass :: CharacterClass - // NOTE: This can be recursive! e.g. `/[a[b[c[d[e]f]g]h]i]j]/v` - if let Some(character_class) = self.parse_character_class()? { - return Ok(Some(ast::CharacterClassContents::NestedCharacterClass(Box::new_in( - character_class, - self.allocator, - )))); - } - // NestedClass :: \ CharacterClassEscape - let span_start = self.reader.span_position(); - let checkpoint = self.reader.checkpoint(); - if self.reader.eat('\\') { - if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { - return Ok(Some(ast::CharacterClassContents::CharacterClassEscape( - character_class_escape, - ))); - } - if let Some(unicode_property_escape) = - self.parse_character_class_escape_unicode(span_start)? - { - return Ok(Some(ast::CharacterClassContents::UnicodePropertyEscape(Box::new_in( - unicode_property_escape, - self.allocator, - )))); - } - - self.reader.rewind(checkpoint); + if let Some(nested_class) = self.parse_nested_class()? { + return Ok(Some(nested_class)); } // ClassStringDisjunction @@ -1183,7 +1160,6 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Unterminated class string disjunction")); } - // ClassSetCharacter if let Some(class_set_character) = self.parse_class_set_character()? { return Ok(Some(ast::CharacterClassContents::Character(class_set_character))); } @@ -1191,6 +1167,113 @@ impl<'a> PatternParser<'a> { Ok(None) } + // ``` + // NestedClass :: + // [ [lookahead ≠ ^] ClassContents[+UnicodeMode, +UnicodeSetsMode] ] + // [^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] + // \ CharacterClassEscape[+UnicodeMode] + // ``` + fn parse_nested_class(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + if self.reader.eat('[') { + let negative = self.reader.eat('^'); + // NOTE: This can be recursive as the name suggests! + // e.g. `/[a[b[c[d[e]f]g]h]i]j]/v` + let (kind, body) = self.parse_class_contents()?; + + // [SS:EE] NestedClass :: [^ ClassContents ] + // It is a Syntax Error if MayContainStrings of the ClassContents is true. + if negative { + let may_contain_strings = |item: &ast::CharacterClassContents| match item { + // MayContainStrings is true + // - if ClassContents contains UnicodePropertyValueExpression + // - && UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue + // - && it is binary property of strings(can be true only with `UnicodeSetsMode`) + ast::CharacterClassContents::UnicodePropertyEscape(unicode_property_escape) => { + unicode_property_escape.strings + } + // MayContainStrings is true + // - if ClassStringDisjunction is [empty] + // - || if ClassStringDisjunction contains ClassString + // - && ClassString is [empty] + // - || ClassString contains 2 more ClassSetCharacters + ast::CharacterClassContents::ClassStringDisjunction( + class_string_disjunction, + ) => { + class_string_disjunction.body.is_empty() + || class_string_disjunction + .body + .iter() + .any(|class_string| class_string.body.len() != 1) + } + _ => false, + }; + + if match kind { + // MayContainStrings is true + // - if ClassContents is ClassUnion + // - && ClassUnion has ClassOperands + // - && at least 1 ClassOperand has MayContainStrings: true + ast::CharacterClassContentsKind::Union => { + body.iter().any(|item| may_contain_strings(item)) + } + // MayContainStrings is true + // - if ClassContents is ClassIntersection + // - && ClassIntersection has ClassOperands + // - && all ClassOperands have MayContainStrings: true + ast::CharacterClassContentsKind::Intersection => { + body.iter().all(|item| may_contain_strings(item)) + } + // MayContainStrings is true + // - if ClassContents is ClassSubtraction + // - && ClassSubtraction has ClassOperands + // - && the first ClassOperand has MayContainStrings: true + ast::CharacterClassContentsKind::Subtraction => { + body.iter().next().map_or(false, |item| may_contain_strings(item)) + } + } { + return Err(OxcDiagnostic::error("Invalid character class")); + } + } + + if self.reader.eat(']') { + return Ok(Some(ast::CharacterClassContents::NestedCharacterClass(Box::new_in( + ast::CharacterClass { + span: self.span_factory.create(span_start, self.reader.span_position()), + negative, + kind, + body, + }, + self.allocator, + )))); + } + + return Err(OxcDiagnostic::error("Unterminated character class")); + } + + let span_start = self.reader.span_position(); + let checkpoint = self.reader.checkpoint(); + if self.reader.eat('\\') { + if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { + return Ok(Some(ast::CharacterClassContents::CharacterClassEscape( + character_class_escape, + ))); + } + if let Some(unicode_property_escape) = + self.parse_character_class_escape_unicode(span_start)? + { + return Ok(Some(ast::CharacterClassContents::UnicodePropertyEscape(Box::new_in( + unicode_property_escape, + self.allocator, + )))); + } + + self.reader.rewind(checkpoint); + } + + Ok(None) + } + // ``` // ClassStringDisjunctionContents :: // ClassString From 6021f94fceae733b0e544d199cab928e3b96255e Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Mon, 5 Aug 2024 21:33:34 +0900 Subject: [PATCH 116/143] Update comments --- crates/oxc_regexp_parser/README.md | 3 ++- crates/oxc_regexp_parser/src/body_parser/parser.rs | 13 +++++++++---- crates/oxc_regexp_parser/src/flag_parser.rs | 1 - crates/oxc_regexp_parser/src/literal_parser.rs | 7 +++---- crates/oxc_regexp_parser/src/options.rs | 8 ++++---- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/crates/oxc_regexp_parser/README.md b/crates/oxc_regexp_parser/README.md index 6a96a150b11d8..974bd3612620f 100644 --- a/crates/oxc_regexp_parser/README.md +++ b/crates/oxc_regexp_parser/README.md @@ -1,7 +1,8 @@ # oxc_regexp_parser -Follows ECMAScript® 2024 Language Specification +Implements ECMAScript® 2024 Language Specification +- https://tc39.es/ecma262/2024/multipage/ecmascript-language-lexical-grammar.html#sec-literals-regular-expression-literals - https://tc39.es/ecma262/2024/multipage/text-processing.html#sec-regexp-regular-expression-objects - https://tc39.es/ecma262/2024/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regular-expressions-patterns diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 65dfec3c54840..27bd8ce7f8951 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -19,7 +19,9 @@ pub struct PatternParser<'a> { impl<'a> PatternParser<'a> { pub fn new(allocator: &'a Allocator, source_text: &'a str, options: ParserOptions) -> Self { - // For `new RegExp("")` or `new RegExp()` (= empty) + // `RegExp` can not be empty. + // - Literal `//` means just a single line comment + // - For `new RegExp("")` or `new RegExp()` (= empty), use a placeholder let source_text = if source_text.is_empty() { "(?:)" } else { source_text }; Self { @@ -41,7 +43,7 @@ impl<'a> PatternParser<'a> { // NOTE: It means that this perform 2 loops for every cases. // - Pros: Code is simple enough and easy to understand // - Cons: 1st pass is completely useless if the pattern does not contain any capturing groups - // We may revisit this if we need performance rather than simplicity. + // We may re-consider this if we need more performance rather than simplicity. self.state.parse_capturing_groups(self.source_text); // [SS:EE] Pattern :: Disjunction @@ -55,13 +57,16 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error("Duplicated group name")); } - let result = self.parse_disjunction()?; + let disjunction = self.parse_disjunction()?; if self.reader.peek().is_some() { return Err(OxcDiagnostic::error("Could not parse the entire pattern")); } - Ok(ast::Pattern { span: self.span_factory.create(0, self.source_text.len()), body: result }) + Ok(ast::Pattern { + span: self.span_factory.create(0, self.source_text.len()), + body: disjunction, + }) } // ``` diff --git a/crates/oxc_regexp_parser/src/flag_parser.rs b/crates/oxc_regexp_parser/src/flag_parser.rs index 4b1c520ff66aa..90f8b0cffdad4 100644 --- a/crates/oxc_regexp_parser/src/flag_parser.rs +++ b/crates/oxc_regexp_parser/src/flag_parser.rs @@ -50,7 +50,6 @@ impl<'a> FlagsParser<'a> { } // This should be a `SyntaxError` - // https://tc39.es/ecma262/#sec-parsepattern if unicode && unicode_sets { return Err(OxcDiagnostic::error("Invalid regular expression flags")); } diff --git a/crates/oxc_regexp_parser/src/literal_parser.rs b/crates/oxc_regexp_parser/src/literal_parser.rs index b1d9145502a75..17635ca718969 100644 --- a/crates/oxc_regexp_parser/src/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/literal_parser.rs @@ -6,7 +6,7 @@ use crate::{ span::SpanFactory, }; -// LiteralParser +/// LiteralParser pub struct Parser<'a> { allocator: &'a Allocator, source_text: &'a str, @@ -26,10 +26,11 @@ impl<'a> Parser<'a> { pub fn parse(self) -> Result> { // Precheck if the source text is a valid regular expression literal + // If valid, parse the pattern and flags with returned span offsets let (body_start_offset, body_end_offset, flag_start_offset) = parse_reg_exp_literal(self.source_text)?; - // If valid, parse flags first + // Parse flags first to know if unicode mode is enabled or not let flags = FlagsParser::new( self.allocator, &self.source_text[flag_start_offset..], @@ -61,7 +62,6 @@ impl<'a> Parser<'a> { /// ``` /// / RegularExpressionBody / RegularExpressionFlags /// ``` -/// /// Returns `(body_start_offset, body_end_offset, flag_start_offset)`. fn parse_reg_exp_literal(source_text: &str) -> Result<(usize, usize, usize)> { let mut offset = 0; @@ -95,7 +95,6 @@ fn parse_reg_exp_literal(source_text: &str) -> Result<(usize, usize, usize)> { in_character_class = false; } else if ch == '/' && !in_character_class // `*` is not allowed as `RegularExpressionFirstChar` - // https://tc39.es/ecma262/#prod-RegularExpressionBody || offset == body_start && ch == '*' { break; diff --git a/crates/oxc_regexp_parser/src/options.rs b/crates/oxc_regexp_parser/src/options.rs index 538b0b509de86..f8ba144b80c79 100644 --- a/crates/oxc_regexp_parser/src/options.rs +++ b/crates/oxc_regexp_parser/src/options.rs @@ -1,10 +1,10 @@ #[derive(Clone, Copy, Debug, Default)] pub struct ParserOptions { - /// Used to adjust Span pos to the global source code. + /// Used to adjust Span positions to fit the global source code. pub span_offset: u32, - /// The same as `u` flag. + /// The same as `u` flag, enable Unicode mode. pub unicode_flag: bool, - /// The same as `v` flag, it extends `u` flag behavior. + /// The same as `v` flag, enable extended Unicode mode. pub unicode_sets_flag: bool, } @@ -16,7 +16,7 @@ impl ParserOptions { #[must_use] /// Only for `PatternParser` alone usage API. - /// `FlagParser` does not use these, (Literal)`Parser` internally updates with parsed flags. + /// `FlagParser` does not use, `(Literal)Parser` internally updates with parsed flags. pub fn with_unicode_flags(self, unicode_flag: bool, unicode_sets_flag: bool) -> ParserOptions { ParserOptions { unicode_flag, unicode_sets_flag, ..self } } From 242147538b3a1bc222b305e029c28b087b3799dc Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 08:48:19 +0900 Subject: [PATCH 117/143] Explicit pattern options --- .../oxc_regexp_parser/src/body_parser/mod.rs | 154 +++++++----------- .../src/body_parser/parser.rs | 4 +- .../oxc_regexp_parser/src/literal_parser.rs | 12 +- crates/oxc_regexp_parser/src/options.rs | 18 +- 4 files changed, 78 insertions(+), 110 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index 706bafe560751..37b8ba69f39c0 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -45,16 +45,16 @@ mod test { ), ( r"\p{Emoji_Presentation}\P{Script_Extensions=Latin}\p{Sc}|\p{P}", - ParserOptions::default().with_unicode_flags(true, false), + ParserOptions::default().with_unicode_mode(), ), - (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_flags(true, true)), + (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_sets_mode()), (r"\n\cM\0\x41\u1f60\.\/", ParserOptions::default()), (r"\u", ParserOptions::default()), (r"\u{", ParserOptions::default()), (r"\u{}", ParserOptions::default()), (r"\u{0}", ParserOptions::default()), (r"\u{1f600}", ParserOptions::default()), - (r"\u{1f600}", ParserOptions::default().with_unicode_flags(true, false)), + (r"\u{1f600}", ParserOptions::default().with_unicode_mode()), ("(?:abc)", ParserOptions::default()), (r"(?<\u{1d49c}>.)\x1f", ParserOptions::default()), ("a]", ParserOptions::default()), @@ -88,10 +88,10 @@ mod test { (r"\k<4>", ParserOptions::default()), (r"\k", ParserOptions::default()), (r"(?)\k", ParserOptions::default()), - (r"(?)\k", ParserOptions::default().with_unicode_flags(true, false)), + (r"(?)\k", ParserOptions::default().with_unicode_mode()), (r"\1", ParserOptions::default()), (r"\1()", ParserOptions::default()), - (r"\1()", ParserOptions::default().with_unicode_flags(true, false)), + (r"\1()", ParserOptions::default().with_unicode_mode()), (r"(?..)(?..)", ParserOptions::default()), // TODO: ES2025 Duplicate named capturing groups // (r"(?..)|(?..)", ParserOptions::default()), @@ -112,36 +112,36 @@ mod test { for (source_text, options) in &[ ("a)", ParserOptions::default()), (r"a\", ParserOptions::default()), - ("a]", ParserOptions::default().with_unicode_flags(true, false)), - ("a}", ParserOptions::default().with_unicode_flags(true, false)), + ("a]", ParserOptions::default().with_unicode_mode()), + ("a}", ParserOptions::default().with_unicode_mode()), ("a|+", ParserOptions::default()), - ("a|{", ParserOptions::default().with_unicode_flags(true, false)), - ("a{", ParserOptions::default().with_unicode_flags(true, false)), - ("a{1", ParserOptions::default().with_unicode_flags(true, false)), - ("a{1,", ParserOptions::default().with_unicode_flags(true, false)), - ("a{,", ParserOptions::default().with_unicode_flags(true, false)), + ("a|{", ParserOptions::default().with_unicode_mode()), + ("a{", ParserOptions::default().with_unicode_mode()), + ("a{1", ParserOptions::default().with_unicode_mode()), + ("a{1,", ParserOptions::default().with_unicode_mode()), + ("a{,", ParserOptions::default().with_unicode_mode()), ("(?=a", ParserOptions::default()), ("(?", ParserOptions::default().with_unicode_flags(true, false)), - (r"\k<4>", ParserOptions::default().with_unicode_flags(true, false)), - (r"\k", ParserOptions::default().with_unicode_flags(true, false)), + (r"a\u", ParserOptions::default().with_unicode_mode()), + (r"\p{Emoji_Presentation", ParserOptions::default().with_unicode_mode()), + (r"\p{Script=", ParserOptions::default().with_unicode_mode()), + (r"\ka", ParserOptions::default().with_unicode_mode()), + (r"\k", ParserOptions::default().with_unicode_mode()), + (r"\k<", ParserOptions::default().with_unicode_mode()), + (r"\k<>", ParserOptions::default().with_unicode_mode()), + (r"\k<4>", ParserOptions::default().with_unicode_mode()), + (r"\k", ParserOptions::default().with_unicode_mode()), ("a(?:", ParserOptions::default()), ("(a", ParserOptions::default()), ("(?", ParserOptions::default()), - ("(?=a){1}", ParserOptions::default().with_unicode_flags(true, false)), - ("(?!a){1}", ParserOptions::default().with_unicode_flags(true, false)), - (r"[\d-\D]", ParserOptions::default().with_unicode_flags(true, false)), + ("(?=a){1}", ParserOptions::default().with_unicode_mode()), + ("(?!a){1}", ParserOptions::default().with_unicode_mode()), + (r"[\d-\D]", ParserOptions::default().with_unicode_mode()), ("[z-a]", ParserOptions::default()), - (r"[a-c]]", ParserOptions::default().with_unicode_flags(true, false)), + (r"[a-c]]", ParserOptions::default().with_unicode_mode()), ( r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", ParserOptions::default(), @@ -165,61 +165,37 @@ mod test { (r"(?..)(?..)", ParserOptions::default(), true), (r"a{2,1}", ParserOptions::default(), true), (r"(?)\k", ParserOptions::default(), true), - (r"()\2", ParserOptions::default().with_unicode_flags(true, false), true), - (r"[a-\d]", ParserOptions::default().with_unicode_flags(true, false), true), - (r"[\d-z]", ParserOptions::default().with_unicode_flags(true, false), true), - (r"[\d-\d]", ParserOptions::default().with_unicode_flags(true, false), true), + (r"()\2", ParserOptions::default().with_unicode_mode(), true), + (r"[a-\d]", ParserOptions::default().with_unicode_mode(), true), + (r"[\d-z]", ParserOptions::default().with_unicode_mode(), true), + (r"[\d-\d]", ParserOptions::default().with_unicode_mode(), true), (r"[z-a]", ParserOptions::default(), true), - (r"\u{110000}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"\u{110000}", ParserOptions::default().with_unicode_mode(), true), (r"(?<\uD800\uDBFF>)", ParserOptions::default(), true), - (r"\u{0}\u{110000}", ParserOptions::default().with_unicode_flags(true, false), true), + (r"\u{0}\u{110000}", ParserOptions::default().with_unicode_mode(), true), (r"(?)", ParserOptions::default(), true), - (r"\p{Foo=Bar}", ParserOptions::default().with_unicode_flags(true, false), true), - (r"\p{Foo}", ParserOptions::default().with_unicode_flags(true, false), true), - (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_flags(true, false), true), - (r"\P{Basic_Emoji}", ParserOptions::default().with_unicode_flags(true, true), true), - (r"[^\p{Basic_Emoji}]", ParserOptions::default().with_unicode_flags(true, true), true), - ( - r"[[^\p{Basic_Emoji}]]", - ParserOptions::default().with_unicode_flags(true, true), - true, - ), - (r"[[^\q{}]]", ParserOptions::default().with_unicode_flags(true, true), true), - (r"[[^\q{ng}]]", ParserOptions::default().with_unicode_flags(true, true), true), - (r"[[^\q{a|}]]", ParserOptions::default().with_unicode_flags(true, true), true), - (r"[[^\q{ng}\q{o|k}]]", ParserOptions::default().with_unicode_flags(true, true), true), - ( - r"[[^\q{o|k}\q{ng}\q{o|k}]]", - ParserOptions::default().with_unicode_flags(true, true), - true, - ), - ( - r"[[^\q{o|k}\q{o|k}\q{ng}]]", - ParserOptions::default().with_unicode_flags(true, true), - true, - ), - (r"[[^\q{}&&\q{ng}]]", ParserOptions::default().with_unicode_flags(true, true), true), - ( - r"[[^\q{ng}&&\q{o|k}]]", - ParserOptions::default().with_unicode_flags(true, true), - false, - ), + (r"\p{Foo=Bar}", ParserOptions::default().with_unicode_mode(), true), + (r"\p{Foo}", ParserOptions::default().with_unicode_mode(), true), + (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_mode(), true), + (r"\P{Basic_Emoji}", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[^\p{Basic_Emoji}]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\p{Basic_Emoji}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{ng}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{a|}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{ng}\q{o|k}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{o|k}\q{ng}\q{o|k}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{o|k}\q{o|k}\q{ng}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{}&&\q{ng}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{ng}&&\q{o|k}]]", ParserOptions::default().with_unicode_sets_mode(), false), ( r"[[^\q{ng}&&\q{o|k}&&\q{ng}]]", - ParserOptions::default().with_unicode_flags(true, true), + ParserOptions::default().with_unicode_sets_mode(), false, ), - ( - r"[[^\q{ng}--\q{o|k}]]", - ParserOptions::default().with_unicode_flags(true, true), - true, - ), - ( - r"[[^\q{o|k}--\q{ng}]]", - ParserOptions::default().with_unicode_flags(true, true), - false, - ), - (r"[[z-a]]", ParserOptions::default().with_unicode_flags(true, true), true), + (r"[[^\q{ng}--\q{o|k}]]", ParserOptions::default().with_unicode_sets_mode(), true), + (r"[[^\q{o|k}--\q{ng}]]", ParserOptions::default().with_unicode_sets_mode(), false), + (r"[[z-a]]", ParserOptions::default().with_unicode_sets_mode(), true), ] { assert_eq!( PatternParser::new(&allocator, source_text, *options).parse().is_err(), @@ -242,25 +218,13 @@ mod test { let allocator = Allocator::default(); let source_text = "このEmoji🥹の数が変わる"; - let pattern = PatternParser::new( - &allocator, - source_text, - ParserOptions::default().with_unicode_flags(true, false), - ) - .parse() - .unwrap(); - assert_eq!(pattern.body.body[0].body.len(), 14); - let pattern = PatternParser::new( - &allocator, - source_text, - ParserOptions::default().with_unicode_flags(true, true), - ) - .parse() - .unwrap(); - assert_eq!(pattern.body.body[0].body.len(), 14); - - let pattern = - PatternParser::new(&allocator, source_text, ParserOptions::default()).parse().unwrap(); - assert_eq!(pattern.body.body[0].body.len(), 15); + for (options, expected) in &[ + (ParserOptions::default(), 15), + (ParserOptions::default().with_unicode_mode(), 14), + (ParserOptions::default().with_unicode_sets_mode(), 14), + ] { + let pattern = PatternParser::new(&allocator, source_text, *options).parse().unwrap(); + assert_eq!(pattern.body.body[0].body.len(), *expected); + } } } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 27bd8ce7f8951..5a3c01b4b630f 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -28,8 +28,8 @@ impl<'a> PatternParser<'a> { allocator, source_text, span_factory: SpanFactory::new(options.span_offset), - reader: Reader::new(source_text, options.unicode_flag || options.unicode_sets_flag), - state: State::new(options.unicode_flag, options.unicode_sets_flag), + reader: Reader::new(source_text, options.unicode_mode), + state: State::new(options.unicode_mode, options.unicode_sets_mode), } } diff --git a/crates/oxc_regexp_parser/src/literal_parser.rs b/crates/oxc_regexp_parser/src/literal_parser.rs index 17635ca718969..3ff1fcbee7bd0 100644 --- a/crates/oxc_regexp_parser/src/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/literal_parser.rs @@ -34,19 +34,21 @@ impl<'a> Parser<'a> { let flags = FlagsParser::new( self.allocator, &self.source_text[flag_start_offset..], - #[allow(clippy::cast_possible_truncation)] self.options.with_span_offset(self.options.span_offset + flag_start_offset as u32), ) .parse()?; // Then parse the pattern with the flags + let pattern_options = match (flags.unicode, flags.unicode_sets) { + (true, false) => self.options.with_unicode_mode(), + (_, true) => self.options.with_unicode_sets_mode(), + _ => self.options, + }; + let pattern = PatternParser::new( self.allocator, &self.source_text[body_start_offset..body_end_offset], - #[allow(clippy::cast_possible_truncation)] - self.options - .with_span_offset(self.options.span_offset + body_start_offset as u32) - .with_unicode_flags(flags.unicode, flags.unicode_sets), + pattern_options.with_span_offset(self.options.span_offset + body_start_offset as u32), ) .parse()?; diff --git a/crates/oxc_regexp_parser/src/options.rs b/crates/oxc_regexp_parser/src/options.rs index f8ba144b80c79..02280ed3378f1 100644 --- a/crates/oxc_regexp_parser/src/options.rs +++ b/crates/oxc_regexp_parser/src/options.rs @@ -2,10 +2,10 @@ pub struct ParserOptions { /// Used to adjust Span positions to fit the global source code. pub span_offset: u32, - /// The same as `u` flag, enable Unicode mode. - pub unicode_flag: bool, - /// The same as `v` flag, enable extended Unicode mode. - pub unicode_sets_flag: bool, + /// Unicode mode enabled or not. + pub unicode_mode: bool, + /// Extended Unicode mode enabled or not. + pub unicode_sets_mode: bool, } impl ParserOptions { @@ -15,9 +15,11 @@ impl ParserOptions { } #[must_use] - /// Only for `PatternParser` alone usage API. - /// `FlagParser` does not use, `(Literal)Parser` internally updates with parsed flags. - pub fn with_unicode_flags(self, unicode_flag: bool, unicode_sets_flag: bool) -> ParserOptions { - ParserOptions { unicode_flag, unicode_sets_flag, ..self } + pub fn with_unicode_mode(self) -> ParserOptions { + ParserOptions { unicode_mode: true, ..self } + } + #[must_use] + pub fn with_unicode_sets_mode(self) -> ParserOptions { + ParserOptions { unicode_mode: true, unicode_sets_mode: true, ..self } } } From 4ef3189f253ee668b37e1af05a7c7d728f0d6c47 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 09:04:55 +0900 Subject: [PATCH 118/143] Update example --- crates/oxc_regexp_parser/examples/parser.rs | 70 ++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index 1f6d2a7bf2ee3..dcb6fa99c4b73 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -6,47 +6,47 @@ use oxc_regexp_parser::{ast, Parser, ParserOptions}; fn main() { let allocator = Allocator::default(); - for (pat, options) in [ - ("/ab/", ParserOptions::default()), - ("/abc/i", ParserOptions::default()), - ("/abcd/igv", ParserOptions::default()), - ("/emo👈🏻ji/u", ParserOptions::default()), - ("/ab|c/i", ParserOptions::default()), - ("/a|b+|c/i", ParserOptions::default()), - ("/a{0}|b{1,2}|c{3,}/i", ParserOptions::default()), - ("/(?=a)|(?<=b)|(?!c)|(?x\1c/u", ParserOptions::default()), - (r"/(cg)(?cg)(?:g)/", ParserOptions::default()), - (r"/{3}/", ParserOptions::default()), // Error - (r"/Em🥹j/", ParserOptions::default()), - (r"/^(?=ab)\b(?!cd)(?<=ef)\B(?x\1c/u", + r"/(cg)(?cg)(?:g)/", + r"/{3}/", // Error + r"/Em🥹j/", + r"/^(?=ab)\b(?!cd)(?<=ef)\B(? { - println!("✨ {}", pattern.span.source_text(pat)); + println!("✨ {}", pattern.span.source_text(source_text)); println!("{pattern:#?}"); - println!("✨ {}", flags.span.source_text(pat)); + println!("✨ {}", flags.span.source_text(source_text)); println!("{flags:?}"); } Err(err) => println!("💥 {}", err.message), From f0b84fc2b58a6474ad653ef1cede682106701d14 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 09:58:11 +0900 Subject: [PATCH 119/143] More tests --- crates/oxc_regexp_parser/src/body_parser/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index 37b8ba69f39c0..b2250bbff0777 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -22,6 +22,7 @@ mod test { ("a+", ParserOptions::default()), ("a*", ParserOptions::default()), ("a?", ParserOptions::default()), + ("^$^$^$", ParserOptions::default()), ("(?=a){1}", ParserOptions::default()), ("(?!a){1}", ParserOptions::default()), ("a{1}", ParserOptions::default()), @@ -82,6 +83,15 @@ mod test { r"[ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ]", ParserOptions::default(), ), + (r"[a-z0-9[.\\]]", ParserOptions::default().with_unicode_sets_mode()), + (r"[a&&b&&c]", ParserOptions::default().with_unicode_sets_mode()), + (r"[a--b--c]", ParserOptions::default().with_unicode_sets_mode()), + (r"[[a-z]--b--c]", ParserOptions::default().with_unicode_sets_mode()), + ( + r"[[[[[[[[[[[[[[[[[[[[[[[[a]]]]]]]]]]]]]]]]]]]]]]]]", + ParserOptions::default().with_unicode_sets_mode(), + ), + (r"[\q{}\q{a}\q{bc}\q{d|e|f}\q{|||}]", ParserOptions::default().with_unicode_sets_mode()), (r"(?A)\k", ParserOptions::default()), (r"(?)\k", ParserOptions::default()), (r"\k", ParserOptions::default()), @@ -146,6 +156,11 @@ mod test { r"^([a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣա-ևᴀ-ᴫᵢ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷⁱⁿℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱼⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⴀ-ⴥꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌff-stﬓ-ﬗa-z]|\ud801[\udc28-\udc4f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb])$", ParserOptions::default(), ), + (r"[[\d-\D]]", ParserOptions::default().with_unicode_sets_mode()), + (r"[a&&b--c]", ParserOptions::default().with_unicode_sets_mode()), + (r"[a--b&&c]", ParserOptions::default().with_unicode_sets_mode()), + (r"[\q{]", ParserOptions::default().with_unicode_sets_mode()), + (r"[\q{\a}]", ParserOptions::default().with_unicode_sets_mode()), // TODO: ES2025 Duplicate named capturing groups (r"(?..)|(?..)", ParserOptions::default()), // This will be valid // (r"(?|(?))", ParserOptions::default()), // Nested, still invalid From 9d0bb08a1ec8414b531dec5fe47a626fd608ca94 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 09:58:16 +0900 Subject: [PATCH 120/143] Comment ast node --- crates/oxc_regexp_parser/src/ast.rs | 49 ++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index cc7717be1a60c..3a872d9764c78 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -3,6 +3,8 @@ use oxc_span::{Atom as SpanAtom, Span}; // NOTE: Should keep all `enum` size <= 16 +// TODO: `Disjunction` may be redundant, `Vec` may be enough. + #[derive(Debug)] pub struct RegExpLiteral<'a> { pub span: Span, @@ -23,24 +25,28 @@ pub struct Flags { pub unicode_sets: bool, } +/// The root of the `PatternParser` result. #[derive(Debug)] pub struct Pattern<'a> { pub span: Span, pub body: Disjunction<'a>, } +/// Pile of [`Alternative`]s separated by `|`. #[derive(Debug)] pub struct Disjunction<'a> { pub span: Span, pub body: Vec<'a, Alternative<'a>>, } +/// Single unit of `|` separated alternatives. #[derive(Debug)] pub struct Alternative<'a> { pub span: Span, pub body: Vec<'a, Term<'a>>, } +/// Single unit of [`Alternative`], containing various kinds. #[derive(Debug)] pub enum Term<'a> { // Assertion, QuantifiableAssertion @@ -60,6 +66,8 @@ pub enum Term<'a> { NamedReference(Box<'a, NamedReference<'a>>), } +/// Simple form of assertion. +/// e.g. `^`, `$`, `\b`, `\B` #[derive(Debug)] pub struct BoundaryAssertion { pub span: Span, @@ -73,6 +81,8 @@ pub enum BoundaryAssertionKind { NegativeBoundary, } +/// Lookaround assertion. +/// e.g. `(?=...)`, `(?!...)`, `(?<=...)`, `(? { pub span: Span, @@ -87,19 +97,24 @@ pub enum LookAroundAssertionKind { NegativeLookbehind, } +/// Quantifier holding a [`Term`] and its repetition count. +/// e.g. `a*`, `b+`, `c?`, `d{3}`, `e{4,}`, `f{5,6}` #[derive(Debug)] pub struct Quantifier<'a> { pub span: Span, pub min: u32, + /// `None` means no upper bound. pub max: Option, pub greedy: bool, pub body: Term<'a>, } +/// Single character. #[derive(Debug, Copy, Clone)] pub struct Character { pub span: Span, pub kind: CharacterKind, + /// Unicode code point or UTF-16 code unit. pub value: u32, } #[derive(Debug, Copy, Clone)] @@ -114,11 +129,8 @@ pub enum CharacterKind { UnicodeEscape, } -#[derive(Debug)] -pub struct Dot { - pub span: Span, -} - +/// Character class. +/// e.g. `\d`, `\D`, `\s`, `\S`, `\w`, `\W` #[derive(Debug)] pub struct CharacterClassEscape { pub span: Span, @@ -134,15 +146,26 @@ pub enum CharacterClassEscapeKind { NegativeW, } +/// Unicode property. +/// e.g. `\p{ASCII}`, `\P{ASCII}`, `\p{sc=Hiragana}`, `\P{sc=Hiragana}` #[derive(Debug)] pub struct UnicodePropertyEscape<'a> { pub span: Span, pub negative: bool, + /// `true` if `UnicodeSetsMode` and `name` matched unicode property of strings. pub strings: bool, pub name: SpanAtom<'a>, pub value: Option>, } +/// The `.`. +#[derive(Debug)] +pub struct Dot { + pub span: Span, +} + +/// Character class wrapped by `[]`. +/// e.g. `[a-z]`, `[^A-Z]`, `[abc]`, `[a&&b&&c]`, `[[a-z]--x--y]` #[derive(Debug)] pub struct CharacterClass<'a> { pub span: Span, @@ -153,9 +176,9 @@ pub struct CharacterClass<'a> { #[derive(Debug)] pub enum CharacterClassContentsKind { Union, - /// `UnicodeSetsMode` only + /// `UnicodeSetsMode` only. Intersection, - /// `UnicodeSetsMode` only + /// `UnicodeSetsMode` only. Subtraction, } #[derive(Debug)] @@ -169,23 +192,29 @@ pub enum CharacterClassContents<'a> { /// `UnicodeSetsMode` only ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), } +/// `-` separated range of characters. +/// e.g. `a-z`, `A-Z`, `0-9` #[derive(Debug)] pub struct CharacterClassRange { pub span: Span, pub min: Character, pub max: Character, } +/// `|` separated string of characters wrapped by `\q{}`. #[derive(Debug)] pub struct ClassStringDisjunction<'a> { pub span: Span, pub body: Vec<'a, ClassString<'a>>, } +/// Single unit of [`ClassStringDisjunction`]. #[derive(Debug)] pub struct ClassString<'a> { pub span: Span, pub body: Vec<'a, Character>, } +/// Named or unnamed capturing group. +/// e.g. `(...)`, `(?...)` #[derive(Debug)] pub struct CapturingGroup<'a> { pub span: Span, @@ -193,6 +222,8 @@ pub struct CapturingGroup<'a> { pub body: Disjunction<'a>, } +/// Pseudo-group for ignoring. +/// e.g. `(?:...)` #[derive(Debug)] pub struct IgnoreGroup<'a> { pub span: Span, @@ -207,12 +238,16 @@ pub struct ModifierFlags { pub multiline: bool, } +/// Backreference by index. +/// e.g. `\1`, `\2`, `\3` #[derive(Debug)] pub struct IndexedReference { pub span: Span, pub index: u32, } +/// Backreference by name. +/// e.g. `\k` #[derive(Debug)] pub struct NamedReference<'a> { pub span: Span, From d50e53dbfcaf50b46c2789227beb90f7b7690ad5 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 10:23:14 +0900 Subject: [PATCH 121/143] Refactor state --- .../src/body_parser/parser.rs | 2 +- .../src/body_parser/state.rs | 28 ++++++++----------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 5a3c01b4b630f..154303c3edb55 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -44,7 +44,7 @@ impl<'a> PatternParser<'a> { // - Pros: Code is simple enough and easy to understand // - Cons: 1st pass is completely useless if the pattern does not contain any capturing groups // We may re-consider this if we need more performance rather than simplicity. - self.state.parse_capturing_groups(self.source_text); + self.state.initialize_with_parsing(self.source_text); // [SS:EE] Pattern :: Disjunction // It is a Syntax Error if CountLeftCapturingParensWithin(Pattern) ≥ 2**32 - 1. diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 7793950e44aa4..27c5957bceb29 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -2,7 +2,7 @@ use rustc_hash::FxHashSet; use super::reader::Reader; -/// Currently all of properties are read only. +/// Currently all of properties are read only from outside of this module. #[derive(Debug)] pub struct State<'a> { // Mode flags @@ -16,33 +16,27 @@ pub struct State<'a> { } impl<'a> State<'a> { - pub fn new(unicode_flag: bool, unicode_sets_flag: bool) -> Self { - let unicode_mode = unicode_flag || unicode_sets_flag; - let unicode_sets_mode = unicode_sets_flag; - // In Annex B, this is `false` by default. - // It is `true` - // - if `u` or `v` flag is set - // - or if `GroupName` is found in pattern - let named_capture_groups = unicode_flag || unicode_sets_flag; - + pub fn new(unicode_mode: bool, unicode_sets_mode: bool) -> Self { Self { unicode_mode, unicode_sets_mode, - named_capture_groups, + named_capture_groups: false, num_of_capturing_groups: 0, num_of_named_capturing_groups: 0, found_group_names: FxHashSet::default(), } } - pub fn parse_capturing_groups(&mut self, source_text: &'a str) { + pub fn initialize_with_parsing(&mut self, source_text: &'a str) { let (num_of_left_parens, num_of_named_capturing_groups, named_capturing_groups) = parse_capturing_groups(source_text); - // Enable `NamedCaptureGroups` if capturing group found - if 0 < num_of_named_capturing_groups { - self.named_capture_groups = true; - } + // In Annex B, this is `false` by default. + // It is `true` + // - if `u` or `v` flag is set + // - or if `GroupName` is found in pattern + self.named_capture_groups = + self.unicode_mode || self.unicode_sets_mode || 0 < num_of_named_capturing_groups; self.num_of_capturing_groups = num_of_left_parens; self.num_of_named_capturing_groups = num_of_named_capturing_groups; @@ -104,7 +98,7 @@ fn parse_capturing_groups(source_text: &str) -> (u32, u32, FxHashSet<&str>) { if reader.eat('>') { let group_name = &source_text[span_start..span_end]; - // May be duplicated + // May be duplicated, but it's OK named_capturing_groups.insert(group_name); num_of_named_capturing_groups += 1; continue; From f64571fb4bba4c3f8822a56ab4804e2698101ef1 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 11:42:35 +0900 Subject: [PATCH 122/143] Cosmetic --- .../src/body_parser/parser.rs | 6 ++-- .../src/body_parser/unicode.rs | 36 +++++++++---------- .../src/body_parser/unicode_property.rs | 8 ++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 154303c3edb55..1475cac261ad4 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -359,8 +359,8 @@ impl<'a> PatternParser<'a> { }))); } - // \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] if self.reader.eat('\\') { + // \ AtomEscape[~UnicodeMode, ?NamedCaptureGroups] if let Some(atom_escape) = self.parse_atom_escape(span_start)? { return Ok(Some(atom_escape)); } @@ -619,8 +619,8 @@ impl<'a> PatternParser<'a> { } // e.g. \0 - if self.reader.peek().map_or(false, |cp| cp == '0' as u32) - && self.reader.peek2().map_or(true, |cp| !unicode::is_decimal_digit(cp)) + if self.reader.peek().filter(|&cp| cp == '0' as u32).is_some() + && self.reader.peek2().filter(|&cp| !unicode::is_decimal_digit(cp)).is_some() { self.reader.advance(); diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode.rs b/crates/oxc_regexp_parser/src/body_parser/unicode.rs index 78768b6f713be..31731a26b5e4f 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode.rs @@ -3,9 +3,9 @@ // ^ $ \ . * + ? ( ) [ ] { } | // ``` pub fn is_syntax_character(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| { + char::from_u32(cp).map_or(false, |ch| { matches!( - c, + ch, '^' | '$' | '\\' | '.' | '*' | '+' | '?' | '(' | ')' | '[' | ']' | '{' | '}' | '|' ) }) @@ -16,8 +16,9 @@ pub fn is_syntax_character(cp: u32) -> bool { // ( ) [ ] { } / - \ | // ``` pub fn is_class_set_syntax_character(cp: u32) -> bool { - char::from_u32(cp) - .map_or(false, |c| matches!(c, '(' | ')' | '[' | ']' | '{' | '}' | '/' | '-' | '\\' | '|')) + char::from_u32(cp).map_or(false, |ch| { + matches!(ch, '(' | ')' | '[' | ']' | '{' | '}' | '/' | '-' | '\\' | '|') + }) } // ``` @@ -25,10 +26,10 @@ pub fn is_class_set_syntax_character(cp: u32) -> bool { // && !! ## $$ %% ** ++ ,, .. :: ;; << == >> ?? @@ ^^ `` ~~ // ```` pub fn is_class_set_reserved_double_punctuator(cp1: u32, cp2: u32) -> bool { - char::from_u32(cp1).map_or(false, |c1| { - char::from_u32(cp2).map_or(false, |c2| { + char::from_u32(cp1).map_or(false, |ch1| { + char::from_u32(cp2).map_or(false, |ch2| { matches!( - (c1, c2), + (ch1, ch2), ('&', '&') | ('!', '!') | ('#', '#') @@ -58,20 +59,20 @@ pub fn is_class_set_reserved_double_punctuator(cp1: u32, cp2: u32) -> bool { // & - ! # % , : ; < = > @ ` ~ // ``` pub fn is_class_set_reserved_punctuator(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| { + char::from_u32(cp).map_or(false, |ch| { matches!( - c, + ch, '&' | '-' | '!' | '#' | '%' | ',' | ':' | ';' | '<' | '=' | '>' | '@' | '`' | '~' ) }) } pub fn is_decimal_digit(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c.is_ascii_digit()) + char::from_u32(cp).map_or(false, |ch| ch.is_ascii_digit()) } pub fn is_octal_digit(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c.is_ascii_digit() && c < '8') + char::from_u32(cp).map_or(false, |ch| ch.is_ascii_digit() && ch < '8') } pub fn is_valid_unicode(cp: u32) -> bool { @@ -83,9 +84,8 @@ pub fn is_valid_unicode(cp: u32) -> bool { // AsciiLetter // _ // ``` -// pub fn is_unicode_property_name_character(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c.is_ascii_alphabetic() || c == '_') + char::from_u32(cp).map_or(false, |ch| ch.is_ascii_alphabetic() || ch == '_') } // ``` @@ -93,9 +93,8 @@ pub fn is_unicode_property_name_character(cp: u32) -> bool { // UnicodePropertyNameCharacter // DecimalDigit // ``` -// pub fn is_unicode_property_value_character(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| c.is_ascii_alphanumeric() || c == '_') + char::from_u32(cp).map_or(false, |ch| ch.is_ascii_alphanumeric() || ch == '_') } pub fn is_unicode_id_start(cp: u32) -> bool { @@ -106,11 +105,12 @@ pub fn is_unicode_id_continue(cp: u32) -> bool { } pub fn is_identifier_start_char(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_start(c) || c == '$' || c == '_') + char::from_u32(cp) + .map_or(false, |ch| unicode_id_start::is_id_start(ch) || ch == '$' || ch == '_') } pub fn is_identifier_part_char(cp: u32) -> bool { - char::from_u32(cp).map_or(false, |c| unicode_id_start::is_id_continue(c) || c == '$') + char::from_u32(cp).map_or(false, |ch| unicode_id_start::is_id_continue(ch) || ch == '$') } pub fn is_lead_surrogate(cp: u32) -> bool { @@ -137,7 +137,7 @@ pub fn map_control_escape(cp: u32) -> Option { } pub fn map_c_ascii_letter(cp: u32) -> Option { - char::from_u32(cp).and_then(|c| c.is_ascii_alphabetic().then_some(cp % 0x20)) + char::from_u32(cp).filter(char::is_ascii_alphabetic).map(|_| cp % 0x20) } pub fn map_hex_digit(cp: u32) -> Option { diff --git a/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs index 51f38325cc39e..28841f9c40da8 100644 --- a/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs +++ b/crates/oxc_regexp_parser/src/body_parser/unicode_property.rs @@ -1,6 +1,6 @@ use phf::{phf_set, Set}; -// https://tc39.es/ecma262/multipage/text-processing.html#table-nonbinary-unicode-properties +// https://tc39.es/ecma262/2024/multipage/text-processing.html#table-nonbinary-unicode-properties pub fn is_valid_unicode_property(name: &str, value: &str) -> bool { if matches!(name, "General_Category" | "gc") { return GC_PROPERTY_VALUES.contains(value); @@ -17,7 +17,7 @@ pub fn is_valid_unicode_property(name: &str, value: &str) -> bool { pub fn is_valid_lone_unicode_property(name_or_value: &str) -> bool { BINARY_UNICODE_PROPERTIES.contains(name_or_value) } -/// This should be used with `unicode_sets_mode` +/// This should be used with `UnicodeSetsMode` pub fn is_valid_lone_unicode_property_of_strings(name_or_value: &str) -> bool { BINARY_UNICODE_PROPERTIES_OF_STRINGS.contains(name_or_value) } @@ -236,7 +236,7 @@ static SCX_PROPERTY_VALUES: Set<&'static str> = phf_set! { }; // Table 66: Binary Unicode property aliases -// https://tc39.es/ecma262/multipage/text-processing.html#table-binary-unicode-properties +// https://tc39.es/ecma262/2024/multipage/text-processing.html#table-binary-unicode-properties static BINARY_UNICODE_PROPERTIES: Set<&'static str> = phf_set! { "ASCII", "ASCII_Hex_Digit", @@ -339,7 +339,7 @@ static BINARY_UNICODE_PROPERTIES: Set<&'static str> = phf_set! { }; // Table 67: Binary Unicode properties of strings -// https://tc39.es/ecma262/multipage/text-processing.html#table-binary-unicode-properties-of-strings +// https://tc39.es/ecma262/2024/multipage/text-processing.html#table-binary-unicode-properties-of-strings static BINARY_UNICODE_PROPERTIES_OF_STRINGS: Set<&'static str> = phf_set! { "Basic_Emoji", "Emoji_Keycap_Sequence", From 5a2adf5e9dc929dc82186cc987f8ccb3b906fa75 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 13:12:47 +0900 Subject: [PATCH 123/143] Fix examples --- crates/oxc_regexp_parser/examples/parser.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parser.rs index dcb6fa99c4b73..0ce08b5a7e657 100644 --- a/crates/oxc_regexp_parser/examples/parser.rs +++ b/crates/oxc_regexp_parser/examples/parser.rs @@ -36,7 +36,8 @@ fn main() { r"/[a[b[c[d[e[f[g[h[i[j[k[l]]]]]]]]]]]]/v", r"/[\q{abc|d|e|}]/v", r"/\p{Basic_Emoji}/v", - r"/[[^\q{}]]/v", // Error + r"/[[^\q{}]]/v", // Error + r"/(?)(?)/", // Error ] { println!("Parse: {source_text}"); let parser = Parser::new(&allocator, source_text, ParserOptions::default()); @@ -49,7 +50,7 @@ fn main() { println!("✨ {}", flags.span.source_text(source_text)); println!("{flags:?}"); } - Err(err) => println!("💥 {}", err.message), + Err(err) => println!("💥 {err}"), } println!(); } From 78b28d4902f7b3886610a9f949aee191ca0e594f Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 13:17:43 +0900 Subject: [PATCH 124/143] Remove old implementation --- Cargo.lock | 8 - crates/oxc_js_regex/Cargo.toml | 24 -- crates/oxc_js_regex/README.md | 5 - crates/oxc_js_regex/src/ast.rs | 387 ------------------------- crates/oxc_js_regex/src/lexer/mod.rs | 1 - crates/oxc_js_regex/src/lexer/token.rs | 1 - crates/oxc_js_regex/src/lib.rs | 5 - crates/oxc_js_regex/src/parser.rs | 1 - crates/oxc_js_regex/src/validator.rs | 1 - crates/oxc_js_regex/src/visitor.rs | 1 - 10 files changed, 434 deletions(-) delete mode 100644 crates/oxc_js_regex/Cargo.toml delete mode 100644 crates/oxc_js_regex/README.md delete mode 100644 crates/oxc_js_regex/src/ast.rs delete mode 100644 crates/oxc_js_regex/src/lexer/mod.rs delete mode 100644 crates/oxc_js_regex/src/lexer/token.rs delete mode 100644 crates/oxc_js_regex/src/lib.rs delete mode 100644 crates/oxc_js_regex/src/parser.rs delete mode 100644 crates/oxc_js_regex/src/validator.rs delete mode 100644 crates/oxc_js_regex/src/visitor.rs diff --git a/Cargo.lock b/Cargo.lock index c87d0c2cbc32c..e1ee2fb60df13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1483,14 +1483,6 @@ dependencies = [ "rustc-hash", ] -[[package]] -name = "oxc_js_regex" -version = "0.0.0" -dependencies = [ - "oxc_allocator", - "oxc_span", -] - [[package]] name = "oxc_language_server" version = "0.0.1" diff --git a/crates/oxc_js_regex/Cargo.toml b/crates/oxc_js_regex/Cargo.toml deleted file mode 100644 index 4027e4610181e..0000000000000 --- a/crates/oxc_js_regex/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "oxc_js_regex" -version = "0.0.0" -publish = false -authors = ["Ubugeeei "] -categories.workspace = true -description.workspace = true -edition.workspace = true -homepage.workspace = true -keywords.workspace = true -license.workspace = true -repository.workspace = true -rust-version.workspace = true -include = ["/src"] - -[lints] -workspace = true - -[lib] -doctest = false - -[dependencies] -oxc_allocator = { workspace = true } -oxc_span = { workspace = true } diff --git a/crates/oxc_js_regex/README.md b/crates/oxc_js_regex/README.md deleted file mode 100644 index f1e6b2fc5370f..0000000000000 --- a/crates/oxc_js_regex/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# oxc_js_regex - -⚠️ Work in progress. Do not use yet. - -see: https://github.com/oxc-project/oxc/issues/1164 \ No newline at end of file diff --git a/crates/oxc_js_regex/src/ast.rs b/crates/oxc_js_regex/src/ast.rs deleted file mode 100644 index 54f06cbc40a6d..0000000000000 --- a/crates/oxc_js_regex/src/ast.rs +++ /dev/null @@ -1,387 +0,0 @@ -//! [`@eslint-community/regexpp`](https://github.com/eslint-community/regexpp/blob/2e8f1af992fb12eae46a446253e8fa3f6cede92a/src/ast.ts) - -use oxc_allocator::{Box, Vec}; -use oxc_span::{CompactStr, Span}; - -/// The type which includes all nodes. -#[derive(Debug)] -pub enum Node<'a> { - Branch(Box<'a, Branch<'a>>), - Leaf(Box<'a, Leaf<'a>>), -} - -/// The type which includes all branch nodes. -#[derive(Debug)] -pub enum Branch<'a> { - Alternative(Box<'a, Alternative<'a>>), - CapturingGroup(Box<'a, CapturingGroup<'a>>), - CharacterClass(Box<'a, CharacterClass<'a>>), - CharacterClassRange(Box<'a, CharacterClassRange>), - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - Group(Box<'a, Group<'a>>), - LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), - Pattern(Box<'a, Pattern<'a>>), - Quantifier(Box<'a, Quantifier<'a>>), - RegExpLiteral(Box<'a, RegExpLiteral<'a>>), - StringAlternative(Box<'a, StringAlternative<'a>>), -} - -/// The type which includes all leaf nodes. -#[derive(Debug)] -pub enum Leaf<'a> { - Backreference(Box<'a, Backreference<'a>>), - BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), - Character(Box<'a, Character>), - CharacterSet(Box<'a, CharacterSet<'a>>), - Flags(Box<'a, Flags>), -} - -/// The type which includes all atom nodes. -#[derive(Debug)] -pub enum Element<'a> { - Assertion(Box<'a, Assertion<'a>>), - QuantifiableElement(Box<'a, QuantifiableElement<'a>>), - Quantifier(Box<'a, Quantifier<'a>>), -} - -/// The type which includes all atom nodes that Quantifier node can have as children. -#[derive(Debug)] -pub enum QuantifiableElement<'a> { - Backreference(Box<'a, Backreference<'a>>), - CapturingGroup(Box<'a, CapturingGroup<'a>>), - Character(Box<'a, Character>), - CharacterClass(Box<'a, CharacterClass<'a>>), - CharacterSet(Box<'a, CharacterSet<'a>>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - Group(Box<'a, Group<'a>>), - LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), -} - -/// The type which includes all character class atom nodes. -#[derive(Debug)] -pub enum CharacterClassElement<'a> { - ClassRangesCharacterClassElement(Box<'a, ClassRangesCharacterClassElement<'a>>), - UnicodeSetsCharacterClassElement(Box<'a, UnicodeSetsCharacterClassElement<'a>>), -} -#[derive(Debug)] -pub enum ClassRangesCharacterClassElement<'a> { - Character(Box<'a, Character>), - CharacterClassRange(Box<'a, CharacterClassRange>), - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), -} -#[derive(Debug)] -pub enum UnicodeSetsCharacterClassElement<'a> { - Character(Box<'a, Character>), - CharacterClassRange(Box<'a, CharacterClassRange>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), -} - -/// The root node. -#[derive(Debug)] -pub struct RegExpLiteral<'a> { - pub span: Span, - pub pattern: Pattern<'a>, - pub flags: Flags, -} - -/// The pattern. -#[derive(Debug)] -pub struct Pattern<'a> { - pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The alternative. -/// E.g. `a|b` -#[derive(Debug)] -pub struct Alternative<'a> { - pub span: Span, - pub elements: Vec<'a, Element<'a>>, -} - -/// The uncapturing group. -/// E.g. `(?:ab)` -#[derive(Debug)] -pub struct Group<'a> { - pub span: Span, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The capturing group. -/// E.g. `(ab)`, `(?ab)` -#[derive(Debug)] -pub struct CapturingGroup<'a> { - pub span: Span, - pub name: Option, - pub alternatives: Vec<'a, Alternative<'a>>, - pub references: Vec<'a, Backreference<'a>>, -} - -/// The lookaround assertion. -#[derive(Debug)] -pub enum LookaroundAssertion<'a> { - LookaheadAssertion(Box<'a, LookaheadAssertion<'a>>), - LookbehindAssertion(Box<'a, LookbehindAssertion<'a>>), -} - -/// The lookahead assertion. -/// E.g. `(?=ab)`, `(?!ab)` -#[derive(Debug)] -pub struct LookaheadAssertion<'a> { - pub span: Span, - pub negate: bool, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The lookbehind assertion. -/// E.g. `(?<=ab)`, `(? { - pub span: Span, - pub negate: bool, - pub alternatives: Vec<'a, Alternative<'a>>, -} - -/// The quantifier. -/// E.g. `a?`, `a*`, `a+`, `a{1,2}`, `a??`, `a*?`, `a+?`, `a{1,2}?` -#[derive(Debug)] -pub struct Quantifier<'a> { - pub span: Span, - pub min: f64, - pub max: f64, // can be f64::INFINITY - pub greedy: bool, - pub element: QuantifiableElement<'a>, -} - -/// The character class. -/// E.g. `[ab]`, `[^ab]` -#[derive(Debug)] -pub enum CharacterClass<'a> { - ClassRangesCharacterClass(Box<'a, ClassRangesCharacterClass<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), -} - -/// The character class used in legacy (neither `u` nor `v` flag) and Unicode mode (`u` flag). -/// This character class is guaranteed to **not** contain strings. -/// In Unicode sets mode (`v` flag), {@link UnicodeSetsCharacterClass} is used. -#[derive(Debug)] -pub struct ClassRangesCharacterClass<'a> { - pub span: Span, - pub unicode_sets: bool, - pub elements: Vec<'a, ClassRangesCharacterClassElement<'a>>, -} - -/// The character class used in Unicode sets mode (`v` flag). -/// This character class may contain strings. -#[derive(Debug)] -pub struct UnicodeSetsCharacterClass<'a> { - pub span: Span, - pub elements: Vec<'a, UnicodeSetsCharacterClassElement<'a>>, -} - -/// The character class. -/// E.g. `[a-b]` -#[derive(Debug)] -pub struct CharacterClassRange { - pub span: Span, - pub min: Character, - pub max: Character, -} - -/// The assertion. -#[derive(Debug)] -pub enum Assertion<'a> { - BoundaryAssertion(Box<'a, BoundaryAssertion<'a>>), - LookaroundAssertion(Box<'a, LookaroundAssertion<'a>>), -} - -/// The boundary assertion. -#[derive(Debug)] -pub enum BoundaryAssertion<'a> { - EdgeAssertion(Box<'a, EdgeAssertion>), - WordBoundaryAssertion(Box<'a, WordBoundaryAssertion>), -} - -/// The edge boundary assertion. -/// E.g. `^`, `$` -#[derive(Debug)] -pub struct EdgeAssertion { - pub span: Span, - pub kind: EdgeAssertionKind, -} - -#[derive(Debug)] -pub enum EdgeAssertionKind { - Start, - End, -} - -/// The word boundary assertion. -/// E.g. `\b`, `\B` -#[derive(Debug)] -pub struct WordBoundaryAssertion { - pub span: Span, - pub negate: bool, -} - -/// The character set. -#[derive(Debug)] -pub enum CharacterSet<'a> { - AnyCharacterSet, - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), -} - -/// The character class escape. -/// E.g. `\d`, `\s`, `\w`, `\D`, `\S`, `\W` -#[derive(Debug)] -pub struct EscapeCharacterSet { - pub span: Span, - pub kind: EscapeCharacterSetKind, - pub negate: bool, -} - -#[derive(Debug)] -pub enum EscapeCharacterSetKind { - Digit, - Space, - Word, -} - -/// The unicode property escape. -/// E.g. `\p{ASCII}`, `\P{ASCII}`, `\p{Script=Hiragana}` -#[derive(Debug)] -pub enum UnicodePropertyCharacterSet<'a> { - CharacterUnicodePropertyCharacterSet(Box<'a, CharacterUnicodePropertyCharacterSet>), - StringsUnicodePropertyCharacterSet(Box<'a, StringsUnicodePropertyCharacterSet>), -} - -#[derive(Debug)] -pub struct CharacterUnicodePropertyCharacterSet { - pub span: Span, - pub key: CompactStr, - pub value: Option, - pub negate: bool, -} - -/// StringsUnicodePropertyCharacterSet is Unicode property escape with property of strings. -#[derive(Debug)] -pub struct StringsUnicodePropertyCharacterSet { - pub span: Span, - pub key: CompactStr, -} - -/// The expression character class. -/// E.g. `[a--b]`, `[a&&b]`,`[^a--b]`, `[^a&&b]` -#[derive(Debug)] -pub struct ExpressionCharacterClass<'a> { - pub span: Span, - pub negate: bool, - pub expression: ExpressionCharacterClassExpr<'a>, -} - -#[derive(Debug)] -pub enum ExpressionCharacterClassExpr<'a> { - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), -} - -#[derive(Debug)] -pub enum ClassSetOperand<'a> { - Character(Box<'a, Character>), - ClassStringDisjunction(Box<'a, ClassStringDisjunction<'a>>), - EscapeCharacterSet(Box<'a, EscapeCharacterSet>), - ExpressionCharacterClass(Box<'a, ExpressionCharacterClass<'a>>), - UnicodePropertyCharacterSet(Box<'a, UnicodePropertyCharacterSet<'a>>), - UnicodeSetsCharacterClass(Box<'a, UnicodeSetsCharacterClass<'a>>), -} - -/// The character class intersection. -/// E.g. `a&&b` -#[derive(Debug)] -pub struct ClassIntersection<'a> { - pub span: Span, - pub left: ClassIntersectionLeft<'a>, - pub right: ClassSetOperand<'a>, -} - -#[derive(Debug)] -pub enum ClassIntersectionLeft<'a> { - ClassIntersection(Box<'a, ClassIntersection<'a>>), - ClassSetOperand(Box<'a, ClassSetOperand<'a>>), -} - -/// The character class subtraction. -/// E.g. `a--b` -#[derive(Debug)] -pub struct ClassSubtraction<'a> { - pub span: Span, - pub left: ClassSubtractionLeft<'a>, - pub right: ClassSetOperand<'a>, -} - -#[derive(Debug)] -pub enum ClassSubtractionLeft<'a> { - ClassSetOperand(Box<'a, ClassSetOperand<'a>>), - ClassSubtraction(Box<'a, ClassSubtraction<'a>>), -} - -/// The character class string disjunction. -/// E.g. `\q{a|b}` -#[derive(Debug)] -pub struct ClassStringDisjunction<'a> { - pub span: Span, - pub alternatives: Vec<'a, StringAlternative<'a>>, -} - -/// StringAlternative is only used for `\q{alt}`({@link ClassStringDisjunction}). -#[derive(Debug)] -pub struct StringAlternative<'a> { - pub span: Span, - pub elements: Vec<'a, Character>, -} - -/// This includes escape sequences which mean a character. -/// E.g. `a`, `あ`, `✿`, `\x65`, `\u0065`, `\u{65}`, `\/` -#[derive(Debug)] -pub struct Character { - pub span: Span, - pub value: u16, // UTF-16 code point -} - -#[derive(Debug)] -pub enum BackreferenceRef { - Number(i32), - CompactStr(CompactStr), -} - -/// The backreference. -/// E.g. `\1`, `\k` -#[derive(Debug)] -pub struct Backreference<'a> { - pub span: Span, - pub reference: BackreferenceRef, - pub resolved: CapturingGroup<'a>, -} - -/// The flags. -#[derive(Debug)] -pub struct Flags { - pub span: Span, - pub dot_all: bool, - pub global: bool, - pub has_indices: bool, - pub ignore_case: bool, - pub multiline: bool, - pub sticky: bool, - pub unicode: bool, - pub unicode_sets: bool, -} diff --git a/crates/oxc_js_regex/src/lexer/mod.rs b/crates/oxc_js_regex/src/lexer/mod.rs deleted file mode 100644 index 40d3ff585686a..0000000000000 --- a/crates/oxc_js_regex/src/lexer/mod.rs +++ /dev/null @@ -1 +0,0 @@ -mod token; diff --git a/crates/oxc_js_regex/src/lexer/token.rs b/crates/oxc_js_regex/src/lexer/token.rs deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/crates/oxc_js_regex/src/lexer/token.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/oxc_js_regex/src/lib.rs b/crates/oxc_js_regex/src/lib.rs deleted file mode 100644 index 6647fb03be8f5..0000000000000 --- a/crates/oxc_js_regex/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod ast; -mod lexer; -pub mod parser; -pub mod validator; -pub mod visitor; diff --git a/crates/oxc_js_regex/src/parser.rs b/crates/oxc_js_regex/src/parser.rs deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/crates/oxc_js_regex/src/parser.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/oxc_js_regex/src/validator.rs b/crates/oxc_js_regex/src/validator.rs deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/crates/oxc_js_regex/src/validator.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/oxc_js_regex/src/visitor.rs b/crates/oxc_js_regex/src/visitor.rs deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/crates/oxc_js_regex/src/visitor.rs +++ /dev/null @@ -1 +0,0 @@ - From 319b1d6177eea5660aa9832d0de43de47491f614 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 13:18:22 +0900 Subject: [PATCH 125/143] Fix fmt --- crates/oxc_regexp_parser/src/body_parser/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index b2250bbff0777..22269a32838ee 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -91,7 +91,10 @@ mod test { r"[[[[[[[[[[[[[[[[[[[[[[[[a]]]]]]]]]]]]]]]]]]]]]]]]", ParserOptions::default().with_unicode_sets_mode(), ), - (r"[\q{}\q{a}\q{bc}\q{d|e|f}\q{|||}]", ParserOptions::default().with_unicode_sets_mode()), + ( + r"[\q{}\q{a}\q{bc}\q{d|e|f}\q{|||}]", + ParserOptions::default().with_unicode_sets_mode(), + ), (r"(?A)\k", ParserOptions::default()), (r"(?)\k", ParserOptions::default()), (r"\k", ParserOptions::default()), From 3aeec3386f8569b5b8b7081504b6a05e7edb0792 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 13:19:55 +0900 Subject: [PATCH 126/143] Fix lint --- crates/oxc_regexp_parser/src/literal_parser.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/oxc_regexp_parser/src/literal_parser.rs b/crates/oxc_regexp_parser/src/literal_parser.rs index 3ff1fcbee7bd0..64d694aee05ad 100644 --- a/crates/oxc_regexp_parser/src/literal_parser.rs +++ b/crates/oxc_regexp_parser/src/literal_parser.rs @@ -34,6 +34,7 @@ impl<'a> Parser<'a> { let flags = FlagsParser::new( self.allocator, &self.source_text[flag_start_offset..], + #[allow(clippy::cast_possible_truncation)] self.options.with_span_offset(self.options.span_offset + flag_start_offset as u32), ) .parse()?; @@ -48,6 +49,7 @@ impl<'a> Parser<'a> { let pattern = PatternParser::new( self.allocator, &self.source_text[body_start_offset..body_end_offset], + #[allow(clippy::cast_possible_truncation)] pattern_options.with_span_offset(self.options.span_offset + body_start_offset as u32), ) .parse()?; From 51a48af359771a27f0c543c3e94430dec3b7f370 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 13:20:55 +0900 Subject: [PATCH 127/143] Rename example to avoid name collision --- crates/oxc_regexp_parser/examples/{parser.rs => parse_literal.rs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename crates/oxc_regexp_parser/examples/{parser.rs => parse_literal.rs} (100%) diff --git a/crates/oxc_regexp_parser/examples/parser.rs b/crates/oxc_regexp_parser/examples/parse_literal.rs similarity index 100% rename from crates/oxc_regexp_parser/examples/parser.rs rename to crates/oxc_regexp_parser/examples/parse_literal.rs From b58c440b9db4c1a92c6aba9d9910d7ddc39336cf Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 14:40:39 +0900 Subject: [PATCH 128/143] More comments --- .../oxc_regexp_parser/src/body_parser/mod.rs | 1 + .../src/body_parser/parser.rs | 183 +++++++++--------- 2 files changed, 97 insertions(+), 87 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index 22269a32838ee..e17c8542f6c56 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -150,6 +150,7 @@ mod test { ("a(?:", ParserOptions::default()), ("(a", ParserOptions::default()), ("(?", ParserOptions::default()), + ("(?)", ParserOptions::default()), ("(?=a){1}", ParserOptions::default().with_unicode_mode()), ("(?!a){1}", ParserOptions::default().with_unicode_mode()), (r"[\d-\D]", ParserOptions::default().with_unicode_mode()), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 1475cac261ad4..456b54bbd29ad 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -146,7 +146,9 @@ impl<'a> PatternParser<'a> { )))) } (Some(atom), None) => Ok(Some(atom)), - (None, Some(_)) => Err(OxcDiagnostic::error("Lone `Quantifier`, expected `Atom`")), + (None, Some(_)) => { + Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `Atom`")) + } (None, None) => Ok(None), }; } @@ -199,7 +201,7 @@ impl<'a> PatternParser<'a> { } (Some(extended_atom), None) => Ok(Some(extended_atom)), (None, Some(_)) => { - Err(OxcDiagnostic::error("Lone `Quantifier`, expected `ExtendedAtom`")) + Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `ExtendedAtom`")) } (None, None) => Ok(None), } @@ -563,7 +565,9 @@ impl<'a> PatternParser<'a> { // - if the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) if negative && is_strings_related { - return Err(OxcDiagnostic::error("Invalid property name")); + return Err(OxcDiagnostic::error( + "Invalid property name(negative + property of strings)", + )); } if self.reader.eat('}') { @@ -609,6 +613,7 @@ impl<'a> PatternParser<'a> { if self.reader.eat('c') { if let Some(cp) = self.reader.peek().and_then(unicode::map_c_ascii_letter) { self.reader.advance(); + return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::ControlLetter, @@ -641,7 +646,7 @@ impl<'a> PatternParser<'a> { })); } - return Err(OxcDiagnostic::error("Invalid escape")); + return Err(OxcDiagnostic::error("Invalid hexadecimal escape")); } // e.g. \u{1f600} @@ -738,6 +743,7 @@ impl<'a> PatternParser<'a> { if self.state.unicode_sets_mode { return self.parse_class_set_expression(); } + // [~UnicodeSetsMode] NonemptyClassRanges[?UnicodeMode] self.parse_nonempty_class_ranges() } @@ -838,6 +844,7 @@ impl<'a> PatternParser<'a> { // ``` fn parse_class_atom(&mut self) -> Result>> { let span_start = self.reader.span_position(); + if self.reader.eat('-') { return Ok(Some(ast::CharacterClassContents::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -886,7 +893,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(class_escape)); } - return Err(OxcDiagnostic::error("Invalid class escape")); + return Err(OxcDiagnostic::error("Invalid class atom")); } Ok(None) @@ -930,6 +937,7 @@ impl<'a> PatternParser<'a> { // [~UnicodeMode] c ClassControlLetter if !self.state.unicode_mode { let checkpoint = self.reader.checkpoint(); + if self.reader.eat('c') { if let Some(cp) = self .reader @@ -1004,7 +1012,7 @@ impl<'a> PatternParser<'a> { return self.parse_class_set_union(class_set_operand); } - Err(OxcDiagnostic::error("Invalid character in character class")) + Err(OxcDiagnostic::error("Invalid character class set expression")) } // ``` @@ -1063,7 +1071,9 @@ impl<'a> PatternParser<'a> { } } - return Err(OxcDiagnostic::error("Invalid character in character class")); + return Err(OxcDiagnostic::error( + "Invalid character in character class set interseciton", + )); } Ok((ast::CharacterClassContentsKind::Intersection, body)) @@ -1093,7 +1103,9 @@ impl<'a> PatternParser<'a> { } } - return Err(OxcDiagnostic::error("Invalid character in character class")); + return Err(OxcDiagnostic::error( + "Invalid character in character class set subtraction", + )); } Ok((ast::CharacterClassContentsKind::Subtraction, body)) @@ -1105,6 +1117,7 @@ impl<'a> PatternParser<'a> { // ``` fn parse_class_set_range(&mut self) -> Result>> { let checkpoint = self.reader.checkpoint(); + if let Some(class_set_character) = self.parse_class_set_character()? { if self.reader.eat('-') { if let Some(class_set_character_to) = self.parse_class_set_character()? { @@ -1146,7 +1159,6 @@ impl<'a> PatternParser<'a> { return Ok(Some(nested_class)); } - // ClassStringDisjunction let span_start = self.reader.span_position(); if self.reader.eat3('\\', 'q', '{') { let class_string_disjunction_contents = @@ -1180,6 +1192,9 @@ impl<'a> PatternParser<'a> { // ``` fn parse_nested_class(&mut self) -> Result>> { let span_start = self.reader.span_position(); + + // [ [lookahead ≠ ^] ClassContents[+UnicodeMode, +UnicodeSetsMode] ] + // [^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] if self.reader.eat('[') { let negative = self.reader.eat('^'); // NOTE: This can be recursive as the name suggests! @@ -1253,9 +1268,10 @@ impl<'a> PatternParser<'a> { )))); } - return Err(OxcDiagnostic::error("Unterminated character class")); + return Err(OxcDiagnostic::error("Unterminated nested class")); } + // \ CharacterClassEscape[+UnicodeMode] let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); if self.reader.eat('\\') { @@ -1350,6 +1366,7 @@ impl<'a> PatternParser<'a> { if let Some(character_escape) = self.parse_character_escape(span_start)? { return Ok(Some(character_escape)); } + if let Some(cp) = self.reader.peek().filter(|&cp| unicode::is_class_set_reserved_punctuator(cp)) { @@ -1360,6 +1377,7 @@ impl<'a> PatternParser<'a> { value: cp, })); } + if self.reader.eat('b') { return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -1384,28 +1402,21 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); if self.reader.eat('(') { - // GroupSpecifier is optional - if self.reader.eat('?') { - if let Some(name) = self.consume_group_name()? { - let disjunction = self.parse_disjunction()?; - - if self.reader.eat(')') { - return Ok(Some(ast::CapturingGroup { - span: self.span_factory.create(span_start, self.reader.span_position()), - name: Some(name), - body: disjunction, - })); - } - } + let mut group_name = None; - return Err(OxcDiagnostic::error("Unterminated capturing group name")); + // GroupSpecifier is optional, but if it exists, `?` is also required + if self.reader.eat('?') { + let Some(name) = self.consume_group_name()? else { + return Err(OxcDiagnostic::error("Unterminated capturing group name")); + }; + group_name = Some(name); } let disjunction = self.parse_disjunction()?; if self.reader.eat(')') { return Ok(Some(ast::CapturingGroup { span: self.span_factory.create(span_start, self.reader.span_position()), - name: None, + name: group_name, body: disjunction, })); } @@ -1526,7 +1537,7 @@ impl<'a> PatternParser<'a> { // DecimalDigits[?Sep] DecimalDigit // [+Sep] DecimalDigits[+Sep] NumericLiteralSeparator DecimalDigit // ``` - // ([Sep] is disabled for `QuantifierPrefix` and `DecimalEscape` skip it) + // ([Sep] is disabled for `QuantifierPrefix` and `DecimalEscape`, skip it) fn consume_decimal_digits(&mut self) -> Option { let checkpoint = self.reader.checkpoint(); @@ -1549,7 +1560,7 @@ impl<'a> PatternParser<'a> { // UnicodePropertyName = UnicodePropertyValue // LoneUnicodePropertyNameOrValue // ``` - /// Returns: `(name, value, is_strings_related_unicode_property)` + /// Returns: `(name, Option, is_strings_related_unicode_property)` fn consume_unicode_property_value_expression( &mut self, ) -> Result, Option>, bool)>> { @@ -1564,7 +1575,7 @@ impl<'a> PatternParser<'a> { // [SS:EE] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue // It is a Syntax Error if the source text matched by UnicodePropertyValue is not a property value or property value alias for the Unicode property or property alias given by the source text matched by UnicodePropertyName listed in PropertyValueAliases.txt. if !unicode_property::is_valid_unicode_property(&name, &value) { - return Err(OxcDiagnostic::error("Invalid property name")); + return Err(OxcDiagnostic::error("Invalid unicode property name")); } return Ok(Some((name, Some(value), false))); @@ -1588,14 +1599,14 @@ impl<'a> PatternParser<'a> { if unicode_property::is_valid_lone_unicode_property_of_strings(&name_or_value) { if !self.state.unicode_sets_mode { return Err(OxcDiagnostic::error( - "UnicodeSetsMode is required for binary property of strings", + "`UnicodeSetsMode` is required for binary property of strings", )); } return Ok(Some((name_or_value, None, true))); } - return Err(OxcDiagnostic::error("Invalid property name")); + return Err(OxcDiagnostic::error("Invalid unicode property name or value")); } Ok(None) @@ -1646,7 +1657,7 @@ impl<'a> PatternParser<'a> { } } - Err(OxcDiagnostic::error("Invalid capture group name")) + Err(OxcDiagnostic::error("Unterminated capturing group name")) } // ``` @@ -1660,8 +1671,9 @@ impl<'a> PatternParser<'a> { if self.consume_reg_exp_idenfigier_start()?.is_some() { while self.consume_reg_exp_idenfigier_part()?.is_some() {} - let span_end = self.reader.span_position(); - return Ok(Some(SpanAtom::from(&self.source_text[span_start..span_end]))); + return Ok(Some(SpanAtom::from( + &self.source_text[span_start..self.reader.span_position()], + ))); } Ok(None) @@ -1781,75 +1793,72 @@ impl<'a> PatternParser<'a> { unicode_mode: bool, ) -> Result> { let checkpoint = self.reader.checkpoint(); + if self.reader.eat('u') { + if unicode_mode { + let checkpoint = self.reader.checkpoint(); - if !self.reader.eat('u') { - return Ok(None); - } - - if unicode_mode { - let checkpoint = self.reader.checkpoint(); - - // HexLeadSurrogate + HexTrailSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - if self.reader.eat2('\\', 'u') { - if let Some(trail_surrogate) = self - .consume_fixed_hex_digits(4) - .filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(unicode::combine_surrogate_pair( - lead_surrogate, - trail_surrogate, - ))); + // HexLeadSurrogate + HexTrailSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + if self.reader.eat2('\\', 'u') { + if let Some(trail_surrogate) = self + .consume_fixed_hex_digits(4) + .filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(unicode::combine_surrogate_pair( + lead_surrogate, + trail_surrogate, + ))); + } } } - } - self.reader.rewind(checkpoint); + self.reader.rewind(checkpoint); - // HexLeadSurrogate - if let Some(lead_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) - { - return Ok(Some(lead_surrogate)); - } - self.reader.rewind(checkpoint); + // HexLeadSurrogate + if let Some(lead_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_lead_surrogate(cp)) + { + return Ok(Some(lead_surrogate)); + } + self.reader.rewind(checkpoint); - // HexTrailSurrogate - if let Some(trail_surrogate) = - self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) - { - return Ok(Some(trail_surrogate)); + // HexTrailSurrogate + if let Some(trail_surrogate) = + self.consume_fixed_hex_digits(4).filter(|&cp| unicode::is_trail_surrogate(cp)) + { + return Ok(Some(trail_surrogate)); + } + self.reader.rewind(checkpoint); } - self.reader.rewind(checkpoint); - } - // HexNonSurrogate and Hex4Digits are the same - if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { - return Ok(Some(hex_digits)); - } + // HexNonSurrogate and Hex4Digits are the same + if let Some(hex_digits) = self.consume_fixed_hex_digits(4) { + return Ok(Some(hex_digits)); + } - // {CodePoint} - if unicode_mode { - let checkpoint = self.reader.checkpoint(); + // {CodePoint} + if unicode_mode { + let checkpoint = self.reader.checkpoint(); - if self.reader.eat('{') { - if let Some(hex_digits) = - self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) - { - if self.reader.eat('}') { - return Ok(Some(hex_digits)); + if self.reader.eat('{') { + if let Some(hex_digits) = + self.consume_hex_digits().filter(|&cp| unicode::is_valid_unicode(cp)) + { + if self.reader.eat('}') { + return Ok(Some(hex_digits)); + } } } + self.reader.rewind(checkpoint); } - self.reader.rewind(checkpoint); - } - if self.state.unicode_mode { - return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + if self.state.unicode_mode { + return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + } + self.reader.rewind(checkpoint); } - self.reader.rewind(checkpoint); Ok(None) } From 032adb9408ca1e9511b1a0771674181a531eb583 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 14:56:15 +0900 Subject: [PATCH 129/143] Refactor Reader --- .../src/body_parser/reader.rs | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs index 4826a34f5d67e..48f085b7f2cce 100644 --- a/crates/oxc_regexp_parser/src/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/body_parser/reader.rs @@ -66,24 +66,18 @@ impl<'a> Reader<'a> { pub fn peek2(&self) -> Option { self.peek_nth(1) } - pub fn peek3(&self) -> Option { - self.peek_nth(2) - } - pub fn peek4(&self) -> Option { - self.peek_nth(3) - } - // NOTE: Consider `peek(ch: char): bool` style API? + // NOTE: Consider `peek_char(): Option` style API? pub fn eat(&mut self, ch: char) -> bool { - if self.peek() == Some(ch as u32) { + if self.peek_nth(0) == Some(ch as u32) { self.advance(); return true; } false } pub fn eat2(&mut self, ch: char, ch2: char) -> bool { - if self.peek() == Some(ch as u32) && self.peek2() == Some(ch2 as u32) { + if self.peek_nth(0) == Some(ch as u32) && self.peek_nth(1) == Some(ch2 as u32) { self.advance(); self.advance(); return true; @@ -91,9 +85,9 @@ impl<'a> Reader<'a> { false } pub fn eat3(&mut self, ch: char, ch2: char, ch3: char) -> bool { - if self.peek() == Some(ch as u32) - && self.peek2() == Some(ch2 as u32) - && self.peek3() == Some(ch3 as u32) + if self.peek_nth(0) == Some(ch as u32) + && self.peek_nth(1) == Some(ch2 as u32) + && self.peek_nth(2) == Some(ch3 as u32) { self.advance(); self.advance(); @@ -103,10 +97,10 @@ impl<'a> Reader<'a> { false } pub fn eat4(&mut self, ch: char, ch2: char, ch3: char, ch4: char) -> bool { - if self.peek() == Some(ch as u32) - && self.peek2() == Some(ch2 as u32) - && self.peek3() == Some(ch3 as u32) - && self.peek4() == Some(ch4 as u32) + if self.peek_nth(0) == Some(ch as u32) + && self.peek_nth(1) == Some(ch2 as u32) + && self.peek_nth(2) == Some(ch3 as u32) + && self.peek_nth(3) == Some(ch4 as u32) { self.advance(); self.advance(); @@ -136,7 +130,6 @@ mod test { assert_eq!(reader.index, 1); assert_eq!(reader.peek(), Some('R' as u32)); assert_eq!(reader.peek2(), Some('e' as u32)); - assert_eq!(reader.peek3(), Some('g' as u32)); assert!(reader.eat('R')); assert!(!reader.eat('R')); @@ -180,7 +173,6 @@ mod test { assert!(unicode_reader.eat('あ')); assert_eq!(unicode_reader.peek(), Some('っ' as u32)); assert_eq!(unicode_reader.peek2(), Some('ち' as u32)); - assert_eq!(unicode_reader.peek3(), None); unicode_reader.rewind(checkpoint); assert!(unicode_reader.eat('は')); @@ -204,7 +196,6 @@ mod test { assert_eq!(legacy_reader.peek(), Some('あ' as u32)); assert_eq!(legacy_reader.peek2(), Some('っ' as u32)); - assert_eq!(legacy_reader.peek3(), Some('ち' as u32)); assert!(legacy_reader.eat3('あ', 'っ', 'ち')); legacy_reader.rewind(checkpoint); From 5241e579ed88928f560d0e40513d7283a83bd407 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 15:04:42 +0900 Subject: [PATCH 130/143] Comment --- crates/oxc_regexp_parser/src/body_parser/state.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 27c5957bceb29..7a1df8dbefab8 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -3,6 +3,7 @@ use rustc_hash::FxHashSet; use super::reader::Reader; /// Currently all of properties are read only from outside of this module. +/// Even inside of this module, it is not changed after initialized. #[derive(Debug)] pub struct State<'a> { // Mode flags From 709a749f5048d8358f619c9167c063b468d96343 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 16:32:53 +0900 Subject: [PATCH 131/143] Add diagnostic label --- .../examples/parse_literal.rs | 11 +- .../src/body_parser/parser.rs | 329 +++++++++++------- 2 files changed, 219 insertions(+), 121 deletions(-) diff --git a/crates/oxc_regexp_parser/examples/parse_literal.rs b/crates/oxc_regexp_parser/examples/parse_literal.rs index 0ce08b5a7e657..74fb259f3a1db 100644 --- a/crates/oxc_regexp_parser/examples/parse_literal.rs +++ b/crates/oxc_regexp_parser/examples/parse_literal.rs @@ -36,8 +36,10 @@ fn main() { r"/[a[b[c[d[e[f[g[h[i[j[k[l]]]]]]]]]]]]/v", r"/[\q{abc|d|e|}]/v", r"/\p{Basic_Emoji}/v", - r"/[[^\q{}]]/v", // Error - r"/(?)(?)/", // Error + r"/\p{Basic_Emoji}/u", // Error + r"/[[^\q{}]]/v", // Error + r"/(?)(?)/", // Error + r"/(?noname)/v", // Error ] { println!("Parse: {source_text}"); let parser = Parser::new(&allocator, source_text, ParserOptions::default()); @@ -50,7 +52,10 @@ fn main() { println!("✨ {}", flags.span.source_text(source_text)); println!("{flags:?}"); } - Err(err) => println!("💥 {err}"), + Err(error) => { + let error = error.with_source_code(source_text); + println!("💥 {error:?}"); + } } println!(); } diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 456b54bbd29ad..8f66ef8a1f9d7 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -60,7 +60,9 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if self.reader.peek().is_some() { - return Err(OxcDiagnostic::error("Could not parse the entire pattern")); + let span_start = self.reader.span_position(); + return Err(OxcDiagnostic::error("Could not parse the entire pattern") + .with_label(self.span_factory.create(span_start, span_start))); } Ok(ast::Pattern { @@ -147,7 +149,10 @@ impl<'a> PatternParser<'a> { } (Some(atom), None) => Ok(Some(atom)), (None, Some(_)) => { - Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `Atom`")) + Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `Atom`") + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )) } (None, None) => Ok(None), }; @@ -201,7 +206,8 @@ impl<'a> PatternParser<'a> { } (Some(extended_atom), None) => Ok(Some(extended_atom)), (None, Some(_)) => { - Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `ExtendedAtom`")) + Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `ExtendedAtom`") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))) } (None, None) => Ok(None), } @@ -262,7 +268,9 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated lookaround assertion")); + return Err(OxcDiagnostic::error("Unterminated lookaround assertion").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(ast::Term::LookAroundAssertion(Box::new_in( @@ -376,7 +384,8 @@ impl<'a> PatternParser<'a> { }))); } - return Err(OxcDiagnostic::error("Invalid escape")); + return Err(OxcDiagnostic::error("Invalid escape") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } // CharacterClass[~UnicodeMode, ~UnicodeSetsMode] @@ -402,11 +411,13 @@ impl<'a> PatternParser<'a> { } // InvalidBracedQuantifier + let span_start = self.reader.span_position(); if self.consume_quantifier()?.is_some() { // [SS:EE] ExtendedAtom :: InvalidBracedQuantifier // It is a Syntax Error if any source text is matched by this production. // (Annex B) - return Err(OxcDiagnostic::error("Invalid braced quantifier")); + return Err(OxcDiagnostic::error("Invalid braced quantifier") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } // ExtendedPatternCharacter @@ -439,7 +450,9 @@ impl<'a> PatternParser<'a> { // [SS:EE] AtomEscape :: DecimalEscape // It is a Syntax Error if the CapturingGroupNumber of DecimalEscape is strictly greater than CountLeftCapturingParensWithin(the Pattern containing AtomEscape). if self.state.num_of_capturing_groups < index { - return Err(OxcDiagnostic::error("Invalid indexed reference")); + return Err(OxcDiagnostic::error("Invalid indexed reference").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { @@ -482,7 +495,9 @@ impl<'a> PatternParser<'a> { // [SS:EE] AtomEscape :: k GroupName // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. if !self.state.found_group_names.contains(name.as_str()) { - return Err(OxcDiagnostic::error("Group specifier is empty")); + return Err(OxcDiagnostic::error("Group specifier is empty").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(ast::Term::NamedReference(Box::new_in( @@ -494,10 +509,12 @@ impl<'a> PatternParser<'a> { )))); } - return Err(OxcDiagnostic::error("Invalid named reference")); + return Err(OxcDiagnostic::error("Invalid named reference") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } - Err(OxcDiagnostic::error("Invalid atom escape")) + Err(OxcDiagnostic::error("Invalid atom escape") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))) } // ``` @@ -559,18 +576,21 @@ impl<'a> PatternParser<'a> { if let Some((name, value, is_strings_related)) = self.consume_unicode_property_value_expression()? { - // [SS:EE] CharacterClassEscape :: P{ UnicodePropertyValueExpression } - // It is a Syntax Error if MayContainStrings of the UnicodePropertyValueExpression is true. - // MayContainStrings is true - // - if the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue - // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) - if negative && is_strings_related { - return Err(OxcDiagnostic::error( - "Invalid property name(negative + property of strings)", - )); - } - if self.reader.eat('}') { + // [SS:EE] CharacterClassEscape :: P{ UnicodePropertyValueExpression } + // It is a Syntax Error if MayContainStrings of the UnicodePropertyValueExpression is true. + // MayContainStrings is true + // - if the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue + // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) + if negative && is_strings_related { + return Err(OxcDiagnostic::error( + "Invalid property name(negative + property of strings)", + ) + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); + } + return Ok(Some(ast::UnicodePropertyEscape { span: self.span_factory.create(span_start, self.reader.span_position()), negative, @@ -582,7 +602,8 @@ impl<'a> PatternParser<'a> { } } - Err(OxcDiagnostic::error("Unterminated unicode property escape")) + Err(OxcDiagnostic::error("Unterminated unicode property escape") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))) } // ``` @@ -646,7 +667,8 @@ impl<'a> PatternParser<'a> { })); } - return Err(OxcDiagnostic::error("Invalid hexadecimal escape")); + return Err(OxcDiagnostic::error("Invalid hexadecimal escape") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } // e.g. \u{1f600} @@ -693,24 +715,26 @@ impl<'a> PatternParser<'a> { let negative = self.reader.eat('^'); let (kind, body) = self.parse_class_contents()?; - // [SS:EE] CharacterClass :: [^ ClassContents ] - // It is a Syntax Error if MayContainStrings of the ClassContents is true. - if negative - && body.iter().any(|item| match item { - // MayContainStrings is true - // - if ClassContents contains UnicodePropertyValueExpression - // - and the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue - // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) - ast::CharacterClassContents::UnicodePropertyEscape(unicode_property_escape) => { - unicode_property_escape.strings - } - _ => false, - }) - { - return Err(OxcDiagnostic::error("Invalid character class")); - } - if self.reader.eat(']') { + // [SS:EE] CharacterClass :: [^ ClassContents ] + // It is a Syntax Error if MayContainStrings of the ClassContents is true. + if negative + && body.iter().any(|item| match item { + // MayContainStrings is true + // - if ClassContents contains UnicodePropertyValueExpression + // - and the UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue + // - and it is binary property of strings(can be true only with `UnicodeSetsMode`) + ast::CharacterClassContents::UnicodePropertyEscape( + unicode_property_escape, + ) => unicode_property_escape.strings, + _ => false, + }) + { + return Err(OxcDiagnostic::error("Invalid character class").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); + } + return Ok(Some(ast::CharacterClass { span: self.span_factory.create(span_start, self.reader.span_position()), negative, @@ -719,7 +743,8 @@ impl<'a> PatternParser<'a> { })); } - return Err(OxcDiagnostic::error("Unterminated character class")); + return Err(OxcDiagnostic::error("Unterminated character class") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } Ok(None) @@ -765,6 +790,8 @@ impl<'a> PatternParser<'a> { let mut body = Vec::new_in(self.allocator); loop { + let range_span_start = self.reader.span_position(); + let Some(class_atom) = self.parse_class_atom()? else { break; }; @@ -802,7 +829,10 @@ impl<'a> PatternParser<'a> { // [SS:EE] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents // It is a Syntax Error if IsCharacterClass of the first ClassAtom is false, IsCharacterClass of the second ClassAtom is false, and the CharacterValue of the first ClassAtom is strictly greater than the CharacterValue of the second ClassAtom. if to.value < from.value { - return Err(OxcDiagnostic::error("Character class range out of order")); + return Err(OxcDiagnostic::error("Character class range out of order") + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } body.push(ast::CharacterClassContents::CharacterClassRange(Box::new_in( @@ -823,7 +853,9 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. // (Annex B) if self.state.unicode_mode { - return Err(OxcDiagnostic::error("Invalid character class range")); + return Err(OxcDiagnostic::error("Invalid character class range").with_label( + self.span_factory.create(range_span_start, self.reader.span_position()), + )); } body.push(class_atom); @@ -831,9 +863,9 @@ impl<'a> PatternParser<'a> { body.push(class_atom_to); } - if body.is_empty() { - return Err(OxcDiagnostic::error("Empty class ranges")); - } + // [empty] is already covered by the caller, but for sure + debug_assert!(!body.is_empty()); + Ok((ast::CharacterClassContentsKind::Union, body)) } @@ -893,7 +925,8 @@ impl<'a> PatternParser<'a> { return Ok(Some(class_escape)); } - return Err(OxcDiagnostic::error("Invalid class atom")); + return Err(OxcDiagnostic::error("Invalid class atom") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } Ok(None) @@ -1012,7 +1045,7 @@ impl<'a> PatternParser<'a> { return self.parse_class_set_union(class_set_operand); } - Err(OxcDiagnostic::error("Invalid character class set expression")) + unreachable!("Expected nonempty class set expression") } // ``` @@ -1061,8 +1094,14 @@ impl<'a> PatternParser<'a> { } if self.reader.eat2('&', '&') { + let span_start = self.reader.span_position(); if self.reader.eat('&') { - return Err(OxcDiagnostic::error("Unexpected &")); + return Err(OxcDiagnostic::error( + "Unexpected `&` inside of class interseciton", + ) + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } if let Some(class_set_operand) = self.parse_class_set_operand()? { @@ -1071,9 +1110,11 @@ impl<'a> PatternParser<'a> { } } + let span_start = self.reader.span_position(); return Err(OxcDiagnostic::error( "Invalid character in character class set interseciton", - )); + ) + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } Ok((ast::CharacterClassContentsKind::Intersection, body)) @@ -1103,9 +1144,11 @@ impl<'a> PatternParser<'a> { } } + let span_start = self.reader.span_position(); return Err(OxcDiagnostic::error( "Invalid character in character class set subtraction", - )); + ) + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } Ok((ast::CharacterClassContentsKind::Subtraction, body)) @@ -1124,7 +1167,10 @@ impl<'a> PatternParser<'a> { // [SS:EE] ClassSetRange :: ClassSetCharacter - ClassSetCharacter // It is a Syntax Error if the CharacterValue of the first ClassSetCharacter is strictly greater than the CharacterValue of the second ClassSetCharacter. if class_set_character_to.value < class_set_character.value { - return Err(OxcDiagnostic::error("Character set class range out of order")); + return Err(OxcDiagnostic::error("Character set class range out of order") + .with_label( + class_set_character.span.merge(&class_set_character_to.span), + )); } return Ok(Some(ast::CharacterClassContents::CharacterClassRange( @@ -1174,7 +1220,8 @@ impl<'a> PatternParser<'a> { )))); } - return Err(OxcDiagnostic::error("Unterminated class string disjunction")); + return Err(OxcDiagnostic::error("Unterminated class string disjunction") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } if let Some(class_set_character) = self.parse_class_set_character()? { @@ -1201,62 +1248,64 @@ impl<'a> PatternParser<'a> { // e.g. `/[a[b[c[d[e]f]g]h]i]j]/v` let (kind, body) = self.parse_class_contents()?; - // [SS:EE] NestedClass :: [^ ClassContents ] - // It is a Syntax Error if MayContainStrings of the ClassContents is true. - if negative { - let may_contain_strings = |item: &ast::CharacterClassContents| match item { - // MayContainStrings is true - // - if ClassContents contains UnicodePropertyValueExpression - // - && UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue - // - && it is binary property of strings(can be true only with `UnicodeSetsMode`) - ast::CharacterClassContents::UnicodePropertyEscape(unicode_property_escape) => { - unicode_property_escape.strings - } - // MayContainStrings is true - // - if ClassStringDisjunction is [empty] - // - || if ClassStringDisjunction contains ClassString - // - && ClassString is [empty] - // - || ClassString contains 2 more ClassSetCharacters - ast::CharacterClassContents::ClassStringDisjunction( - class_string_disjunction, - ) => { - class_string_disjunction.body.is_empty() - || class_string_disjunction - .body - .iter() - .any(|class_string| class_string.body.len() != 1) - } - _ => false, - }; - - if match kind { - // MayContainStrings is true - // - if ClassContents is ClassUnion - // - && ClassUnion has ClassOperands - // - && at least 1 ClassOperand has MayContainStrings: true - ast::CharacterClassContentsKind::Union => { - body.iter().any(|item| may_contain_strings(item)) - } - // MayContainStrings is true - // - if ClassContents is ClassIntersection - // - && ClassIntersection has ClassOperands - // - && all ClassOperands have MayContainStrings: true - ast::CharacterClassContentsKind::Intersection => { - body.iter().all(|item| may_contain_strings(item)) - } - // MayContainStrings is true - // - if ClassContents is ClassSubtraction - // - && ClassSubtraction has ClassOperands - // - && the first ClassOperand has MayContainStrings: true - ast::CharacterClassContentsKind::Subtraction => { - body.iter().next().map_or(false, |item| may_contain_strings(item)) + if self.reader.eat(']') { + // [SS:EE] NestedClass :: [^ ClassContents ] + // It is a Syntax Error if MayContainStrings of the ClassContents is true. + if negative { + let may_contain_strings = |item: &ast::CharacterClassContents| match item { + // MayContainStrings is true + // - if ClassContents contains UnicodePropertyValueExpression + // - && UnicodePropertyValueExpression is LoneUnicodePropertyNameOrValue + // - && it is binary property of strings(can be true only with `UnicodeSetsMode`) + ast::CharacterClassContents::UnicodePropertyEscape( + unicode_property_escape, + ) => unicode_property_escape.strings, + // MayContainStrings is true + // - if ClassStringDisjunction is [empty] + // - || if ClassStringDisjunction contains ClassString + // - && ClassString is [empty] + // - || ClassString contains 2 more ClassSetCharacters + ast::CharacterClassContents::ClassStringDisjunction( + class_string_disjunction, + ) => { + class_string_disjunction.body.is_empty() + || class_string_disjunction + .body + .iter() + .any(|class_string| class_string.body.len() != 1) + } + _ => false, + }; + + if match kind { + // MayContainStrings is true + // - if ClassContents is ClassUnion + // - && ClassUnion has ClassOperands + // - && at least 1 ClassOperand has MayContainStrings: true + ast::CharacterClassContentsKind::Union => { + body.iter().any(|item| may_contain_strings(item)) + } + // MayContainStrings is true + // - if ClassContents is ClassIntersection + // - && ClassIntersection has ClassOperands + // - && all ClassOperands have MayContainStrings: true + ast::CharacterClassContentsKind::Intersection => { + body.iter().all(|item| may_contain_strings(item)) + } + // MayContainStrings is true + // - if ClassContents is ClassSubtraction + // - && ClassSubtraction has ClassOperands + // - && the first ClassOperand has MayContainStrings: true + ast::CharacterClassContentsKind::Subtraction => { + body.iter().next().map_or(false, |item| may_contain_strings(item)) + } + } { + return Err(OxcDiagnostic::error("Invalid character class").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } - } { - return Err(OxcDiagnostic::error("Invalid character class")); } - } - if self.reader.eat(']') { return Ok(Some(ast::CharacterClassContents::NestedCharacterClass(Box::new_in( ast::CharacterClass { span: self.span_factory.create(span_start, self.reader.span_position()), @@ -1268,7 +1317,8 @@ impl<'a> PatternParser<'a> { )))); } - return Err(OxcDiagnostic::error("Unterminated nested class")); + return Err(OxcDiagnostic::error("Unterminated nested class") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } // \ CharacterClassEscape[+UnicodeMode] @@ -1407,7 +1457,10 @@ impl<'a> PatternParser<'a> { // GroupSpecifier is optional, but if it exists, `?` is also required if self.reader.eat('?') { let Some(name) = self.consume_group_name()? else { - return Err(OxcDiagnostic::error("Unterminated capturing group name")); + return Err(OxcDiagnostic::error("Capturing group name is missing") + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); }; group_name = Some(name); } @@ -1421,7 +1474,8 @@ impl<'a> PatternParser<'a> { })); } - return Err(OxcDiagnostic::error("Unterminated capturing group")); + return Err(OxcDiagnostic::error("Unterminated capturing group") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } Ok(None) @@ -1437,7 +1491,9 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated ignore group")); + return Err(OxcDiagnostic::error("Unterminated ignore group").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(ast::IgnoreGroup { @@ -1482,6 +1538,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); } + let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); if self.reader.eat('{') { if let Some(min) = self.consume_decimal_digits() { @@ -1501,6 +1558,10 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if the MV of the first DecimalDigits is strictly greater than the MV of the second DecimalDigits. return Err(OxcDiagnostic::error( "Numbers out of order in braced quantifier", + ) + .with_label( + self.span_factory + .create(span_start, self.reader.span_position()), )); } @@ -1569,13 +1630,17 @@ impl<'a> PatternParser<'a> { // UnicodePropertyName=UnicodePropertyValue if let Some(name) = self.consume_unicode_property_name() { if self.reader.eat('=') { + let span_start = self.reader.span_position(); if let Some(value) = self.consume_unicode_property_value() { // [SS:EE] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue // It is a Syntax Error if the source text matched by UnicodePropertyName is not a Unicode property name or property alias listed in the “Property name and aliases” column of Table 65. // [SS:EE] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue // It is a Syntax Error if the source text matched by UnicodePropertyValue is not a property value or property value alias for the Unicode property or property alias given by the source text matched by UnicodePropertyName listed in PropertyValueAliases.txt. if !unicode_property::is_valid_unicode_property(&name, &value) { - return Err(OxcDiagnostic::error("Invalid unicode property name")); + return Err(OxcDiagnostic::error("Invalid unicode property name") + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some((name, Some(value), false))); @@ -1584,6 +1649,7 @@ impl<'a> PatternParser<'a> { } self.reader.rewind(checkpoint); + let span_start = self.reader.span_position(); // LoneUnicodePropertyNameOrValue if let Some(name_or_value) = self.consume_unicode_property_value() { // [SS:EE] UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue @@ -1600,13 +1666,17 @@ impl<'a> PatternParser<'a> { if !self.state.unicode_sets_mode { return Err(OxcDiagnostic::error( "`UnicodeSetsMode` is required for binary property of strings", + ) + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), )); } return Ok(Some((name_or_value, None, true))); } - return Err(OxcDiagnostic::error("Invalid unicode property name or value")); + return Err(OxcDiagnostic::error("Invalid unicode property name or value") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } Ok(None) @@ -1647,6 +1717,8 @@ impl<'a> PatternParser<'a> { // < RegExpIdentifierName[?UnicodeMode] > // ``` fn consume_group_name(&mut self) -> Result>> { + let span_start = self.reader.span_position(); + if !self.reader.eat('<') { return Ok(None); } @@ -1657,7 +1729,8 @@ impl<'a> PatternParser<'a> { } } - Err(OxcDiagnostic::error("Unterminated capturing group name")) + Err(OxcDiagnostic::error("Unterminated capturing group name") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))) } // ``` @@ -1691,12 +1764,16 @@ impl<'a> PatternParser<'a> { return Ok(Some(cp)); } + let span_start = self.reader.span_position(); if self.reader.eat('\\') { if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(true)? { // [SS:EE] RegExpIdentifierStart :: \ RegExpUnicodeEscapeSequence // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierStartChar lexical grammar production. if !unicode::is_identifier_start_char(cp) { - return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + return Err(OxcDiagnostic::error("Invalid unicode escape sequence") + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(cp)); @@ -1704,6 +1781,8 @@ impl<'a> PatternParser<'a> { } if !self.state.unicode_mode { + let span_start = self.reader.span_position(); + if let Some(lead_surrogate) = self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) { @@ -1717,7 +1796,9 @@ impl<'a> PatternParser<'a> { // [SS:EE] RegExpIdentifierStart :: UnicodeLeadSurrogate UnicodeTrailSurrogate // It is a Syntax Error if the RegExpIdentifierCodePoint of RegExpIdentifierStart is not matched by the UnicodeIDStart lexical grammar production. if !unicode::is_unicode_id_start(cp) { - return Err(OxcDiagnostic::error("Invalid surrogate pair")); + return Err(OxcDiagnostic::error("Invalid surrogate pair").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(cp)); @@ -1742,12 +1823,16 @@ impl<'a> PatternParser<'a> { } } + let span_start = self.reader.span_position(); if self.reader.eat('\\') { if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(true)? { // [SS:EE] RegExpIdentifierPart :: \ RegExpUnicodeEscapeSequence // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierPartChar lexical grammar production. if !unicode::is_identifier_part_char(cp) { - return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + return Err(OxcDiagnostic::error("Invalid unicode escape sequence") + .with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(cp)); @@ -1755,6 +1840,8 @@ impl<'a> PatternParser<'a> { } if !self.state.unicode_mode { + let span_start = self.reader.span_position(); + if let Some(lead_surrogate) = self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) { @@ -1768,7 +1855,9 @@ impl<'a> PatternParser<'a> { // [SS:EE] RegExpIdentifierPart :: UnicodeLeadSurrogate UnicodeTrailSurrogate // It is a Syntax Error if the RegExpIdentifierCodePoint of RegExpIdentifierPart is not matched by the UnicodeIDContinue lexical grammar production. if !unicode::is_unicode_id_continue(cp) { - return Err(OxcDiagnostic::error("Invalid surrogate pair")); + return Err(OxcDiagnostic::error("Invalid surrogate pair").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } return Ok(Some(cp)); @@ -1792,7 +1881,9 @@ impl<'a> PatternParser<'a> { &mut self, unicode_mode: bool, ) -> Result> { + let span_start = self.reader.span_position(); let checkpoint = self.reader.checkpoint(); + if self.reader.eat('u') { if unicode_mode { let checkpoint = self.reader.checkpoint(); @@ -1854,7 +1945,9 @@ impl<'a> PatternParser<'a> { } if self.state.unicode_mode { - return Err(OxcDiagnostic::error("Invalid unicode escape sequence")); + return Err(OxcDiagnostic::error("Invalid unicode escape sequence").with_label( + self.span_factory.create(span_start, self.reader.span_position()), + )); } self.reader.rewind(checkpoint); } From 2f2831873184363baff3e18f27ee4c94dd069a22 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 16:40:40 +0900 Subject: [PATCH 132/143] Fix typos --- crates/oxc_regexp_parser/src/body_parser/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 8f66ef8a1f9d7..960cc15370e29 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1097,7 +1097,7 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); if self.reader.eat('&') { return Err(OxcDiagnostic::error( - "Unexpected `&` inside of class interseciton", + "Unexpected `&` inside of class interseciton", // spellchecker:disable-line ) .with_label( self.span_factory.create(span_start, self.reader.span_position()), @@ -1112,7 +1112,7 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); return Err(OxcDiagnostic::error( - "Invalid character in character class set interseciton", + "Invalid character in character class set interseciton", // spellchecker:disable-line ) .with_label(self.span_factory.create(span_start, self.reader.span_position()))); } From a37f4439ed4952c39626f74fc75b02e5be5101dd Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 17:11:11 +0900 Subject: [PATCH 133/143] Fix unreachable --- crates/oxc_regexp_parser/src/body_parser/parser.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 960cc15370e29..5e7e52967b054 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1045,7 +1045,9 @@ impl<'a> PatternParser<'a> { return self.parse_class_set_union(class_set_operand); } - unreachable!("Expected nonempty class set expression") + let span_start = self.reader.span_position(); + Err(OxcDiagnostic::error("Expected nonempty class set expression") + .with_label(self.span_factory.create(span_start, self.reader.span_position()))) } // ``` From c2fda3d6e81b18949cb7a1d5bd79608e2badca98 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 17:55:24 +0900 Subject: [PATCH 134/143] Fix bug --- crates/oxc_regexp_parser/src/body_parser/mod.rs | 2 ++ crates/oxc_regexp_parser/src/body_parser/parser.rs | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/mod.rs b/crates/oxc_regexp_parser/src/body_parser/mod.rs index e17c8542f6c56..43e1a1d2ae547 100644 --- a/crates/oxc_regexp_parser/src/body_parser/mod.rs +++ b/crates/oxc_regexp_parser/src/body_parser/mod.rs @@ -50,6 +50,8 @@ mod test { ), (r"\p{Basic_Emoji}", ParserOptions::default().with_unicode_sets_mode()), (r"\n\cM\0\x41\u1f60\.\/", ParserOptions::default()), + (r"\0", ParserOptions::default()), + (r"\0", ParserOptions::default().with_unicode_mode()), (r"\u", ParserOptions::default()), (r"\u{", ParserOptions::default()), (r"\u{}", ParserOptions::default()), diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 5e7e52967b054..4329f98cbe7ee 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -646,7 +646,7 @@ impl<'a> PatternParser<'a> { // e.g. \0 if self.reader.peek().filter(|&cp| cp == '0' as u32).is_some() - && self.reader.peek2().filter(|&cp| !unicode::is_decimal_digit(cp)).is_some() + && self.reader.peek2().filter(|&cp| unicode::is_decimal_digit(cp)).is_none() { self.reader.advance(); @@ -1584,11 +1584,15 @@ impl<'a> PatternParser<'a> { // NonZeroDigit DecimalDigits[~Sep][opt] [lookahead ∉ DecimalDigit] // ``` fn consume_decimal_escape(&mut self) -> Option { + let checkpoint = self.reader.checkpoint(); + if let Some(index) = self.consume_decimal_digits() { // \0 is CharacterEscape, not DecimalEscape if index != 0 { return Some(index); } + + self.reader.rewind(checkpoint); } None From e3a2ad49930b607c8e8de8e28c0943fbde243591 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 18:13:32 +0900 Subject: [PATCH 135/143] Fix regex parser usage --- crates/oxc_parser/src/js/expression.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/oxc_parser/src/js/expression.rs b/crates/oxc_parser/src/js/expression.rs index 77ac631de3700..c0fe7a1f174ff 100644 --- a/crates/oxc_parser/src/js/expression.rs +++ b/crates/oxc_parser/src/js/expression.rs @@ -189,7 +189,7 @@ impl<'a> ParserImpl<'a> { } Kind::LParen => self.parse_parenthesized_expression(span), Kind::Slash | Kind::SlashEq => { - let literal = self.parse_literal_regexp()?; + let literal = self.parse_literal_regexp(); Ok(self.ast.expression_from_reg_exp_literal(literal)) } // JSXElement, JSXFragment @@ -335,7 +335,7 @@ impl<'a> ParserImpl<'a> { Ok(self.ast.big_int_literal(self.end_span(span), raw, base)) } - pub(crate) fn parse_literal_regexp(&mut self) -> Result> { + pub(crate) fn parse_literal_regexp(&mut self) -> RegExpLiteral<'a> { use oxc_regexp_parser::{ParserOptions, PatternParser}; let span = self.start_span(); @@ -343,24 +343,24 @@ impl<'a> ParserImpl<'a> { let (pattern_end, flags) = self.read_regex(); let pattern_start = self.cur_token().start + 1; // +1 to exclude `/` let pattern = &self.source_text[pattern_start as usize..pattern_end as usize]; - if let Err(diagnostic) = PatternParser::new( - self.ast.allocator, - self.source_text, - ParserOptions::default() - .with_span_offset(pattern_start) - .with_unicode_flags(flags.contains(RegExpFlags::U), flags.contains(RegExpFlags::V)), - ) - .parse() - { + + let options = match (flags.contains(RegExpFlags::U), flags.contains(RegExpFlags::V)) { + (_, true) => ParserOptions::default().with_unicode_sets_mode(), + (true, _) => ParserOptions::default().with_unicode_mode(), + _ => ParserOptions::default(), + } + .with_span_offset(pattern_start); + + if let Err(diagnostic) = PatternParser::new(self.ast.allocator, pattern, options).parse() { self.error(diagnostic); } self.bump_any(); - Ok(self.ast.reg_exp_literal( + self.ast.reg_exp_literal( self.end_span(span), EmptyObject, RegExp { pattern: self.ast.atom(pattern), flags }, - )) + ) } pub(crate) fn parse_literal_string(&mut self) -> Result> { From 8a674d738d6646ce13382944cc0d8d91e7e99140 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Tue, 6 Aug 2024 18:15:20 +0900 Subject: [PATCH 136/143] Update coverage --- tasks/coverage/codegen_sourcemap.snap | 4835 +++++++- tasks/coverage/minifier_test262.snap | 4 +- tasks/coverage/parser_babel.snap | 19 +- tasks/coverage/parser_test262.snap | 14670 +++++++----------------- tasks/coverage/parser_typescript.snap | 442 +- 5 files changed, 9310 insertions(+), 10660 deletions(-) diff --git a/tasks/coverage/codegen_sourcemap.snap b/tasks/coverage/codegen_sourcemap.snap index b2beace16d73a..68777ec09ceba 100644 --- a/tasks/coverage/codegen_sourcemap.snap +++ b/tasks/coverage/codegen_sourcemap.snap @@ -416,7 +416,4840 @@ Invalid Character `[` - react.development.js -Too many capturing groups +(9:0-11:0) "\n'use strict';\n" --> (0:0-1:0) "\"use strict\";" +(11:0-11:4) "\nif " --> (1:0-1:4) "\nif " +(11:4-11:12) "(process" --> (1:4-1:12) "(process" +(11:12-11:16) ".env" --> (1:12-1:16) ".env" +(11:16-11:29) ".NODE_ENV !==" --> (1:16-1:29) ".NODE_ENV !==" +(11:29-11:43) " \"production\")" --> (1:29-1:43) " \"production\")" +(11:43-12:2) " {\n " --> (1:43-2:0) " {" +(12:2-12:3) " " --> (2:0-2:2) "\n\t" +(12:3-12:14) "(function()" --> (2:2-2:13) "(function()" +(12:14-13:0) " {" --> (2:13-3:0) " {" +(13:0-15:0) "\n'use strict';\n" --> (3:0-4:2) "\n\t\t\"use strict\";\n\t" +(15:0-15:4) "\nvar" --> (4:2-4:6) "\tvar" +(15:4-15:14) " _assign =" --> (4:6-4:16) " _assign =" +(15:14-15:22) " require" --> (4:16-4:24) " require" +(15:22-15:38) "('object-assign'" --> (4:24-4:40) "(\"object-assign\"" +(15:38-18:0) ");\n\n// TODO: this is special because it gets imported during build." --> (4:40-5:2) ");\n\t" +(18:0-18:4) "\nvar" --> (5:2-5:6) "\tvar" +(18:4-18:19) " ReactVersion =" --> (5:6-5:21) " ReactVersion =" +(18:19-25:0) " '17.0.2';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance." --> (5:21-6:2) " \"17.0.2\";\n\t" +(25:0-25:4) "\nvar" --> (6:2-6:6) "\tvar" +(25:4-25:25) " REACT_ELEMENT_TYPE =" --> (6:6-6:27) " REACT_ELEMENT_TYPE =" +(25:25-26:0) " 0xeac7;" --> (6:27-7:2) " 0xeac7;\n\t" +(26:0-26:4) "\nvar" --> (7:2-7:6) "\tvar" +(26:4-26:24) " REACT_PORTAL_TYPE =" --> (7:6-7:26) " REACT_PORTAL_TYPE =" +(26:24-27:0) " 0xeaca;" --> (7:26-8:0) " 0xeaca;" +(27:0-27:8) "\nexports" --> (8:0-8:10) "\n\t\texports" +(27:8-27:19) ".Fragment =" --> (8:10-8:21) ".Fragment =" +(27:19-28:0) " 0xeacb;" --> (8:21-9:0) " 0xeacb;" +(28:0-28:8) "\nexports" --> (9:0-9:10) "\n\t\texports" +(28:8-28:21) ".StrictMode =" --> (9:10-9:23) ".StrictMode =" +(28:21-29:0) " 0xeacc;" --> (9:23-10:0) " 0xeacc;" +(29:0-29:8) "\nexports" --> (10:0-10:10) "\n\t\texports" +(29:8-29:19) ".Profiler =" --> (10:10-10:21) ".Profiler =" +(29:19-30:0) " 0xead2;" --> (10:21-11:2) " 0xead2;\n\t" +(30:0-30:4) "\nvar" --> (11:2-11:6) "\tvar" +(30:4-30:26) " REACT_PROVIDER_TYPE =" --> (11:6-11:28) " REACT_PROVIDER_TYPE =" +(30:26-31:0) " 0xeacd;" --> (11:28-12:2) " 0xeacd;\n\t" +(31:0-31:4) "\nvar" --> (12:2-12:6) "\tvar" +(31:4-31:25) " REACT_CONTEXT_TYPE =" --> (12:6-12:27) " REACT_CONTEXT_TYPE =" +(31:25-32:0) " 0xeace;" --> (12:27-13:2) " 0xeace;\n\t" +(32:0-32:4) "\nvar" --> (13:2-13:6) "\tvar" +(32:4-32:29) " REACT_FORWARD_REF_TYPE =" --> (13:6-13:31) " REACT_FORWARD_REF_TYPE =" +(32:29-33:0) " 0xead0;" --> (13:31-14:0) " 0xead0;" +(33:0-33:8) "\nexports" --> (14:0-14:10) "\n\t\texports" +(33:8-33:19) ".Suspense =" --> (14:10-14:21) ".Suspense =" +(33:19-34:0) " 0xead1;" --> (14:21-15:2) " 0xead1;\n\t" +(34:0-34:4) "\nvar" --> (15:2-15:6) "\tvar" +(34:4-34:31) " REACT_SUSPENSE_LIST_TYPE =" --> (15:6-15:33) " REACT_SUSPENSE_LIST_TYPE =" +(34:31-35:0) " 0xead8;" --> (15:33-16:2) " 0xead8;\n\t" +(35:0-35:4) "\nvar" --> (16:2-16:6) "\tvar" +(35:4-35:22) " REACT_MEMO_TYPE =" --> (16:6-16:24) " REACT_MEMO_TYPE =" +(35:22-36:0) " 0xead3;" --> (16:24-17:2) " 0xead3;\n\t" +(36:0-36:4) "\nvar" --> (17:2-17:6) "\tvar" +(36:4-36:22) " REACT_LAZY_TYPE =" --> (17:6-17:24) " REACT_LAZY_TYPE =" +(36:22-37:0) " 0xead4;" --> (17:24-18:2) " 0xead4;\n\t" +(37:0-37:4) "\nvar" --> (18:2-18:6) "\tvar" +(37:4-37:23) " REACT_BLOCK_TYPE =" --> (18:6-18:25) " REACT_BLOCK_TYPE =" +(37:23-38:0) " 0xead9;" --> (18:25-19:2) " 0xead9;\n\t" +(38:0-38:4) "\nvar" --> (19:2-19:6) "\tvar" +(38:4-38:30) " REACT_SERVER_BLOCK_TYPE =" --> (19:6-19:32) " REACT_SERVER_BLOCK_TYPE =" +(38:30-39:0) " 0xeada;" --> (19:32-20:2) " 0xeada;\n\t" +(39:0-39:4) "\nvar" --> (20:2-20:6) "\tvar" +(39:4-39:29) " REACT_FUNDAMENTAL_TYPE =" --> (20:6-20:31) " REACT_FUNDAMENTAL_TYPE =" +(39:29-40:0) " 0xead5;" --> (20:31-21:2) " 0xead5;\n\t" +(40:0-40:4) "\nvar" --> (21:2-21:6) "\tvar" +(40:4-40:23) " REACT_SCOPE_TYPE =" --> (21:6-21:25) " REACT_SCOPE_TYPE =" +(40:23-41:0) " 0xead7;" --> (21:25-22:2) " 0xead7;\n\t" +(41:0-41:4) "\nvar" --> (22:2-22:6) "\tvar" +(41:4-41:27) " REACT_OPAQUE_ID_TYPE =" --> (22:6-22:29) " REACT_OPAQUE_ID_TYPE =" +(41:27-42:0) " 0xeae0;" --> (22:29-23:2) " 0xeae0;\n\t" +(42:0-42:4) "\nvar" --> (23:2-23:6) "\tvar" +(42:4-42:36) " REACT_DEBUG_TRACING_MODE_TYPE =" --> (23:6-23:38) " REACT_DEBUG_TRACING_MODE_TYPE =" +(42:36-43:0) " 0xeae1;" --> (23:38-24:2) " 0xeae1;\n\t" +(43:0-43:4) "\nvar" --> (24:2-24:6) "\tvar" +(43:4-43:27) " REACT_OFFSCREEN_TYPE =" --> (24:6-24:29) " REACT_OFFSCREEN_TYPE =" +(43:27-44:0) " 0xeae2;" --> (24:29-25:2) " 0xeae2;\n\t" +(44:0-44:4) "\nvar" --> (25:2-25:6) "\tvar" +(44:4-44:31) " REACT_LEGACY_HIDDEN_TYPE =" --> (25:6-25:33) " REACT_LEGACY_HIDDEN_TYPE =" +(44:31-46:0) " 0xeae3;\n" --> (25:33-26:0) " 0xeae3;" +(46:0-46:11) "\nif (typeof" --> (26:0-26:13) "\n\t\tif (typeof" +(46:11-46:22) " Symbol ===" --> (26:13-26:24) " Symbol ===" +(46:22-46:36) " 'function' &&" --> (26:24-26:38) " \"function\" &&" +(46:36-46:43) " Symbol" --> (26:38-26:45) " Symbol" +(46:43-46:48) ".for)" --> (26:45-26:50) ".for)" +(46:48-47:2) " {\n " --> (26:50-27:3) " {\n\t\t" +(47:2-47:6) " var" --> (27:3-27:7) "\tvar" +(47:6-47:18) " symbolFor =" --> (27:7-27:19) " symbolFor =" +(47:18-47:25) " Symbol" --> (27:19-27:26) " Symbol" +(47:25-48:2) ".for;\n " --> (27:26-28:0) ".for;" +(48:2-48:23) " REACT_ELEMENT_TYPE =" --> (28:0-28:24) "\n\t\t\tREACT_ELEMENT_TYPE =" +(48:23-48:33) " symbolFor" --> (28:24-28:34) " symbolFor" +(48:33-48:49) "('react.element'" --> (28:34-28:50) "(\"react.element\"" +(48:49-49:2) ");\n " --> (28:50-29:0) ");" +(49:2-49:22) " REACT_PORTAL_TYPE =" --> (29:0-29:23) "\n\t\t\tREACT_PORTAL_TYPE =" +(49:22-49:32) " symbolFor" --> (29:23-29:33) " symbolFor" +(49:32-49:47) "('react.portal'" --> (29:33-29:48) "(\"react.portal\"" +(49:47-50:2) ");\n " --> (29:48-30:0) ");" +(50:2-50:10) " exports" --> (30:0-30:11) "\n\t\t\texports" +(50:10-50:21) ".Fragment =" --> (30:11-30:22) ".Fragment =" +(50:21-50:31) " symbolFor" --> (30:22-30:32) " symbolFor" +(50:31-50:48) "('react.fragment'" --> (30:32-30:49) "(\"react.fragment\"" +(50:48-51:2) ");\n " --> (30:49-31:0) ");" +(51:2-51:10) " exports" --> (31:0-31:11) "\n\t\t\texports" +(51:10-51:23) ".StrictMode =" --> (31:11-31:24) ".StrictMode =" +(51:23-51:33) " symbolFor" --> (31:24-31:34) " symbolFor" +(51:33-51:53) "('react.strict_mode'" --> (31:34-31:54) "(\"react.strict_mode\"" +(51:53-52:2) ");\n " --> (31:54-32:0) ");" +(52:2-52:10) " exports" --> (32:0-32:11) "\n\t\t\texports" +(52:10-52:21) ".Profiler =" --> (32:11-32:22) ".Profiler =" +(52:21-52:31) " symbolFor" --> (32:22-32:32) " symbolFor" +(52:31-52:48) "('react.profiler'" --> (32:32-32:49) "(\"react.profiler\"" +(52:48-53:2) ");\n " --> (32:49-33:0) ");" +(53:2-53:24) " REACT_PROVIDER_TYPE =" --> (33:0-33:25) "\n\t\t\tREACT_PROVIDER_TYPE =" +(53:24-53:34) " symbolFor" --> (33:25-33:35) " symbolFor" +(53:34-53:51) "('react.provider'" --> (33:35-33:52) "(\"react.provider\"" +(53:51-54:2) ");\n " --> (33:52-34:0) ");" +(54:2-54:23) " REACT_CONTEXT_TYPE =" --> (34:0-34:24) "\n\t\t\tREACT_CONTEXT_TYPE =" +(54:23-54:33) " symbolFor" --> (34:24-34:34) " symbolFor" +(54:33-54:49) "('react.context'" --> (34:34-34:50) "(\"react.context\"" +(54:49-55:2) ");\n " --> (34:50-35:0) ");" +(55:2-55:27) " REACT_FORWARD_REF_TYPE =" --> (35:0-35:28) "\n\t\t\tREACT_FORWARD_REF_TYPE =" +(55:27-55:37) " symbolFor" --> (35:28-35:38) " symbolFor" +(55:37-55:57) "('react.forward_ref'" --> (35:38-35:58) "(\"react.forward_ref\"" +(55:57-56:2) ");\n " --> (35:58-36:0) ");" +(56:2-56:10) " exports" --> (36:0-36:11) "\n\t\t\texports" +(56:10-56:21) ".Suspense =" --> (36:11-36:22) ".Suspense =" +(56:21-56:31) " symbolFor" --> (36:22-36:32) " symbolFor" +(56:31-56:48) "('react.suspense'" --> (36:32-36:49) "(\"react.suspense\"" +(56:48-57:2) ");\n " --> (36:49-37:0) ");" +(57:2-57:29) " REACT_SUSPENSE_LIST_TYPE =" --> (37:0-37:30) "\n\t\t\tREACT_SUSPENSE_LIST_TYPE =" +(57:29-57:39) " symbolFor" --> (37:30-37:40) " symbolFor" +(57:39-57:61) "('react.suspense_list'" --> (37:40-37:62) "(\"react.suspense_list\"" +(57:61-58:2) ");\n " --> (37:62-38:0) ");" +(58:2-58:20) " REACT_MEMO_TYPE =" --> (38:0-38:21) "\n\t\t\tREACT_MEMO_TYPE =" +(58:20-58:30) " symbolFor" --> (38:21-38:31) " symbolFor" +(58:30-58:43) "('react.memo'" --> (38:31-38:44) "(\"react.memo\"" +(58:43-59:2) ");\n " --> (38:44-39:0) ");" +(59:2-59:20) " REACT_LAZY_TYPE =" --> (39:0-39:21) "\n\t\t\tREACT_LAZY_TYPE =" +(59:20-59:30) " symbolFor" --> (39:21-39:31) " symbolFor" +(59:30-59:43) "('react.lazy'" --> (39:31-39:44) "(\"react.lazy\"" +(59:43-60:2) ");\n " --> (39:44-40:0) ");" +(60:2-60:21) " REACT_BLOCK_TYPE =" --> (40:0-40:22) "\n\t\t\tREACT_BLOCK_TYPE =" +(60:21-60:31) " symbolFor" --> (40:22-40:32) " symbolFor" +(60:31-60:45) "('react.block'" --> (40:32-40:46) "(\"react.block\"" +(60:45-61:2) ");\n " --> (40:46-41:0) ");" +(61:2-61:28) " REACT_SERVER_BLOCK_TYPE =" --> (41:0-41:29) "\n\t\t\tREACT_SERVER_BLOCK_TYPE =" +(61:28-61:38) " symbolFor" --> (41:29-41:39) " symbolFor" +(61:38-61:59) "('react.server.block'" --> (41:39-41:60) "(\"react.server.block\"" +(61:59-62:2) ");\n " --> (41:60-42:0) ");" +(62:2-62:27) " REACT_FUNDAMENTAL_TYPE =" --> (42:0-42:28) "\n\t\t\tREACT_FUNDAMENTAL_TYPE =" +(62:27-62:37) " symbolFor" --> (42:28-42:38) " symbolFor" +(62:37-62:57) "('react.fundamental'" --> (42:38-42:58) "(\"react.fundamental\"" +(62:57-63:2) ");\n " --> (42:58-43:0) ");" +(63:2-63:21) " REACT_SCOPE_TYPE =" --> (43:0-43:22) "\n\t\t\tREACT_SCOPE_TYPE =" +(63:21-63:31) " symbolFor" --> (43:22-43:32) " symbolFor" +(63:31-63:45) "('react.scope'" --> (43:32-43:46) "(\"react.scope\"" +(63:45-64:2) ");\n " --> (43:46-44:0) ");" +(64:2-64:25) " REACT_OPAQUE_ID_TYPE =" --> (44:0-44:26) "\n\t\t\tREACT_OPAQUE_ID_TYPE =" +(64:25-64:35) " symbolFor" --> (44:26-44:36) " symbolFor" +(64:35-64:53) "('react.opaque.id'" --> (44:36-44:54) "(\"react.opaque.id\"" +(64:53-65:2) ");\n " --> (44:54-45:0) ");" +(65:2-65:34) " REACT_DEBUG_TRACING_MODE_TYPE =" --> (45:0-45:35) "\n\t\t\tREACT_DEBUG_TRACING_MODE_TYPE =" +(65:34-65:44) " symbolFor" --> (45:35-45:45) " symbolFor" +(65:44-65:69) "('react.debug_trace_mode'" --> (45:45-45:70) "(\"react.debug_trace_mode\"" +(65:69-66:2) ");\n " --> (45:70-46:0) ");" +(66:2-66:25) " REACT_OFFSCREEN_TYPE =" --> (46:0-46:26) "\n\t\t\tREACT_OFFSCREEN_TYPE =" +(66:25-66:35) " symbolFor" --> (46:26-46:36) " symbolFor" +(66:35-66:53) "('react.offscreen'" --> (46:36-46:54) "(\"react.offscreen\"" +(66:53-67:2) ");\n " --> (46:54-47:0) ");" +(67:2-67:29) " REACT_LEGACY_HIDDEN_TYPE =" --> (47:0-47:30) "\n\t\t\tREACT_LEGACY_HIDDEN_TYPE =" +(67:29-67:39) " symbolFor" --> (47:30-47:40) " symbolFor" +(67:39-67:61) "('react.legacy_hidden'" --> (47:40-47:62) "(\"react.legacy_hidden\"" +(67:61-68:1) ");\n" --> (47:62-48:2) ");\n\t" +(68:1-70:0) "}\n" --> (48:2-49:2) "\t}\n\t" +(70:0-70:4) "\nvar" --> (49:2-49:6) "\tvar" +(70:4-70:35) " MAYBE_ITERATOR_SYMBOL = typeof" --> (49:6-49:37) " MAYBE_ITERATOR_SYMBOL = typeof" +(70:35-70:46) " Symbol ===" --> (49:37-49:48) " Symbol ===" +(70:46-70:60) " 'function' &&" --> (49:48-49:62) " \"function\" &&" +(70:60-70:67) " Symbol" --> (49:62-49:69) " Symbol" +(70:67-71:0) ".iterator;" --> (49:69-50:2) ".iterator;\n\t" +(71:0-71:4) "\nvar" --> (50:2-50:6) "\tvar" +(71:4-71:27) " FAUX_ITERATOR_SYMBOL =" --> (50:6-50:29) " FAUX_ITERATOR_SYMBOL =" +(71:27-72:0) " '@@iterator';" --> (50:29-51:2) " \"@@iterator\";\n\t" +(72:0-72:9) "\nfunction" --> (51:2-51:11) "\tfunction" +(72:9-72:23) " getIteratorFn" --> (51:11-51:25) " getIteratorFn" +(72:23-72:38) "(maybeIterable)" --> (51:25-51:40) "(maybeIterable)" +(72:38-73:2) " {\n " --> (51:40-52:0) " {" +(73:2-73:6) " if " --> (52:0-52:7) "\n\t\t\tif " +(73:6-73:24) "(maybeIterable ===" --> (52:7-52:25) "(maybeIterable ===" +(73:24-73:39) " null || typeof" --> (52:25-52:40) " null || typeof" +(73:39-73:57) " maybeIterable !==" --> (52:40-52:58) " maybeIterable !==" +(73:57-73:67) " 'object')" --> (52:58-52:68) " \"object\")" +(73:67-74:4) " {\n " --> (52:68-53:0) " {" +(74:4-74:11) " return" --> (53:0-53:11) "\n\t\t\t\treturn" +(74:11-75:3) " null;\n " --> (53:11-54:3) " null;\n\t\t" +(75:3-77:2) "}\n\n " --> (54:3-55:3) "\t}\n\t\t" +(77:2-77:6) " var" --> (55:3-55:7) "\tvar" +(77:6-77:22) " maybeIterator =" --> (55:7-55:23) " maybeIterator =" +(77:22-77:47) " MAYBE_ITERATOR_SYMBOL &&" --> (55:23-55:48) " MAYBE_ITERATOR_SYMBOL &&" +(77:47-77:61) " maybeIterable" --> (55:48-55:62) " maybeIterable" +(77:61-77:87) "[MAYBE_ITERATOR_SYMBOL] ||" --> (55:62-55:88) "[MAYBE_ITERATOR_SYMBOL] ||" +(77:87-77:101) " maybeIterable" --> (55:88-55:102) " maybeIterable" +(77:101-79:2) "[FAUX_ITERATOR_SYMBOL];\n\n " --> (55:102-56:0) "[FAUX_ITERATOR_SYMBOL];" +(79:2-79:13) " if (typeof" --> (56:0-56:14) "\n\t\t\tif (typeof" +(79:13-79:31) " maybeIterator ===" --> (56:14-56:32) " maybeIterator ===" +(79:31-79:43) " 'function')" --> (56:32-56:44) " \"function\")" +(79:43-80:4) " {\n " --> (56:44-57:0) " {" +(80:4-80:11) " return" --> (57:0-57:11) "\n\t\t\t\treturn" +(80:11-81:3) " maybeIterator;\n " --> (57:11-58:3) " maybeIterator;\n\t\t" +(81:3-83:2) "}\n\n " --> (58:3-59:0) "\t}" +(83:2-83:9) " return" --> (59:0-59:10) "\n\t\t\treturn" +(83:9-84:1) " null;\n" --> (59:10-60:2) " null;\n\t" +(84:1-89:0) "}\n\n/**\n * Keeps track of the current dispatcher.\n */" --> (60:2-61:2) "\t}\n\t" +(89:0-89:4) "\nvar" --> (61:2-61:6) "\tvar" +(89:4-89:29) " ReactCurrentDispatcher =" --> (61:6-61:31) " ReactCurrentDispatcher =" +(89:29-94:2) " {\n /**\n * @internal\n * @type {ReactComponent}\n */\n " --> (61:31-61:33) " {" +(94:2-94:11) " current:" --> (61:33-61:42) " current:" +(94:11-95:1) " null\n" --> (61:42-61:47) " null" +(95:1-101:0) "};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */" --> (61:47-62:2) " };\n\t" +(101:0-101:4) "\nvar" --> (62:2-62:6) "\tvar" +(101:4-101:30) " ReactCurrentBatchConfig =" --> (62:6-62:32) " ReactCurrentBatchConfig =" +(101:30-102:2) " {\n " --> (62:32-62:34) " {" +(102:2-102:14) " transition:" --> (62:34-62:46) " transition:" +(102:14-103:1) " 0\n" --> (62:46-62:48) " 0" +(103:1-111:0) "};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */" --> (62:48-63:2) " };\n\t" +(111:0-111:4) "\nvar" --> (63:2-63:6) "\tvar" +(111:4-111:24) " ReactCurrentOwner =" --> (63:6-63:26) " ReactCurrentOwner =" +(111:24-116:2) " {\n /**\n * @internal\n * @type {ReactComponent}\n */\n " --> (63:26-63:28) " {" +(116:2-116:11) " current:" --> (63:28-63:37) " current:" +(116:11-117:1) " null\n" --> (63:37-63:42) " null" +(117:1-119:0) "};\n" --> (63:42-64:2) " };\n\t" +(119:0-119:4) "\nvar" --> (64:2-64:6) "\tvar" +(119:4-119:29) " ReactDebugCurrentFrame =" --> (64:6-64:31) " ReactDebugCurrentFrame =" +(119:29-119:31) " {" --> (64:31-64:32) " " +(119:31-120:0) "};" --> (64:32-65:2) "{};\n\t" +(120:0-120:4) "\nvar" --> (65:2-65:6) "\tvar" +(120:4-120:29) " currentExtraStackFrame =" --> (65:6-65:31) " currentExtraStackFrame =" +(120:29-121:0) " null;" --> (65:31-66:2) " null;\n\t" +(121:0-121:9) "\nfunction" --> (66:2-66:11) "\tfunction" +(121:9-121:28) " setExtraStackFrame" --> (66:11-66:30) " setExtraStackFrame" +(121:28-121:35) "(stack)" --> (66:30-66:37) "(stack)" +(121:35-122:2) " {\n " --> (66:37-67:3) " {\n\t\t" +(122:2-123:4) " {\n " --> (67:3-68:0) "\t{" +(123:4-123:29) " currentExtraStackFrame =" --> (68:0-68:29) "\n\t\t\t\tcurrentExtraStackFrame =" +(123:29-124:3) " stack;\n " --> (68:29-69:3) " stack;\n\t\t" +(124:3-125:1) "}\n" --> (69:3-70:2) "\t}\n\t" +(125:1-127:0) "}\n" --> (70:2-71:2) "\t}\n\t" +(127:0-128:2) "\n{\n " --> (71:2-72:0) "\t{" +(128:2-128:25) " ReactDebugCurrentFrame" --> (72:0-72:26) "\n\t\t\tReactDebugCurrentFrame" +(128:25-128:46) ".setExtraStackFrame =" --> (72:26-72:47) ".setExtraStackFrame =" +(128:46-128:56) " function " --> (72:47-72:56) " function" +(128:56-128:63) "(stack)" --> (72:56-72:63) "(stack)" +(128:63-129:4) " {\n " --> (72:63-73:4) " {\n\t\t\t" +(129:4-130:6) " {\n " --> (73:4-74:0) "\t{" +(130:6-130:31) " currentExtraStackFrame =" --> (74:0-74:30) "\n\t\t\t\t\tcurrentExtraStackFrame =" +(130:31-131:5) " stack;\n " --> (74:30-75:4) " stack;\n\t\t\t" +(131:5-132:3) "}\n " --> (75:4-76:3) "\t}\n\t\t" +(132:3-135:2) "}; // Stack implementation injected by the current renderer.\n\n\n " --> (76:3-77:0) "\t};" +(135:2-135:25) " ReactDebugCurrentFrame" --> (77:0-77:26) "\n\t\t\tReactDebugCurrentFrame" +(135:25-135:43) ".getCurrentStack =" --> (77:26-77:44) ".getCurrentStack =" +(135:43-137:2) " null;\n\n " --> (77:44-78:0) " null;" +(137:2-137:25) " ReactDebugCurrentFrame" --> (78:0-78:26) "\n\t\t\tReactDebugCurrentFrame" +(137:25-137:44) ".getStackAddendum =" --> (78:26-78:45) ".getStackAddendum =" +(137:44-137:56) " function ()" --> (78:45-78:56) " function()" +(137:56-138:4) " {\n " --> (78:56-79:4) " {\n\t\t\t" +(138:4-138:8) " var" --> (79:4-79:8) "\tvar" +(138:8-138:16) " stack =" --> (79:8-79:16) " stack =" +(138:16-140:4) " ''; // Add an extra top frame while an element is being validated\n\n " --> (79:16-80:0) " \"\";" +(140:4-140:8) " if " --> (80:0-80:8) "\n\t\t\t\tif " +(140:8-140:32) "(currentExtraStackFrame)" --> (80:8-80:32) "(currentExtraStackFrame)" +(140:32-141:6) " {\n " --> (80:32-81:0) " {" +(141:6-141:15) " stack +=" --> (81:0-81:14) "\n\t\t\t\t\tstack +=" +(141:15-142:5) " currentExtraStackFrame;\n " --> (81:14-82:4) " currentExtraStackFrame;\n\t\t\t" +(142:5-145:4) "} // Delegate to the injected renderer-specific implementation\n\n\n " --> (82:4-83:4) "\t}\n\t\t\t" +(145:4-145:8) " var" --> (83:4-83:8) "\tvar" +(145:8-145:15) " impl =" --> (83:8-83:15) " impl =" +(145:15-145:38) " ReactDebugCurrentFrame" --> (83:15-83:38) " ReactDebugCurrentFrame" +(145:38-147:4) ".getCurrentStack;\n\n " --> (83:38-84:0) ".getCurrentStack;" +(147:4-147:8) " if " --> (84:0-84:8) "\n\t\t\t\tif " +(147:8-147:14) "(impl)" --> (84:8-84:14) "(impl)" +(147:14-148:6) " {\n " --> (84:14-85:0) " {" +(148:6-148:15) " stack +=" --> (85:0-85:14) "\n\t\t\t\t\tstack +=" +(148:15-148:21) " impl(" --> (85:14-85:20) " impl(" +(148:21-148:25) ") ||" --> (85:20-85:24) ") ||" +(148:25-149:5) " '';\n " --> (85:24-86:4) " \"\";\n\t\t\t" +(149:5-151:4) "}\n\n " --> (86:4-87:0) "\t}" +(151:4-151:11) " return" --> (87:0-87:11) "\n\t\t\t\treturn" +(151:11-152:3) " stack;\n " --> (87:11-88:3) " stack;\n\t\t" +(152:3-153:1) "};\n" --> (88:3-89:2) "\t};\n\t" +(153:1-158:0) "}\n\n/**\n * Used by act() to track whether you're inside an act() scope.\n */" --> (89:2-90:2) "\t}\n\t" +(158:0-158:4) "\nvar" --> (90:2-90:6) "\tvar" +(158:4-158:27) " IsSomeRendererActing =" --> (90:6-90:29) " IsSomeRendererActing =" +(158:27-159:2) " {\n " --> (90:29-90:31) " {" +(159:2-159:11) " current:" --> (90:31-90:40) " current:" +(159:11-160:1) " false\n" --> (90:40-90:46) " false" +(160:1-162:0) "};\n" --> (90:46-91:2) " };\n\t" +(162:0-162:4) "\nvar" --> (91:2-91:6) "\tvar" +(162:4-162:27) " ReactSharedInternals =" --> (91:6-91:29) " ReactSharedInternals =" +(162:27-163:26) " {\n ReactCurrentDispatcher:" --> (91:29-92:3) " {\n\t\t" +(163:26-164:27) " ReactCurrentDispatcher,\n ReactCurrentBatchConfig:" --> (92:3-93:3) "\tReactCurrentDispatcher,\n\t\t" +(164:27-165:21) " ReactCurrentBatchConfig,\n ReactCurrentOwner:" --> (93:3-94:3) "\tReactCurrentBatchConfig,\n\t\t" +(165:21-166:24) " ReactCurrentOwner,\n IsSomeRendererActing:" --> (94:3-95:3) "\tReactCurrentOwner,\n\t\t" +(166:24-168:2) " IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n " --> (95:3-96:3) "\tIsSomeRendererActing,\n\t\t" +(168:2-168:10) " assign:" --> (96:3-96:11) "\tassign:" +(168:10-169:1) " _assign\n" --> (96:11-97:2) " _assign\n\t" +(169:1-171:0) "};\n" --> (97:2-98:2) "\t};\n\t" +(171:0-172:2) "\n{\n " --> (98:2-99:0) "\t{" +(172:2-172:23) " ReactSharedInternals" --> (99:0-99:24) "\n\t\t\tReactSharedInternals" +(172:23-172:48) ".ReactDebugCurrentFrame =" --> (99:24-99:49) ".ReactDebugCurrentFrame =" +(172:48-173:1) " ReactDebugCurrentFrame;\n" --> (99:49-100:2) " ReactDebugCurrentFrame;\n\t" +(173:1-180:0) "}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n" --> (100:2-101:2) "\t}\n\t" +(180:0-180:9) "\nfunction" --> (101:2-101:11) "\tfunction" +(180:9-180:14) " warn" --> (101:11-101:16) " warn" +(180:14-180:22) "(format)" --> (101:16-101:24) "(format)" +(180:22-181:2) " {\n " --> (101:24-102:3) " {\n\t\t" +(181:2-182:4) " {\n " --> (102:3-103:0) "\t{" +(182:4-182:9) " for " --> (103:0-103:9) "\n\t\t\t\tfor " +(182:9-182:13) "(var" --> (103:9-103:13) "(var" +(182:13-182:20) " _len =" --> (103:13-103:20) " _len =" +(182:20-182:30) " arguments" --> (103:20-103:30) " arguments" +(182:30-182:38) ".length," --> (103:30-103:38) ".length," +(182:38-182:45) " args =" --> (103:38-103:45) " args =" +(182:45-182:49) " new" --> (103:45-103:49) " new" +(182:49-182:55) " Array" --> (103:49-103:55) " Array" +(182:55-182:62) "(_len >" --> (103:55-103:62) "(_len >" +(182:62-182:66) " 1 ?" --> (103:62-103:66) " 1 ?" +(182:66-182:73) " _len -" --> (103:66-103:73) " _len -" +(182:73-182:77) " 1 :" --> (103:73-103:77) " 1 :" +(182:77-182:81) " 0)," --> (103:77-103:81) " 0)," +(182:81-182:88) " _key =" --> (103:81-103:88) " _key =" +(182:88-182:91) " 1;" --> (103:88-103:91) " 1;" +(182:91-182:98) " _key <" --> (103:91-103:98) " _key <" +(182:98-182:104) " _len;" --> (103:98-103:104) " _len;" +(182:104-182:112) " _key++)" --> (103:104-103:112) " _key++)" +(182:112-183:6) " {\n " --> (103:112-104:0) " {" +(183:6-183:11) " args" --> (104:0-104:10) "\n\t\t\t\t\targs" +(183:11-183:18) "[_key -" --> (104:10-104:17) "[_key -" +(183:18-183:23) " 1] =" --> (104:17-104:22) " 1] =" +(183:23-183:33) " arguments" --> (104:22-104:32) " arguments" +(183:33-184:5) "[_key];\n " --> (104:32-105:4) "[_key];\n\t\t\t" +(184:5-186:4) "}\n\n " --> (105:4-106:0) "\t}" +(186:4-186:17) " printWarning" --> (106:0-106:17) "\n\t\t\t\tprintWarning" +(186:17-186:25) "('warn'," --> (106:17-106:25) "(\"warn\"," +(186:25-186:33) " format," --> (106:25-106:33) " format," +(186:33-186:38) " args" --> (106:33-106:38) " args" +(186:38-187:3) ");\n " --> (106:38-107:3) ");\n\t\t" +(187:3-188:1) "}\n" --> (107:3-108:2) "\t}\n\t" +(188:1-189:0) "}" --> (108:2-109:2) "\t}\n\t" +(189:0-189:9) "\nfunction" --> (109:2-109:11) "\tfunction" +(189:9-189:15) " error" --> (109:11-109:17) " error" +(189:15-189:23) "(format)" --> (109:17-109:25) "(format)" +(189:23-190:2) " {\n " --> (109:25-110:3) " {\n\t\t" +(190:2-191:4) " {\n " --> (110:3-111:0) "\t{" +(191:4-191:9) " for " --> (111:0-111:9) "\n\t\t\t\tfor " +(191:9-191:13) "(var" --> (111:9-111:13) "(var" +(191:13-191:21) " _len2 =" --> (111:13-111:21) " _len2 =" +(191:21-191:31) " arguments" --> (111:21-111:31) " arguments" +(191:31-191:39) ".length," --> (111:31-111:39) ".length," +(191:39-191:46) " args =" --> (111:39-111:46) " args =" +(191:46-191:50) " new" --> (111:46-111:50) " new" +(191:50-191:56) " Array" --> (111:50-111:56) " Array" +(191:56-191:64) "(_len2 >" --> (111:56-111:64) "(_len2 >" +(191:64-191:68) " 1 ?" --> (111:64-111:68) " 1 ?" +(191:68-191:76) " _len2 -" --> (111:68-111:76) " _len2 -" +(191:76-191:80) " 1 :" --> (111:76-111:80) " 1 :" +(191:80-191:84) " 0)," --> (111:80-111:84) " 0)," +(191:84-191:92) " _key2 =" --> (111:84-111:92) " _key2 =" +(191:92-191:95) " 1;" --> (111:92-111:95) " 1;" +(191:95-191:103) " _key2 <" --> (111:95-111:103) " _key2 <" +(191:103-191:110) " _len2;" --> (111:103-111:110) " _len2;" +(191:110-191:119) " _key2++)" --> (111:110-111:119) " _key2++)" +(191:119-192:6) " {\n " --> (111:119-112:0) " {" +(192:6-192:11) " args" --> (112:0-112:10) "\n\t\t\t\t\targs" +(192:11-192:19) "[_key2 -" --> (112:10-112:18) "[_key2 -" +(192:19-192:24) " 1] =" --> (112:18-112:23) " 1] =" +(192:24-192:34) " arguments" --> (112:23-112:33) " arguments" +(192:34-193:5) "[_key2];\n " --> (112:33-113:4) "[_key2];\n\t\t\t" +(193:5-195:4) "}\n\n " --> (113:4-114:0) "\t}" +(195:4-195:17) " printWarning" --> (114:0-114:17) "\n\t\t\t\tprintWarning" +(195:17-195:26) "('error'," --> (114:17-114:26) "(\"error\"," +(195:26-195:34) " format," --> (114:26-114:34) " format," +(195:34-195:39) " args" --> (114:34-114:39) " args" +(195:39-196:3) ");\n " --> (114:39-115:3) ");\n\t\t" +(196:3-197:1) "}\n" --> (115:3-116:2) "\t}\n\t" +(197:1-199:0) "}\n" --> (116:2-117:2) "\t}\n\t" +(199:0-199:9) "\nfunction" --> (117:2-117:11) "\tfunction" +(199:9-199:22) " printWarning" --> (117:11-117:24) " printWarning" +(199:22-199:29) "(level," --> (117:24-117:31) "(level," +(199:29-199:37) " format," --> (117:31-117:39) " format," +(199:37-199:43) " args)" --> (117:39-117:45) " args)" +(199:43-202:2) " {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n " --> (117:45-118:3) " {\n\t\t" +(202:2-203:4) " {\n " --> (118:3-119:4) "\t{\n\t\t\t" +(203:4-203:8) " var" --> (119:4-119:8) "\tvar" +(203:8-203:33) " ReactDebugCurrentFrame =" --> (119:8-119:33) " ReactDebugCurrentFrame =" +(203:33-203:54) " ReactSharedInternals" --> (119:33-119:54) " ReactSharedInternals" +(203:54-204:4) ".ReactDebugCurrentFrame;\n " --> (119:54-120:4) ".ReactDebugCurrentFrame;\n\t\t\t" +(204:4-204:8) " var" --> (120:4-120:8) "\tvar" +(204:8-204:16) " stack =" --> (120:8-120:16) " stack =" +(204:16-204:39) " ReactDebugCurrentFrame" --> (120:16-120:39) " ReactDebugCurrentFrame" +(204:39-204:57) ".getStackAddendum(" --> (120:39-120:57) ".getStackAddendum(" +(204:57-206:4) ");\n\n " --> (120:57-121:0) ");" +(206:4-206:8) " if " --> (121:0-121:8) "\n\t\t\t\tif " +(206:8-206:18) "(stack !==" --> (121:8-121:18) "(stack !==" +(206:18-206:22) " '')" --> (121:18-121:22) " \"\")" +(206:22-207:6) " {\n " --> (121:22-122:0) " {" +(207:6-207:16) " format +=" --> (122:0-122:15) "\n\t\t\t\t\tformat +=" +(207:16-208:6) " '%s';\n " --> (122:15-123:0) " \"%s\";" +(208:6-208:13) " args =" --> (123:0-123:12) "\n\t\t\t\t\targs =" +(208:13-208:18) " args" --> (123:12-123:17) " args" +(208:18-208:25) ".concat" --> (123:17-123:24) ".concat" +(208:25-208:26) "(" --> (123:24-123:25) "(" +(208:26-208:32) "[stack" --> (123:25-123:31) "[stack" +(208:32-208:33) "]" --> (123:31-123:32) "]" +(208:33-209:5) ");\n " --> (123:32-124:4) ");\n\t\t\t" +(209:5-211:4) "}\n\n " --> (124:4-125:4) "\t}\n\t\t\t" +(211:4-211:8) " var" --> (125:4-125:8) "\tvar" +(211:8-211:25) " argsWithFormat =" --> (125:8-125:25) " argsWithFormat =" +(211:25-211:30) " args" --> (125:25-125:30) " args" +(211:30-211:34) ".map" --> (125:30-125:34) ".map" +(211:34-211:44) "(function " --> (125:34-125:43) "(function" +(211:44-211:50) "(item)" --> (125:43-125:49) "(item)" +(211:50-212:6) " {\n " --> (125:49-126:0) " {" +(212:6-212:13) " return" --> (126:0-126:12) "\n\t\t\t\t\treturn" +(212:13-212:18) " '' +" --> (126:12-126:17) " \"\" +" +(212:18-213:5) " item;\n " --> (126:17-127:4) " item;\n\t\t\t" +(213:5-213:6) "}" --> (127:4-127:6) "\t}" +(213:6-215:4) "); // Careful: RN currently depends on this prefix\n\n " --> (127:6-128:0) ");" +(215:4-215:19) " argsWithFormat" --> (128:0-128:19) "\n\t\t\t\targsWithFormat" +(215:19-215:27) ".unshift" --> (128:19-128:27) ".unshift" +(215:27-215:41) "('Warning: ' +" --> (128:27-128:41) "(\"Warning: \" +" +(215:41-215:48) " format" --> (128:41-128:48) " format" +(215:48-219:4) "); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n " --> (128:48-129:0) ");" +(219:4-219:13) " Function" --> (129:0-129:13) "\n\t\t\t\tFunction" +(219:13-219:23) ".prototype" --> (129:13-129:23) ".prototype" +(219:23-219:29) ".apply" --> (129:23-129:29) ".apply" +(219:29-219:34) ".call" --> (129:29-129:34) ".call" +(219:34-219:42) "(console" --> (129:34-129:42) "(console" +(219:42-219:50) "[level]," --> (129:42-129:50) "[level]," +(219:50-219:59) " console," --> (129:50-129:59) " console," +(219:59-219:74) " argsWithFormat" --> (129:59-129:74) " argsWithFormat" +(219:74-220:3) ");\n " --> (129:74-130:3) ");\n\t\t" +(220:3-221:1) "}\n" --> (130:3-131:2) "\t}\n\t" +(221:1-223:0) "}\n" --> (131:2-132:2) "\t}\n\t" +(223:0-223:4) "\nvar" --> (132:2-132:6) "\tvar" +(223:4-223:46) " didWarnStateUpdateForUnmountedComponent =" --> (132:6-132:48) " didWarnStateUpdateForUnmountedComponent =" +(223:46-223:48) " {" --> (132:48-132:49) " " +(223:48-225:0) "};\n" --> (132:49-133:2) "{};\n\t" +(225:0-225:9) "\nfunction" --> (133:2-133:11) "\tfunction" +(225:9-225:18) " warnNoop" --> (133:11-133:20) " warnNoop" +(225:18-225:34) "(publicInstance," --> (133:20-133:36) "(publicInstance," +(225:34-225:46) " callerName)" --> (133:36-133:48) " callerName)" +(225:46-226:2) " {\n " --> (133:48-134:3) " {\n\t\t" +(226:2-227:4) " {\n " --> (134:3-135:4) "\t{\n\t\t\t" +(227:4-227:8) " var" --> (135:4-135:8) "\tvar" +(227:8-227:23) " _constructor =" --> (135:8-135:23) " _constructor =" +(227:23-227:38) " publicInstance" --> (135:23-135:38) " publicInstance" +(227:38-228:4) ".constructor;\n " --> (135:38-136:4) ".constructor;\n\t\t\t" +(228:4-228:8) " var" --> (136:4-136:8) "\tvar" +(228:8-228:24) " componentName =" --> (136:8-136:24) " componentName =" +(228:24-228:41) " _constructor && " --> (136:24-136:41) " _constructor && " +(228:41-228:54) "(_constructor" --> (136:41-136:54) "(_constructor" +(228:54-228:69) ".displayName ||" --> (136:54-136:69) ".displayName ||" +(228:69-228:82) " _constructor" --> (136:69-136:82) " _constructor" +(228:82-228:91) ".name) ||" --> (136:82-136:91) ".name) ||" +(228:91-229:4) " 'ReactClass';\n " --> (136:91-137:4) " \"ReactClass\";\n\t\t\t" +(229:4-229:8) " var" --> (137:4-137:8) "\tvar" +(229:8-229:21) " warningKey =" --> (137:8-137:21) " warningKey =" +(229:21-229:37) " componentName +" --> (137:21-137:37) " componentName +" +(229:37-229:43) " \".\" +" --> (137:37-137:43) " \".\" +" +(229:43-231:4) " callerName;\n\n " --> (137:43-138:0) " callerName;" +(231:4-231:8) " if " --> (138:0-138:8) "\n\t\t\t\tif " +(231:8-231:48) "(didWarnStateUpdateForUnmountedComponent" --> (138:8-138:48) "(didWarnStateUpdateForUnmountedComponent" +(231:48-231:61) "[warningKey])" --> (138:48-138:61) "[warningKey])" +(231:61-232:6) " {\n " --> (138:61-139:0) " {" +(232:6-233:5) " return;\n " --> (139:0-140:4) "\n\t\t\t\t\treturn;\n\t\t\t" +(233:5-235:4) "}\n\n " --> (140:4-141:0) "\t}" +(235:4-235:10) " error" --> (141:0-141:10) "\n\t\t\t\terror" +(235:10-235:69) "(\"Can't call %s on a component that is not yet mounted. \" +" --> (141:10-141:69) "(\"Can't call %s on a component that is not yet mounted. \" +" +(235:69-235:140) " 'This is a no-op, but it might indicate a bug in your application. ' +" --> (141:69-141:140) " \"This is a no-op, but it might indicate a bug in your application. \" +" +(235:140-235:212) " 'Instead, assign to `this.state` directly or define a `state = {};` ' +" --> (141:140-141:212) " \"Instead, assign to `this.state` directly or define a `state = {};` \" +" +(235:212-235:274) " 'class property with the desired state in the %s component.'," --> (141:212-141:274) " \"class property with the desired state in the %s component.\"," +(235:274-235:286) " callerName," --> (141:274-141:286) " callerName," +(235:286-235:300) " componentName" --> (141:286-141:300) " componentName" +(235:300-237:4) ");\n\n " --> (141:300-142:0) ");" +(237:4-237:44) " didWarnStateUpdateForUnmountedComponent" --> (142:0-142:44) "\n\t\t\t\tdidWarnStateUpdateForUnmountedComponent" +(237:44-237:58) "[warningKey] =" --> (142:44-142:58) "[warningKey] =" +(237:58-238:3) " true;\n " --> (142:58-143:3) " true;\n\t\t" +(238:3-239:1) "}\n" --> (143:3-144:2) "\t}\n\t" +(239:1-245:0) "}\n/**\n * This is the abstract API for an update queue.\n */\n\n" --> (144:2-145:2) "\t}\n\t" +(245:0-245:4) "\nvar" --> (145:2-145:6) "\tvar" +(245:4-245:27) " ReactNoopUpdateQueue =" --> (145:6-145:29) " ReactNoopUpdateQueue =" +(245:27-253:2) " {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n " --> (145:29-146:3) " {\n\t\t" +(253:2-253:13) " isMounted:" --> (146:3-146:14) "\tisMounted:" +(253:13-253:23) " function " --> (146:14-146:23) " function" +(253:23-253:39) "(publicInstance)" --> (146:23-146:39) "(publicInstance)" +(253:39-254:4) " {\n " --> (146:39-147:0) " {" +(254:4-254:11) " return" --> (147:0-147:11) "\n\t\t\t\treturn" +(254:11-255:3) " false;\n " --> (147:11-148:3) " false;\n\t\t" +(255:3-272:2) "},\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n " --> (148:3-149:3) "\t},\n\t\t" +(272:2-272:22) " enqueueForceUpdate:" --> (149:3-149:23) "\tenqueueForceUpdate:" +(272:22-272:32) " function " --> (149:23-149:32) " function" +(272:32-272:48) "(publicInstance," --> (149:32-149:48) "(publicInstance," +(272:48-272:58) " callback," --> (149:48-149:58) " callback," +(272:58-272:70) " callerName)" --> (149:58-149:70) " callerName)" +(272:70-273:4) " {\n " --> (149:70-150:0) " {" +(273:4-273:13) " warnNoop" --> (150:0-150:13) "\n\t\t\t\twarnNoop" +(273:13-273:29) "(publicInstance," --> (150:13-150:29) "(publicInstance," +(273:29-273:43) " 'forceUpdate'" --> (150:29-150:43) " \"forceUpdate\"" +(273:43-274:3) ");\n " --> (150:43-151:3) ");\n\t\t" +(274:3-289:2) "},\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n " --> (151:3-152:3) "\t},\n\t\t" +(289:2-289:23) " enqueueReplaceState:" --> (152:3-152:24) "\tenqueueReplaceState:" +(289:23-289:33) " function " --> (152:24-152:33) " function" +(289:33-289:49) "(publicInstance," --> (152:33-152:49) "(publicInstance," +(289:49-289:64) " completeState," --> (152:49-152:64) " completeState," +(289:64-289:74) " callback," --> (152:64-152:74) " callback," +(289:74-289:86) " callerName)" --> (152:74-152:86) " callerName)" +(289:86-290:4) " {\n " --> (152:86-153:0) " {" +(290:4-290:13) " warnNoop" --> (153:0-153:13) "\n\t\t\t\twarnNoop" +(290:13-290:29) "(publicInstance," --> (153:13-153:29) "(publicInstance," +(290:29-290:44) " 'replaceState'" --> (153:29-153:44) " \"replaceState\"" +(290:44-291:3) ");\n " --> (153:44-154:3) ");\n\t\t" +(291:3-305:2) "},\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n " --> (154:3-155:3) "\t},\n\t\t" +(305:2-305:19) " enqueueSetState:" --> (155:3-155:20) "\tenqueueSetState:" +(305:19-305:29) " function " --> (155:20-155:29) " function" +(305:29-305:45) "(publicInstance," --> (155:29-155:45) "(publicInstance," +(305:45-305:59) " partialState," --> (155:45-155:59) " partialState," +(305:59-305:69) " callback," --> (155:59-155:69) " callback," +(305:69-305:81) " callerName)" --> (155:69-155:81) " callerName)" +(305:81-306:4) " {\n " --> (155:81-156:0) " {" +(306:4-306:13) " warnNoop" --> (156:0-156:13) "\n\t\t\t\twarnNoop" +(306:13-306:29) "(publicInstance," --> (156:13-156:29) "(publicInstance," +(306:29-306:40) " 'setState'" --> (156:29-156:40) " \"setState\"" +(306:40-307:3) ");\n " --> (156:40-157:3) ");\n\t\t" +(307:3-308:1) "}\n" --> (157:3-158:2) "\t}\n\t" +(308:1-310:0) "};\n" --> (158:2-159:2) "\t};\n\t" +(310:0-310:4) "\nvar" --> (159:2-159:6) "\tvar" +(310:4-310:18) " emptyObject =" --> (159:6-159:20) " emptyObject =" +(310:18-310:20) " {" --> (159:20-159:21) " " +(310:20-312:0) "};\n" --> (159:21-160:2) "{};\n\t" +(312:0-313:2) "\n{\n " --> (160:2-161:0) "\t{" +(313:2-313:9) " Object" --> (161:0-161:10) "\n\t\t\tObject" +(313:9-313:16) ".freeze" --> (161:10-161:17) ".freeze" +(313:16-313:28) "(emptyObject" --> (161:17-161:29) "(emptyObject" +(313:28-314:1) ");\n" --> (161:29-162:2) ");\n\t" +(314:1-320:0) "}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n" --> (162:2-163:2) "\t}\n\t" +(320:0-320:9) "\nfunction" --> (163:2-163:11) "\tfunction" +(320:9-320:19) " Component" --> (163:11-163:21) " Component" +(320:19-320:26) "(props," --> (163:21-163:28) "(props," +(320:26-320:35) " context," --> (163:28-163:37) " context," +(320:35-320:44) " updater)" --> (163:37-163:46) " updater)" +(320:44-321:2) " {\n " --> (163:46-164:0) " {" +(321:2-321:7) " this" --> (164:0-164:8) "\n\t\t\tthis" +(321:7-321:15) ".props =" --> (164:8-164:16) ".props =" +(321:15-322:2) " props;\n " --> (164:16-165:0) " props;" +(322:2-322:7) " this" --> (165:0-165:8) "\n\t\t\tthis" +(322:7-322:17) ".context =" --> (165:8-165:18) ".context =" +(322:17-324:2) " context; // If a component has string refs, we will assign a different object later.\n\n " --> (165:18-166:0) " context;" +(324:2-324:7) " this" --> (166:0-166:8) "\n\t\t\tthis" +(324:7-324:14) ".refs =" --> (166:8-166:15) ".refs =" +(324:14-327:2) " emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n " --> (166:15-167:0) " emptyObject;" +(327:2-327:7) " this" --> (167:0-167:8) "\n\t\t\tthis" +(327:7-327:17) ".updater =" --> (167:8-167:18) ".updater =" +(327:17-327:28) " updater ||" --> (167:18-167:29) " updater ||" +(327:28-328:1) " ReactNoopUpdateQueue;\n" --> (167:29-168:2) " ReactNoopUpdateQueue;\n\t" +(328:1-330:0) "}\n" --> (168:2-169:0) "\t}" +(330:0-330:10) "\nComponent" --> (169:0-169:12) "\n\t\tComponent" +(330:10-330:20) ".prototype" --> (169:12-169:22) ".prototype" +(330:20-330:39) ".isReactComponent =" --> (169:22-169:41) ".isReactComponent =" +(330:39-330:41) " {" --> (169:41-169:42) " " +(330:41-357:0) "};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n" --> (169:42-170:0) "{};" +(357:0-357:10) "\nComponent" --> (170:0-170:12) "\n\t\tComponent" +(357:10-357:20) ".prototype" --> (170:12-170:22) ".prototype" +(357:20-357:31) ".setState =" --> (170:22-170:33) ".setState =" +(357:31-357:41) " function " --> (170:33-170:42) " function" +(357:41-357:55) "(partialState," --> (170:42-170:56) "(partialState," +(357:55-357:65) " callback)" --> (170:56-170:66) " callback)" +(357:65-358:2) " {\n " --> (170:66-171:0) " {" +(358:2-358:15) " if (!(typeof" --> (171:0-171:16) "\n\t\t\tif (!(typeof" +(358:15-358:32) " partialState ===" --> (171:16-171:33) " partialState ===" +(358:32-358:51) " 'object' || typeof" --> (171:33-171:52) " \"object\" || typeof" +(358:51-358:68) " partialState ===" --> (171:52-171:69) " partialState ===" +(358:68-358:82) " 'function' ||" --> (171:69-171:83) " \"function\" ||" +(358:82-358:98) " partialState ==" --> (171:83-171:99) " partialState ==" +(358:98-358:105) " null))" --> (171:99-171:106) " null))" +(358:105-359:4) " {\n " --> (171:106-172:4) " {\n\t\t\t" +(359:4-360:6) " {\n " --> (172:4-173:0) "\t{" +(360:6-360:12) " throw" --> (173:0-173:11) "\n\t\t\t\t\tthrow" +(360:12-360:19) " Error(" --> (173:11-173:17) " Error" +(360:19-360:140) " \"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\" " --> (173:17-173:137) "(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\"" +(360:140-361:5) ");\n " --> (173:137-174:4) ");\n\t\t\t" +(361:5-362:3) "}\n " --> (174:4-175:3) "\t}\n\t\t" +(362:3-364:2) "}\n\n " --> (175:3-176:0) "\t}" +(364:2-364:7) " this" --> (176:0-176:8) "\n\t\t\tthis" +(364:7-364:15) ".updater" --> (176:8-176:16) ".updater" +(364:15-364:31) ".enqueueSetState" --> (176:16-176:32) ".enqueueSetState" +(364:31-364:37) "(this," --> (176:32-176:38) "(this," +(364:37-364:51) " partialState," --> (176:38-176:52) " partialState," +(364:51-364:61) " callback," --> (176:52-176:62) " callback," +(364:61-364:72) " 'setState'" --> (176:62-176:73) " \"setState\"" +(364:72-365:1) ");\n" --> (176:73-177:2) ");\n\t" +(365:1-382:0) "};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n" --> (177:2-178:0) "\t};" +(382:0-382:10) "\nComponent" --> (178:0-178:12) "\n\t\tComponent" +(382:10-382:20) ".prototype" --> (178:12-178:22) ".prototype" +(382:20-382:34) ".forceUpdate =" --> (178:22-178:36) ".forceUpdate =" +(382:34-382:44) " function " --> (178:36-178:45) " function" +(382:44-382:54) "(callback)" --> (178:45-178:55) "(callback)" +(382:54-383:2) " {\n " --> (178:55-179:0) " {" +(383:2-383:7) " this" --> (179:0-179:8) "\n\t\t\tthis" +(383:7-383:15) ".updater" --> (179:8-179:16) ".updater" +(383:15-383:34) ".enqueueForceUpdate" --> (179:16-179:35) ".enqueueForceUpdate" +(383:34-383:40) "(this," --> (179:35-179:41) "(this," +(383:40-383:50) " callback," --> (179:41-179:51) " callback," +(383:50-383:64) " 'forceUpdate'" --> (179:51-179:65) " \"forceUpdate\"" +(383:64-384:1) ");\n" --> (179:65-180:2) ");\n\t" +(384:1-392:0) "};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n" --> (180:2-181:2) "\t};\n\t" +(392:0-393:2) "\n{\n " --> (181:2-182:3) "\t{\n\t\t" +(393:2-393:6) " var" --> (182:3-182:7) "\tvar" +(393:6-393:23) " deprecatedAPIs =" --> (182:7-182:24) " deprecatedAPIs =" +(393:23-394:4) " {\n " --> (182:24-183:4) " {\n\t\t\t" +(394:4-394:15) " isMounted:" --> (183:4-183:15) "\tisMounted:" +(394:15-394:16) " " --> (183:15-183:16) " " +(394:16-394:29) "['isMounted'," --> (183:16-183:29) "[\"isMounted\"," +(394:29-394:103) " 'Instead, make sure to clean up subscriptions and pending requests in ' +" --> (183:29-183:103) " \"Instead, make sure to clean up subscriptions and pending requests in \" +" +(394:103-394:151) " 'componentWillUnmount to prevent memory leaks.'" --> (183:103-183:151) " \"componentWillUnmount to prevent memory leaks.\"" +(394:151-395:4) "],\n " --> (183:151-184:4) "],\n\t\t\t" +(395:4-395:18) " replaceState:" --> (184:4-184:18) "\treplaceState:" +(395:18-395:19) " " --> (184:18-184:19) " " +(395:19-395:35) "['replaceState'," --> (184:19-184:35) "[\"replaceState\"," +(395:35-395:88) " 'Refactor your code to use setState instead (see ' +" --> (184:35-184:88) " \"Refactor your code to use setState instead (see \" +" +(395:88-395:138) " 'https://github.com/facebook/react/issues/3236).'" --> (184:88-184:138) " \"https://github.com/facebook/react/issues/3236).\"" +(395:138-396:3) "]\n " --> (184:138-185:3) "]\n\t\t" +(396:3-398:2) "};\n\n " --> (185:3-186:3) "\t};\n\t\t" +(398:2-398:6) " var" --> (186:3-186:7) "\tvar" +(398:6-398:33) " defineDeprecationWarning =" --> (186:7-186:34) " defineDeprecationWarning =" +(398:33-398:43) " function " --> (186:34-186:43) " function" +(398:43-398:55) "(methodName," --> (186:43-186:55) "(methodName," +(398:55-398:61) " info)" --> (186:55-186:61) " info)" +(398:61-399:4) " {\n " --> (186:61-187:0) " {" +(399:4-399:11) " Object" --> (187:0-187:11) "\n\t\t\t\tObject" +(399:11-399:26) ".defineProperty" --> (187:11-187:26) ".defineProperty" +(399:26-399:36) "(Component" --> (187:26-187:36) "(Component" +(399:36-399:47) ".prototype," --> (187:36-187:47) ".prototype," +(399:47-399:59) " methodName," --> (187:47-187:59) " methodName," +(399:59-400:6) " {\n " --> (187:59-187:61) " {" +(400:6-400:11) " get:" --> (187:61-187:66) " get:" +(400:11-400:23) " function ()" --> (187:66-187:77) " function()" +(400:23-401:8) " {\n " --> (187:77-188:0) " {" +(401:8-401:13) " warn" --> (188:0-188:10) "\n\t\t\t\t\twarn" +(401:13-401:76) "('%s(...) is deprecated in plain JavaScript React classes. %s'," --> (188:10-188:73) "(\"%s(...) is deprecated in plain JavaScript React classes. %s\"," +(401:76-401:81) " info" --> (188:73-188:78) " info" +(401:81-401:85) "[0]," --> (188:78-188:82) "[0]," +(401:85-401:90) " info" --> (188:82-188:87) " info" +(401:90-401:93) "[1]" --> (188:87-188:90) "[1]" +(401:93-403:8) ");\n\n " --> (188:90-189:0) ");" +(403:8-403:15) " return" --> (189:0-189:12) "\n\t\t\t\t\treturn" +(403:15-404:7) " undefined;\n " --> (189:12-190:4) " undefined;\n\t\t\t" +(404:7-405:5) "}\n " --> (190:4-190:6) "\t}" +(405:5-405:6) "}" --> (190:6-190:8) " }" +(405:6-406:3) ");\n " --> (190:8-191:3) ");\n\t\t" +(406:3-408:2) "};\n\n " --> (191:3-192:0) "\t};" +(408:2-408:7) " for " --> (192:0-192:8) "\n\t\t\tfor " +(408:7-408:11) "(var" --> (192:8-192:12) "(var" +(408:11-408:21) " fnName in" --> (192:12-192:22) " fnName in" +(408:21-408:37) " deprecatedAPIs)" --> (192:22-192:38) " deprecatedAPIs)" +(408:37-409:4) " {\n " --> (192:38-193:0) " {" +(409:4-409:8) " if " --> (193:0-193:8) "\n\t\t\t\tif " +(409:8-409:23) "(deprecatedAPIs" --> (193:8-193:23) "(deprecatedAPIs" +(409:23-409:38) ".hasOwnProperty" --> (193:23-193:38) ".hasOwnProperty" +(409:38-409:45) "(fnName" --> (193:38-193:45) "(fnName" +(409:45-409:47) "))" --> (193:45-193:47) "))" +(409:47-410:6) " {\n " --> (193:47-194:0) " {" +(410:6-410:31) " defineDeprecationWarning" --> (194:0-194:30) "\n\t\t\t\t\tdefineDeprecationWarning" +(410:31-410:39) "(fnName," --> (194:30-194:38) "(fnName," +(410:39-410:54) " deprecatedAPIs" --> (194:38-194:53) " deprecatedAPIs" +(410:54-410:62) "[fnName]" --> (194:53-194:61) "[fnName]" +(410:62-411:5) ");\n " --> (194:61-195:4) ");\n\t\t\t" +(411:5-412:3) "}\n " --> (195:4-196:3) "\t}\n\t\t" +(412:3-413:1) "}\n" --> (196:3-197:2) "\t}\n\t" +(413:1-415:0) "}\n" --> (197:2-198:2) "\t}\n\t" +(415:0-415:9) "\nfunction" --> (198:2-198:11) "\tfunction" +(415:9-415:26) " ComponentDummy()" --> (198:11-198:28) " ComponentDummy()" +(415:26-415:28) " {" --> (198:28-198:29) " " +(415:28-417:0) "}\n" --> (198:29-199:0) "{}" +(417:0-417:15) "\nComponentDummy" --> (199:0-199:17) "\n\t\tComponentDummy" +(417:15-417:27) ".prototype =" --> (199:17-199:29) ".prototype =" +(417:27-417:37) " Component" --> (199:29-199:39) " Component" +(417:37-422:0) ".prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n" --> (199:39-200:2) ".prototype;\n\t" +(422:0-422:9) "\nfunction" --> (200:2-200:11) "\tfunction" +(422:9-422:23) " PureComponent" --> (200:11-200:25) " PureComponent" +(422:23-422:30) "(props," --> (200:25-200:32) "(props," +(422:30-422:39) " context," --> (200:32-200:41) " context," +(422:39-422:48) " updater)" --> (200:41-200:50) " updater)" +(422:48-423:2) " {\n " --> (200:50-201:0) " {" +(423:2-423:7) " this" --> (201:0-201:8) "\n\t\t\tthis" +(423:7-423:15) ".props =" --> (201:8-201:16) ".props =" +(423:15-424:2) " props;\n " --> (201:16-202:0) " props;" +(424:2-424:7) " this" --> (202:0-202:8) "\n\t\t\tthis" +(424:7-424:17) ".context =" --> (202:8-202:18) ".context =" +(424:17-426:2) " context; // If a component has string refs, we will assign a different object later.\n\n " --> (202:18-203:0) " context;" +(426:2-426:7) " this" --> (203:0-203:8) "\n\t\t\tthis" +(426:7-426:14) ".refs =" --> (203:8-203:15) ".refs =" +(426:14-427:2) " emptyObject;\n " --> (203:15-204:0) " emptyObject;" +(427:2-427:7) " this" --> (204:0-204:8) "\n\t\t\tthis" +(427:7-427:17) ".updater =" --> (204:8-204:18) ".updater =" +(427:17-427:28) " updater ||" --> (204:18-204:29) " updater ||" +(427:28-428:1) " ReactNoopUpdateQueue;\n" --> (204:29-205:2) " ReactNoopUpdateQueue;\n\t" +(428:1-430:0) "}\n" --> (205:2-206:2) "\t}\n\t" +(430:0-430:4) "\nvar" --> (206:2-206:6) "\tvar" +(430:4-430:29) " pureComponentPrototype =" --> (206:6-206:31) " pureComponentPrototype =" +(430:29-430:43) " PureComponent" --> (206:31-206:45) " PureComponent" +(430:43-430:55) ".prototype =" --> (206:45-206:57) ".prototype =" +(430:55-430:59) " new" --> (206:57-206:61) " new" +(430:59-431:0) " ComponentDummy();" --> (206:61-207:0) " ComponentDummy();" +(431:0-431:23) "\npureComponentPrototype" --> (207:0-207:25) "\n\t\tpureComponentPrototype" +(431:23-431:37) ".constructor =" --> (207:25-207:39) ".constructor =" +(431:37-433:0) " PureComponent; // Avoid an extra prototype jump for these methods.\n" --> (207:39-208:0) " PureComponent;" +(433:0-433:8) "\n_assign" --> (208:0-208:10) "\n\t\t_assign" +(433:8-433:32) "(pureComponentPrototype," --> (208:10-208:34) "(pureComponentPrototype," +(433:32-433:42) " Component" --> (208:34-208:44) " Component" +(433:42-433:52) ".prototype" --> (208:44-208:54) ".prototype" +(433:52-435:0) ");\n" --> (208:54-209:0) ");" +(435:0-435:23) "\npureComponentPrototype" --> (209:0-209:25) "\n\t\tpureComponentPrototype" +(435:23-435:46) ".isPureReactComponent =" --> (209:25-209:48) ".isPureReactComponent =" +(435:46-438:0) " true;\n\n// an immutable object with a single mutable value" --> (209:48-210:2) " true;\n\t" +(438:0-438:9) "\nfunction" --> (210:2-210:11) "\tfunction" +(438:9-438:21) " createRef()" --> (210:11-210:23) " createRef()" +(438:21-439:2) " {\n " --> (210:23-211:3) " {\n\t\t" +(439:2-439:6) " var" --> (211:3-211:7) "\tvar" +(439:6-439:18) " refObject =" --> (211:7-211:19) " refObject =" +(439:18-440:4) " {\n " --> (211:19-211:21) " {" +(440:4-440:13) " current:" --> (211:21-211:30) " current:" +(440:13-441:3) " null\n " --> (211:30-211:35) " null" +(441:3-443:2) "};\n\n " --> (211:35-212:3) " };\n\t\t" +(443:2-444:4) " {\n " --> (212:3-213:0) "\t{" +(444:4-444:11) " Object" --> (213:0-213:11) "\n\t\t\t\tObject" +(444:11-444:16) ".seal" --> (213:11-213:16) ".seal" +(444:16-444:26) "(refObject" --> (213:16-213:26) "(refObject" +(444:26-445:3) ");\n " --> (213:26-214:3) ");\n\t\t" +(445:3-447:2) "}\n\n " --> (214:3-215:0) "\t}" +(447:2-447:9) " return" --> (215:0-215:10) "\n\t\t\treturn" +(447:9-448:1) " refObject;\n" --> (215:10-216:2) " refObject;\n\t" +(448:1-450:0) "}\n" --> (216:2-217:2) "\t}\n\t" +(450:0-450:9) "\nfunction" --> (217:2-217:11) "\tfunction" +(450:9-450:24) " getWrappedName" --> (217:11-217:26) " getWrappedName" +(450:24-450:35) "(outerType," --> (217:26-217:37) "(outerType," +(450:35-450:46) " innerType," --> (217:37-217:48) " innerType," +(450:46-450:59) " wrapperName)" --> (217:48-217:61) " wrapperName)" +(450:59-451:2) " {\n " --> (217:61-218:3) " {\n\t\t" +(451:2-451:6) " var" --> (218:3-218:7) "\tvar" +(451:6-451:21) " functionName =" --> (218:7-218:22) " functionName =" +(451:21-451:31) " innerType" --> (218:22-218:32) " innerType" +(451:31-451:46) ".displayName ||" --> (218:32-218:47) ".displayName ||" +(451:46-451:56) " innerType" --> (218:47-218:57) " innerType" +(451:56-451:64) ".name ||" --> (218:57-218:65) ".name ||" +(451:64-452:2) " '';\n " --> (218:65-219:0) " \"\";" +(452:2-452:9) " return" --> (219:0-219:10) "\n\t\t\treturn" +(452:9-452:19) " outerType" --> (219:10-219:20) " outerType" +(452:19-452:35) ".displayName || " --> (219:20-219:36) ".displayName || " +(452:35-452:52) "(functionName !==" --> (219:36-219:53) "(functionName !==" +(452:52-452:57) " '' ?" --> (219:53-219:58) " \"\" ?" +(452:57-452:71) " wrapperName +" --> (219:58-219:72) " wrapperName +" +(452:71-452:77) " \"(\" +" --> (219:72-219:78) " \"(\" +" +(452:77-452:92) " functionName +" --> (219:78-219:93) " functionName +" +(452:92-452:98) " \")\" :" --> (219:93-219:99) " \")\" :" +(452:98-453:1) " wrapperName);\n" --> (219:99-220:2) " wrapperName);\n\t" +(453:1-455:0) "}\n" --> (220:2-221:2) "\t}\n\t" +(455:0-455:9) "\nfunction" --> (221:2-221:11) "\tfunction" +(455:9-455:24) " getContextName" --> (221:11-221:26) " getContextName" +(455:24-455:30) "(type)" --> (221:26-221:32) "(type)" +(455:30-456:2) " {\n " --> (221:32-222:0) " {" +(456:2-456:9) " return" --> (222:0-222:10) "\n\t\t\treturn" +(456:9-456:14) " type" --> (222:10-222:15) " type" +(456:14-456:29) ".displayName ||" --> (222:15-222:30) ".displayName ||" +(456:29-457:1) " 'Context';\n" --> (222:30-223:2) " \"Context\";\n\t" +(457:1-459:0) "}\n" --> (223:2-224:2) "\t}\n\t" +(459:0-459:9) "\nfunction" --> (224:2-224:11) "\tfunction" +(459:9-459:26) " getComponentName" --> (224:11-224:28) " getComponentName" +(459:26-459:32) "(type)" --> (224:28-224:34) "(type)" +(459:32-460:2) " {\n " --> (224:34-225:0) " {" +(460:2-460:6) " if " --> (225:0-225:7) "\n\t\t\tif " +(460:6-460:14) "(type ==" --> (225:7-225:15) "(type ==" +(460:14-460:20) " null)" --> (225:15-225:21) " null)" +(460:20-462:4) " {\n // Host root, text node or just invalid type.\n " --> (225:21-226:0) " {" +(462:4-462:11) " return" --> (226:0-226:11) "\n\t\t\t\treturn" +(462:11-463:3) " null;\n " --> (226:11-227:3) " null;\n\t\t" +(463:3-465:2) "}\n\n " --> (227:3-228:3) "\t}\n\t\t" +(465:2-466:4) " {\n " --> (228:3-229:0) "\t{" +(466:4-466:15) " if (typeof" --> (229:0-229:15) "\n\t\t\t\tif (typeof" +(466:15-466:20) " type" --> (229:15-229:20) " type" +(466:20-466:28) ".tag ===" --> (229:20-229:28) ".tag ===" +(466:28-466:38) " 'number')" --> (229:28-229:38) " \"number\")" +(466:38-467:6) " {\n " --> (229:38-230:0) " {" +(467:6-467:12) " error" --> (230:0-230:11) "\n\t\t\t\t\terror" +(467:12-467:70) "('Received an unexpected object in getComponentName(). ' +" --> (230:11-230:69) "(\"Received an unexpected object in getComponentName(). \" +" +(467:70-467:125) " 'This is likely a bug in React. Please file an issue.'" --> (230:69-230:124) " \"This is likely a bug in React. Please file an issue.\"" +(467:125-468:5) ");\n " --> (230:124-231:4) ");\n\t\t\t" +(468:5-469:3) "}\n " --> (231:4-232:3) "\t}\n\t\t" +(469:3-471:2) "}\n\n " --> (232:3-233:0) "\t}" +(471:2-471:13) " if (typeof" --> (233:0-233:14) "\n\t\t\tif (typeof" +(471:13-471:22) " type ===" --> (233:14-233:23) " type ===" +(471:22-471:34) " 'function')" --> (233:23-233:35) " \"function\")" +(471:34-472:4) " {\n " --> (233:35-234:0) " {" +(472:4-472:11) " return" --> (234:0-234:11) "\n\t\t\t\treturn" +(472:11-472:16) " type" --> (234:11-234:16) " type" +(472:16-472:31) ".displayName ||" --> (234:16-234:31) ".displayName ||" +(472:31-472:36) " type" --> (234:31-234:36) " type" +(472:36-472:44) ".name ||" --> (234:36-234:44) ".name ||" +(472:44-473:3) " null;\n " --> (234:44-235:3) " null;\n\t\t" +(473:3-475:2) "}\n\n " --> (235:3-236:0) "\t}" +(475:2-475:13) " if (typeof" --> (236:0-236:14) "\n\t\t\tif (typeof" +(475:13-475:22) " type ===" --> (236:14-236:23) " type ===" +(475:22-475:32) " 'string')" --> (236:23-236:33) " \"string\")" +(475:32-476:4) " {\n " --> (236:33-237:0) " {" +(476:4-476:11) " return" --> (237:0-237:11) "\n\t\t\t\treturn" +(476:11-477:3) " type;\n " --> (237:11-238:3) " type;\n\t\t" +(477:3-479:2) "}\n\n " --> (238:3-239:0) "\t}" +(479:2-479:10) " switch " --> (239:0-239:11) "\n\t\t\tswitch " +(479:10-479:2) " switch " --> (239:11-239:17) "(type)" +(479:2-480:4) " switch (type) {\n " --> (239:17-240:0) " {" +(480:4-480:9) " case" --> (240:0-240:9) "\n\t\t\t\tcase" +(480:9-480:17) " exports" --> (240:9-240:17) " exports" +(480:17-481:6) ".Fragment:\n " --> (240:17-240:26) ".Fragment" +(481:6-481:13) " return" --> (240:26-240:34) ": return" +(481:13-483:4) " 'Fragment';\n\n " --> (240:34-241:0) " \"Fragment\";" +(483:4-483:9) " case" --> (241:0-241:9) "\n\t\t\t\tcase" +(483:9-484:6) " REACT_PORTAL_TYPE:\n " --> (241:9-241:27) " REACT_PORTAL_TYPE" +(484:6-484:13) " return" --> (241:27-241:35) ": return" +(484:13-486:4) " 'Portal';\n\n " --> (241:35-242:0) " \"Portal\";" +(486:4-486:9) " case" --> (242:0-242:9) "\n\t\t\t\tcase" +(486:9-486:17) " exports" --> (242:9-242:17) " exports" +(486:17-487:6) ".Profiler:\n " --> (242:17-242:26) ".Profiler" +(487:6-487:13) " return" --> (242:26-242:34) ": return" +(487:13-489:4) " 'Profiler';\n\n " --> (242:34-243:0) " \"Profiler\";" +(489:4-489:9) " case" --> (243:0-243:9) "\n\t\t\t\tcase" +(489:9-489:17) " exports" --> (243:9-243:17) " exports" +(489:17-490:6) ".StrictMode:\n " --> (243:17-243:28) ".StrictMode" +(490:6-490:13) " return" --> (243:28-243:36) ": return" +(490:13-492:4) " 'StrictMode';\n\n " --> (243:36-244:0) " \"StrictMode\";" +(492:4-492:9) " case" --> (244:0-244:9) "\n\t\t\t\tcase" +(492:9-492:17) " exports" --> (244:9-244:17) " exports" +(492:17-493:6) ".Suspense:\n " --> (244:17-244:26) ".Suspense" +(493:6-493:13) " return" --> (244:26-244:34) ": return" +(493:13-495:4) " 'Suspense';\n\n " --> (244:34-245:0) " \"Suspense\";" +(495:4-495:9) " case" --> (245:0-245:9) "\n\t\t\t\tcase" +(495:9-496:6) " REACT_SUSPENSE_LIST_TYPE:\n " --> (245:9-245:34) " REACT_SUSPENSE_LIST_TYPE" +(496:6-496:13) " return" --> (245:34-245:42) ": return" +(496:13-497:3) " 'SuspenseList';\n " --> (245:42-246:3) " \"SuspenseList\";\n\t\t" +(497:3-499:2) "}\n\n " --> (246:3-247:0) "\t}" +(499:2-499:13) " if (typeof" --> (247:0-247:14) "\n\t\t\tif (typeof" +(499:13-499:22) " type ===" --> (247:14-247:23) " type ===" +(499:22-499:32) " 'object')" --> (247:23-247:33) " \"object\")" +(499:32-500:4) " {\n " --> (247:33-248:0) " {" +(500:4-500:12) " switch " --> (248:0-248:12) "\n\t\t\t\tswitch " +(500:12-500:17) "(type" --> (248:12-248:17) "(type" +(500:17-500:4) " switch (type" --> (248:17-248:27) ".$$typeof)" +(500:4-501:6) " switch (type.$$typeof) {\n " --> (248:27-249:0) " {" +(501:6-501:11) " case" --> (249:0-249:10) "\n\t\t\t\t\tcase" +(501:11-502:8) " REACT_CONTEXT_TYPE:\n " --> (249:10-250:6) " REACT_CONTEXT_TYPE:\n\t\t\t\t\t" +(502:8-502:12) " var" --> (250:6-250:10) "\tvar" +(502:12-502:22) " context =" --> (250:10-250:20) " context =" +(502:22-503:8) " type;\n " --> (250:20-251:0) " type;" +(503:8-503:15) " return" --> (251:0-251:13) "\n\t\t\t\t\t\treturn" +(503:15-503:30) " getContextName" --> (251:13-251:28) " getContextName" +(503:30-503:38) "(context" --> (251:28-251:36) "(context" +(503:38-503:41) ") +" --> (251:36-251:39) ") +" +(503:41-505:6) " '.Consumer';\n\n " --> (251:39-252:0) " \".Consumer\";" +(505:6-505:11) " case" --> (252:0-252:10) "\n\t\t\t\t\tcase" +(505:11-506:8) " REACT_PROVIDER_TYPE:\n " --> (252:10-253:6) " REACT_PROVIDER_TYPE:\n\t\t\t\t\t" +(506:8-506:12) " var" --> (253:6-253:10) "\tvar" +(506:12-506:23) " provider =" --> (253:10-253:21) " provider =" +(506:23-507:8) " type;\n " --> (253:21-254:0) " type;" +(507:8-507:15) " return" --> (254:0-254:13) "\n\t\t\t\t\t\treturn" +(507:15-507:30) " getContextName" --> (254:13-254:28) " getContextName" +(507:30-507:39) "(provider" --> (254:28-254:37) "(provider" +(507:39-507:48) "._context" --> (254:37-254:46) "._context" +(507:48-507:51) ") +" --> (254:46-254:49) ") +" +(507:51-509:6) " '.Provider';\n\n " --> (254:49-255:0) " \".Provider\";" +(509:6-509:11) " case" --> (255:0-255:10) "\n\t\t\t\t\tcase" +(509:11-510:8) " REACT_FORWARD_REF_TYPE:\n " --> (255:10-255:33) " REACT_FORWARD_REF_TYPE" +(510:8-510:15) " return" --> (255:33-255:41) ": return" +(510:15-510:30) " getWrappedName" --> (255:41-255:56) " getWrappedName" +(510:30-510:36) "(type," --> (255:56-255:62) "(type," +(510:36-510:41) " type" --> (255:62-255:67) " type" +(510:41-510:49) ".render," --> (255:67-255:75) ".render," +(510:49-510:62) " 'ForwardRef'" --> (255:75-255:88) " \"ForwardRef\"" +(510:62-512:6) ");\n\n " --> (255:88-256:0) ");" +(512:6-512:11) " case" --> (256:0-256:10) "\n\t\t\t\t\tcase" +(512:11-513:8) " REACT_MEMO_TYPE:\n " --> (256:10-256:26) " REACT_MEMO_TYPE" +(513:8-513:15) " return" --> (256:26-256:34) ": return" +(513:15-513:32) " getComponentName" --> (256:34-256:51) " getComponentName" +(513:32-513:37) "(type" --> (256:51-256:56) "(type" +(513:37-513:42) ".type" --> (256:56-256:61) ".type" +(513:42-515:6) ");\n\n " --> (256:61-257:0) ");" +(515:6-515:11) " case" --> (257:0-257:10) "\n\t\t\t\t\tcase" +(515:11-516:8) " REACT_BLOCK_TYPE:\n " --> (257:10-257:27) " REACT_BLOCK_TYPE" +(516:8-516:15) " return" --> (257:27-257:35) ": return" +(516:15-516:32) " getComponentName" --> (257:35-257:52) " getComponentName" +(516:32-516:37) "(type" --> (257:52-257:57) "(type" +(516:37-516:45) "._render" --> (257:57-257:65) "._render" +(516:45-518:6) ");\n\n " --> (257:65-258:0) ");" +(518:6-518:11) " case" --> (258:0-258:10) "\n\t\t\t\t\tcase" +(518:11-519:8) " REACT_LAZY_TYPE:\n " --> (258:10-258:27) " REACT_LAZY_TYPE:" +(519:8-520:10) " {\n " --> (258:27-259:6) " {\n\t\t\t\t\t" +(520:10-520:14) " var" --> (259:6-259:10) "\tvar" +(520:14-520:30) " lazyComponent =" --> (259:10-259:26) " lazyComponent =" +(520:30-521:10) " type;\n " --> (259:26-260:6) " type;\n\t\t\t\t\t" +(521:10-521:14) " var" --> (260:6-260:10) "\tvar" +(521:14-521:24) " payload =" --> (260:10-260:20) " payload =" +(521:24-521:38) " lazyComponent" --> (260:20-260:34) " lazyComponent" +(521:38-522:10) "._payload;\n " --> (260:34-261:6) "._payload;\n\t\t\t\t\t" +(522:10-522:14) " var" --> (261:6-261:10) "\tvar" +(522:14-522:21) " init =" --> (261:10-261:17) " init =" +(522:21-522:35) " lazyComponent" --> (261:17-261:31) " lazyComponent" +(522:35-524:10) "._init;\n\n " --> (261:31-262:0) "._init;" +(524:10-524:14) " try" --> (262:0-262:10) "\n\t\t\t\t\t\ttry" +(524:14-525:12) " {\n " --> (262:10-263:0) " {" +(525:12-525:19) " return" --> (263:0-263:14) "\n\t\t\t\t\t\t\treturn" +(525:19-525:36) " getComponentName" --> (263:14-263:31) " getComponentName" +(525:36-525:41) "(init" --> (263:31-263:36) "(init" +(525:41-525:49) "(payload" --> (263:36-263:44) "(payload" +(525:49-525:50) ")" --> (263:44-263:45) ")" +(525:50-526:11) ");\n " --> (263:45-264:6) ");\n\t\t\t\t\t" +(526:11-526:19) "} catch " --> (264:6-264:15) "\t} catch " +(526:19-526:22) "(x)" --> (264:15-264:18) "(x)" +(526:22-527:12) " {\n " --> (264:18-265:0) " {" +(527:12-527:19) " return" --> (265:0-265:14) "\n\t\t\t\t\t\t\treturn" +(527:19-528:11) " null;\n " --> (265:14-266:6) " null;\n\t\t\t\t\t" +(528:11-529:9) "}\n " --> (266:6-267:5) "\t}\n\t\t\t\t" +(529:9-530:5) "}\n " --> (267:5-268:4) "\t}\n\t\t\t" +(530:5-531:3) "}\n " --> (268:4-269:3) "\t}\n\t\t" +(531:3-533:2) "}\n\n " --> (269:3-270:0) "\t}" +(533:2-533:9) " return" --> (270:0-270:10) "\n\t\t\treturn" +(533:9-534:1) " null;\n" --> (270:10-271:2) " null;\n\t" +(534:1-536:0) "}\n" --> (271:2-272:2) "\t}\n\t" +(536:0-536:4) "\nvar" --> (272:2-272:6) "\tvar" +(536:4-536:21) " hasOwnProperty =" --> (272:6-272:23) " hasOwnProperty =" +(536:21-536:28) " Object" --> (272:23-272:30) " Object" +(536:28-536:38) ".prototype" --> (272:30-272:40) ".prototype" +(536:38-537:0) ".hasOwnProperty;" --> (272:40-273:2) ".hasOwnProperty;\n\t" +(537:0-537:4) "\nvar" --> (273:2-273:6) "\tvar" +(537:4-537:21) " RESERVED_PROPS =" --> (273:6-273:23) " RESERVED_PROPS =" +(537:21-538:2) " {\n " --> (273:23-274:3) " {\n\t\t" +(538:2-538:7) " key:" --> (274:3-274:8) "\tkey:" +(538:7-539:2) " true,\n " --> (274:8-275:3) " true,\n\t\t" +(539:2-539:7) " ref:" --> (275:3-275:8) "\tref:" +(539:7-540:2) " true,\n " --> (275:8-276:3) " true,\n\t\t" +(540:2-540:10) " __self:" --> (276:3-276:11) "\t__self:" +(540:10-541:2) " true,\n " --> (276:11-277:3) " true,\n\t\t" +(541:2-541:12) " __source:" --> (277:3-277:13) "\t__source:" +(541:12-542:1) " true\n" --> (277:13-278:2) " true\n\t" +(542:1-543:0) "};" --> (278:2-279:2) "\t};\n\t" +(543:0-543:4) "\nvar" --> (279:2-279:6) "\tvar" +(543:4-543:32) " specialPropKeyWarningShown," --> (279:6-279:34) " specialPropKeyWarningShown," +(543:32-543:60) " specialPropRefWarningShown," --> (279:34-279:62) " specialPropRefWarningShown," +(543:60-545:0) " didWarnAboutStringRefs;\n" --> (279:62-280:2) " didWarnAboutStringRefs;\n\t" +(545:0-546:2) "\n{\n " --> (280:2-281:0) "\t{" +(546:2-546:27) " didWarnAboutStringRefs =" --> (281:0-281:28) "\n\t\t\tdidWarnAboutStringRefs =" +(546:27-546:29) " {" --> (281:28-281:29) " " +(546:29-547:1) "};\n" --> (281:29-282:2) "{};\n\t" +(547:1-549:0) "}\n" --> (282:2-283:2) "\t}\n\t" +(549:0-549:9) "\nfunction" --> (283:2-283:11) "\tfunction" +(549:9-549:21) " hasValidRef" --> (283:11-283:23) " hasValidRef" +(549:21-549:29) "(config)" --> (283:23-283:31) "(config)" +(549:29-550:2) " {\n " --> (283:31-284:3) " {\n\t\t" +(550:2-551:4) " {\n " --> (284:3-285:0) "\t{" +(551:4-551:8) " if " --> (285:0-285:8) "\n\t\t\t\tif " +(551:8-551:23) "(hasOwnProperty" --> (285:8-285:23) "(hasOwnProperty" +(551:23-551:28) ".call" --> (285:23-285:28) ".call" +(551:28-551:36) "(config," --> (285:28-285:36) "(config," +(551:36-551:42) " 'ref'" --> (285:36-285:42) " \"ref\"" +(551:42-551:44) "))" --> (285:42-285:44) "))" +(551:44-552:6) " {\n " --> (285:44-286:5) " {\n\t\t\t\t" +(552:6-552:10) " var" --> (286:5-286:9) "\tvar" +(552:10-552:19) " getter =" --> (286:9-286:18) " getter =" +(552:19-552:26) " Object" --> (286:18-286:25) " Object" +(552:26-552:51) ".getOwnPropertyDescriptor" --> (286:25-286:50) ".getOwnPropertyDescriptor" +(552:51-552:59) "(config," --> (286:50-286:58) "(config," +(552:59-552:65) " 'ref'" --> (286:58-286:64) " \"ref\"" +(552:65-552:66) ")" --> (286:64-286:65) ")" +(552:66-554:6) ".get;\n\n " --> (286:65-287:0) ".get;" +(554:6-554:10) " if " --> (287:0-287:9) "\n\t\t\t\t\tif " +(554:10-554:20) "(getter &&" --> (287:9-287:19) "(getter &&" +(554:20-554:27) " getter" --> (287:19-287:26) " getter" +(554:27-554:43) ".isReactWarning)" --> (287:26-287:42) ".isReactWarning)" +(554:43-555:8) " {\n " --> (287:42-288:0) " {" +(555:8-555:15) " return" --> (288:0-288:13) "\n\t\t\t\t\t\treturn" +(555:15-556:7) " false;\n " --> (288:13-289:5) " false;\n\t\t\t\t" +(556:7-557:5) "}\n " --> (289:5-290:4) "\t}\n\t\t\t" +(557:5-558:3) "}\n " --> (290:4-291:3) "\t}\n\t\t" +(558:3-560:2) "}\n\n " --> (291:3-292:0) "\t}" +(560:2-560:9) " return" --> (292:0-292:10) "\n\t\t\treturn" +(560:9-560:16) " config" --> (292:10-292:17) " config" +(560:16-560:24) ".ref !==" --> (292:17-292:25) ".ref !==" +(560:24-561:1) " undefined;\n" --> (292:25-293:2) " undefined;\n\t" +(561:1-563:0) "}\n" --> (293:2-294:2) "\t}\n\t" +(563:0-563:9) "\nfunction" --> (294:2-294:11) "\tfunction" +(563:9-563:21) " hasValidKey" --> (294:11-294:23) " hasValidKey" +(563:21-563:29) "(config)" --> (294:23-294:31) "(config)" +(563:29-564:2) " {\n " --> (294:31-295:3) " {\n\t\t" +(564:2-565:4) " {\n " --> (295:3-296:0) "\t{" +(565:4-565:8) " if " --> (296:0-296:8) "\n\t\t\t\tif " +(565:8-565:23) "(hasOwnProperty" --> (296:8-296:23) "(hasOwnProperty" +(565:23-565:28) ".call" --> (296:23-296:28) ".call" +(565:28-565:36) "(config," --> (296:28-296:36) "(config," +(565:36-565:42) " 'key'" --> (296:36-296:42) " \"key\"" +(565:42-565:44) "))" --> (296:42-296:44) "))" +(565:44-566:6) " {\n " --> (296:44-297:5) " {\n\t\t\t\t" +(566:6-566:10) " var" --> (297:5-297:9) "\tvar" +(566:10-566:19) " getter =" --> (297:9-297:18) " getter =" +(566:19-566:26) " Object" --> (297:18-297:25) " Object" +(566:26-566:51) ".getOwnPropertyDescriptor" --> (297:25-297:50) ".getOwnPropertyDescriptor" +(566:51-566:59) "(config," --> (297:50-297:58) "(config," +(566:59-566:65) " 'key'" --> (297:58-297:64) " \"key\"" +(566:65-566:66) ")" --> (297:64-297:65) ")" +(566:66-568:6) ".get;\n\n " --> (297:65-298:0) ".get;" +(568:6-568:10) " if " --> (298:0-298:9) "\n\t\t\t\t\tif " +(568:10-568:20) "(getter &&" --> (298:9-298:19) "(getter &&" +(568:20-568:27) " getter" --> (298:19-298:26) " getter" +(568:27-568:43) ".isReactWarning)" --> (298:26-298:42) ".isReactWarning)" +(568:43-569:8) " {\n " --> (298:42-299:0) " {" +(569:8-569:15) " return" --> (299:0-299:13) "\n\t\t\t\t\t\treturn" +(569:15-570:7) " false;\n " --> (299:13-300:5) " false;\n\t\t\t\t" +(570:7-571:5) "}\n " --> (300:5-301:4) "\t}\n\t\t\t" +(571:5-572:3) "}\n " --> (301:4-302:3) "\t}\n\t\t" +(572:3-574:2) "}\n\n " --> (302:3-303:0) "\t}" +(574:2-574:9) " return" --> (303:0-303:10) "\n\t\t\treturn" +(574:9-574:16) " config" --> (303:10-303:17) " config" +(574:16-574:24) ".key !==" --> (303:17-303:25) ".key !==" +(574:24-575:1) " undefined;\n" --> (303:25-304:2) " undefined;\n\t" +(575:1-577:0) "}\n" --> (304:2-305:2) "\t}\n\t" +(577:0-577:9) "\nfunction" --> (305:2-305:11) "\tfunction" +(577:9-577:36) " defineKeyPropWarningGetter" --> (305:11-305:38) " defineKeyPropWarningGetter" +(577:36-577:43) "(props," --> (305:38-305:45) "(props," +(577:43-577:56) " displayName)" --> (305:45-305:58) " displayName)" +(577:56-578:2) " {\n " --> (305:58-306:3) " {\n\t\t" +(578:2-578:6) " var" --> (306:3-306:7) "\tvar" +(578:6-578:30) " warnAboutAccessingKey =" --> (306:7-306:31) " warnAboutAccessingKey =" +(578:30-578:42) " function ()" --> (306:31-306:42) " function()" +(578:42-579:4) " {\n " --> (306:42-307:4) " {\n\t\t\t" +(579:4-580:6) " {\n " --> (307:4-308:0) "\t{" +(580:6-580:11) " if (" --> (308:0-308:10) "\n\t\t\t\t\tif (" +(580:11-580:39) "!specialPropKeyWarningShown)" --> (308:10-308:38) "!specialPropKeyWarningShown)" +(580:39-581:8) " {\n " --> (308:38-309:0) " {" +(581:8-581:37) " specialPropKeyWarningShown =" --> (309:0-309:35) "\n\t\t\t\t\t\tspecialPropKeyWarningShown =" +(581:37-583:8) " true;\n\n " --> (309:35-310:0) " true;" +(583:8-583:14) " error" --> (310:0-310:12) "\n\t\t\t\t\t\terror" +(583:14-583:76) "('%s: `key` is not a prop. Trying to access it will result ' +" --> (310:12-310:74) "(\"%s: `key` is not a prop. Trying to access it will result \" +" +(583:76-583:143) " 'in `undefined` being returned. If you need to access the same ' +" --> (310:74-310:141) " \"in `undefined` being returned. If you need to access the same \" +" +(583:143-583:216) " 'value within the child component, you should pass it as a different ' +" --> (310:141-310:214) " \"value within the child component, you should pass it as a different \" +" +(583:216-583:266) " 'prop. (https://reactjs.org/link/special-props)'," --> (310:214-310:264) " \"prop. (https://reactjs.org/link/special-props)\"," +(583:266-583:278) " displayName" --> (310:264-310:276) " displayName" +(583:278-584:7) ");\n " --> (310:276-311:5) ");\n\t\t\t\t" +(584:7-585:5) "}\n " --> (311:5-312:4) "\t}\n\t\t\t" +(585:5-586:3) "}\n " --> (312:4-313:3) "\t}\n\t\t" +(586:3-588:2) "};\n\n " --> (313:3-314:0) "\t};" +(588:2-588:24) " warnAboutAccessingKey" --> (314:0-314:25) "\n\t\t\twarnAboutAccessingKey" +(588:24-588:41) ".isReactWarning =" --> (314:25-314:42) ".isReactWarning =" +(588:41-589:2) " true;\n " --> (314:42-315:0) " true;" +(589:2-589:9) " Object" --> (315:0-315:10) "\n\t\t\tObject" +(589:9-589:24) ".defineProperty" --> (315:10-315:25) ".defineProperty" +(589:24-589:31) "(props," --> (315:25-315:32) "(props," +(589:31-589:38) " 'key'," --> (315:32-315:39) " \"key\"," +(589:38-590:4) " {\n " --> (315:39-316:4) " {\n\t\t\t" +(590:4-590:9) " get:" --> (316:4-316:9) "\tget:" +(590:9-591:4) " warnAboutAccessingKey,\n " --> (316:9-317:4) " warnAboutAccessingKey,\n\t\t\t" +(591:4-591:18) " configurable:" --> (317:4-317:18) "\tconfigurable:" +(591:18-592:3) " true\n " --> (317:18-318:3) " true\n\t\t" +(592:3-592:4) "}" --> (318:3-318:5) "\t}" +(592:4-593:1) ");\n" --> (318:5-319:2) ");\n\t" +(593:1-595:0) "}\n" --> (319:2-320:2) "\t}\n\t" +(595:0-595:9) "\nfunction" --> (320:2-320:11) "\tfunction" +(595:9-595:36) " defineRefPropWarningGetter" --> (320:11-320:38) " defineRefPropWarningGetter" +(595:36-595:43) "(props," --> (320:38-320:45) "(props," +(595:43-595:56) " displayName)" --> (320:45-320:58) " displayName)" +(595:56-596:2) " {\n " --> (320:58-321:3) " {\n\t\t" +(596:2-596:6) " var" --> (321:3-321:7) "\tvar" +(596:6-596:30) " warnAboutAccessingRef =" --> (321:7-321:31) " warnAboutAccessingRef =" +(596:30-596:42) " function ()" --> (321:31-321:42) " function()" +(596:42-597:4) " {\n " --> (321:42-322:4) " {\n\t\t\t" +(597:4-598:6) " {\n " --> (322:4-323:0) "\t{" +(598:6-598:11) " if (" --> (323:0-323:10) "\n\t\t\t\t\tif (" +(598:11-598:39) "!specialPropRefWarningShown)" --> (323:10-323:38) "!specialPropRefWarningShown)" +(598:39-599:8) " {\n " --> (323:38-324:0) " {" +(599:8-599:37) " specialPropRefWarningShown =" --> (324:0-324:35) "\n\t\t\t\t\t\tspecialPropRefWarningShown =" +(599:37-601:8) " true;\n\n " --> (324:35-325:0) " true;" +(601:8-601:14) " error" --> (325:0-325:12) "\n\t\t\t\t\t\terror" +(601:14-601:76) "('%s: `ref` is not a prop. Trying to access it will result ' +" --> (325:12-325:74) "(\"%s: `ref` is not a prop. Trying to access it will result \" +" +(601:76-601:143) " 'in `undefined` being returned. If you need to access the same ' +" --> (325:74-325:141) " \"in `undefined` being returned. If you need to access the same \" +" +(601:143-601:216) " 'value within the child component, you should pass it as a different ' +" --> (325:141-325:214) " \"value within the child component, you should pass it as a different \" +" +(601:216-601:266) " 'prop. (https://reactjs.org/link/special-props)'," --> (325:214-325:264) " \"prop. (https://reactjs.org/link/special-props)\"," +(601:266-601:278) " displayName" --> (325:264-325:276) " displayName" +(601:278-602:7) ");\n " --> (325:276-326:5) ");\n\t\t\t\t" +(602:7-603:5) "}\n " --> (326:5-327:4) "\t}\n\t\t\t" +(603:5-604:3) "}\n " --> (327:4-328:3) "\t}\n\t\t" +(604:3-606:2) "};\n\n " --> (328:3-329:0) "\t};" +(606:2-606:24) " warnAboutAccessingRef" --> (329:0-329:25) "\n\t\t\twarnAboutAccessingRef" +(606:24-606:41) ".isReactWarning =" --> (329:25-329:42) ".isReactWarning =" +(606:41-607:2) " true;\n " --> (329:42-330:0) " true;" +(607:2-607:9) " Object" --> (330:0-330:10) "\n\t\t\tObject" +(607:9-607:24) ".defineProperty" --> (330:10-330:25) ".defineProperty" +(607:24-607:31) "(props," --> (330:25-330:32) "(props," +(607:31-607:38) " 'ref'," --> (330:32-330:39) " \"ref\"," +(607:38-608:4) " {\n " --> (330:39-331:4) " {\n\t\t\t" +(608:4-608:9) " get:" --> (331:4-331:9) "\tget:" +(608:9-609:4) " warnAboutAccessingRef,\n " --> (331:9-332:4) " warnAboutAccessingRef,\n\t\t\t" +(609:4-609:18) " configurable:" --> (332:4-332:18) "\tconfigurable:" +(609:18-610:3) " true\n " --> (332:18-333:3) " true\n\t\t" +(610:3-610:4) "}" --> (333:3-333:5) "\t}" +(610:4-611:1) ");\n" --> (333:5-334:2) ");\n\t" +(611:1-613:0) "}\n" --> (334:2-335:2) "\t}\n\t" +(613:0-613:9) "\nfunction" --> (335:2-335:11) "\tfunction" +(613:9-613:46) " warnIfStringRefCannotBeAutoConverted" --> (335:11-335:48) " warnIfStringRefCannotBeAutoConverted" +(613:46-613:54) "(config)" --> (335:48-335:56) "(config)" +(613:54-614:2) " {\n " --> (335:56-336:3) " {\n\t\t" +(614:2-615:4) " {\n " --> (336:3-337:0) "\t{" +(615:4-615:15) " if (typeof" --> (337:0-337:15) "\n\t\t\t\tif (typeof" +(615:15-615:22) " config" --> (337:15-337:22) " config" +(615:22-615:30) ".ref ===" --> (337:22-337:30) ".ref ===" +(615:30-615:42) " 'string' &&" --> (337:30-337:42) " \"string\" &&" +(615:42-615:60) " ReactCurrentOwner" --> (337:42-337:60) " ReactCurrentOwner" +(615:60-615:71) ".current &&" --> (337:60-337:71) ".current &&" +(615:71-615:78) " config" --> (337:71-337:78) " config" +(615:78-615:88) ".__self &&" --> (337:78-337:88) ".__self &&" +(615:88-615:106) " ReactCurrentOwner" --> (337:88-337:106) " ReactCurrentOwner" +(615:106-615:114) ".current" --> (337:106-337:114) ".current" +(615:114-615:128) ".stateNode !==" --> (337:114-337:128) ".stateNode !==" +(615:128-615:135) " config" --> (337:128-337:135) " config" +(615:135-615:143) ".__self)" --> (337:135-337:143) ".__self)" +(615:143-616:6) " {\n " --> (337:143-338:5) " {\n\t\t\t\t" +(616:6-616:10) " var" --> (338:5-338:9) "\tvar" +(616:10-616:26) " componentName =" --> (338:9-338:25) " componentName =" +(616:26-616:43) " getComponentName" --> (338:25-338:42) " getComponentName" +(616:43-616:61) "(ReactCurrentOwner" --> (338:42-338:60) "(ReactCurrentOwner" +(616:61-616:69) ".current" --> (338:60-338:68) ".current" +(616:69-616:74) ".type" --> (338:68-338:73) ".type" +(616:74-618:6) ");\n\n " --> (338:73-339:0) ");" +(618:6-618:11) " if (" --> (339:0-339:10) "\n\t\t\t\t\tif (" +(618:11-618:34) "!didWarnAboutStringRefs" --> (339:10-339:33) "!didWarnAboutStringRefs" +(618:34-618:50) "[componentName])" --> (339:33-339:49) "[componentName])" +(618:50-619:8) " {\n " --> (339:49-340:0) " {" +(619:8-619:14) " error" --> (340:0-340:12) "\n\t\t\t\t\t\terror" +(619:14-619:64) "('Component \"%s\" contains the string ref \"%s\". ' +" --> (340:12-340:66) "(\"Component \\\"%s\\\" contains the string ref \\\"%s\\\". \" +" +(619:64-619:136) " 'Support for string refs will be removed in a future major release. ' +" --> (340:66-340:138) " \"Support for string refs will be removed in a future major release. \" +" +(619:136-619:207) " 'This case cannot be automatically converted to an arrow function. ' +" --> (340:138-340:209) " \"This case cannot be automatically converted to an arrow function. \" +" +(619:207-619:291) " 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +" --> (340:209-340:293) " \"We ask you to manually fix this case by using useRef() or createRef() instead. \" +" +(619:291-619:337) " 'Learn more about using refs safely here: ' +" --> (340:293-340:339) " \"Learn more about using refs safely here: \" +" +(619:337-619:388) " 'https://reactjs.org/link/strict-mode-string-ref'," --> (340:339-340:390) " \"https://reactjs.org/link/strict-mode-string-ref\"," +(619:388-619:403) " componentName," --> (340:390-340:405) " componentName," +(619:403-619:410) " config" --> (340:405-340:412) " config" +(619:410-619:414) ".ref" --> (340:412-340:416) ".ref" +(619:414-621:8) ");\n\n " --> (340:416-341:0) ");" +(621:8-621:31) " didWarnAboutStringRefs" --> (341:0-341:29) "\n\t\t\t\t\t\tdidWarnAboutStringRefs" +(621:31-621:48) "[componentName] =" --> (341:29-341:46) "[componentName] =" +(621:48-622:7) " true;\n " --> (341:46-342:5) " true;\n\t\t\t\t" +(622:7-623:5) "}\n " --> (342:5-343:4) "\t}\n\t\t\t" +(623:5-624:3) "}\n " --> (343:4-344:3) "\t}\n\t\t" +(624:3-625:1) "}\n" --> (344:3-345:2) "\t}\n\t" +(625:1-648:0) "}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n" --> (345:2-346:2) "\t}\n\t" +(648:0-648:4) "\nvar" --> (346:2-346:6) "\tvar" +(648:4-648:19) " ReactElement =" --> (346:6-346:21) " ReactElement =" +(648:19-648:29) " function " --> (346:21-346:30) " function" +(648:29-648:35) "(type," --> (346:30-346:36) "(type," +(648:35-648:40) " key," --> (346:36-346:41) " key," +(648:40-648:45) " ref," --> (346:41-346:46) " ref," +(648:45-648:51) " self," --> (346:46-346:52) " self," +(648:51-648:59) " source," --> (346:52-346:60) " source," +(648:59-648:66) " owner," --> (346:60-346:67) " owner," +(648:66-648:73) " props)" --> (346:67-346:74) " props)" +(648:73-649:2) " {\n " --> (346:74-347:3) " {\n\t\t" +(649:2-649:6) " var" --> (347:3-347:7) "\tvar" +(649:6-649:16) " element =" --> (347:7-347:17) " element =" +(649:16-651:4) " {\n // This tag allows us to uniquely identify this as a React Element\n " --> (347:17-348:4) " {\n\t\t\t" +(651:4-651:14) " $$typeof:" --> (348:4-348:14) "\t$$typeof:" +(651:14-653:10) " REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type:" --> (348:14-349:4) " REACT_ELEMENT_TYPE,\n\t\t\t" +(653:10-654:9) " type,\n key:" --> (349:4-350:4) "\ttype,\n\t\t\t" +(654:9-655:9) " key,\n ref:" --> (350:4-351:4) "\tkey,\n\t\t\t" +(655:9-656:11) " ref,\n props:" --> (351:4-352:4) "\tref,\n\t\t\t" +(656:11-658:4) " props,\n // Record the component responsible for creating this element.\n " --> (352:4-353:4) "\tprops,\n\t\t\t" +(658:4-658:12) " _owner:" --> (353:4-353:12) "\t_owner:" +(658:12-659:3) " owner\n " --> (353:12-354:3) " owner\n\t\t" +(659:3-661:2) "};\n\n " --> (354:3-355:3) "\t};\n\t\t" +(661:2-666:4) " {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n " --> (355:3-356:0) "\t{" +(666:4-666:12) " element" --> (356:0-356:12) "\n\t\t\t\telement" +(666:12-666:21) "._store =" --> (356:12-356:21) "._store =" +(666:21-666:23) " {" --> (356:21-356:22) " " +(666:23-671:4) "}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n " --> (356:22-357:0) "{};" +(671:4-671:11) " Object" --> (357:0-357:11) "\n\t\t\t\tObject" +(671:11-671:26) ".defineProperty" --> (357:11-357:26) ".defineProperty" +(671:26-671:34) "(element" --> (357:26-357:34) "(element" +(671:34-671:42) "._store," --> (357:34-357:42) "._store," +(671:42-671:55) " 'validated'," --> (357:42-357:55) " \"validated\"," +(671:55-672:6) " {\n " --> (357:55-358:5) " {\n\t\t\t\t" +(672:6-672:20) " configurable:" --> (358:5-358:19) "\tconfigurable:" +(672:20-673:6) " false,\n " --> (358:19-359:5) " false,\n\t\t\t\t" +(673:6-673:18) " enumerable:" --> (359:5-359:17) "\tenumerable:" +(673:18-674:6) " false,\n " --> (359:17-360:5) " false,\n\t\t\t\t" +(674:6-674:16) " writable:" --> (360:5-360:15) "\twritable:" +(674:16-675:6) " true,\n " --> (360:15-361:5) " true,\n\t\t\t\t" +(675:6-675:13) " value:" --> (361:5-361:12) "\tvalue:" +(675:13-676:5) " false\n " --> (361:12-362:4) " false\n\t\t\t" +(676:5-676:6) "}" --> (362:4-362:6) "\t}" +(676:6-678:4) "); // self and source are DEV only properties.\n\n " --> (362:6-363:0) ");" +(678:4-678:11) " Object" --> (363:0-363:11) "\n\t\t\t\tObject" +(678:11-678:26) ".defineProperty" --> (363:11-363:26) ".defineProperty" +(678:26-678:35) "(element," --> (363:26-363:35) "(element," +(678:35-678:44) " '_self'," --> (363:35-363:44) " \"_self\"," +(678:44-679:6) " {\n " --> (363:44-364:5) " {\n\t\t\t\t" +(679:6-679:20) " configurable:" --> (364:5-364:19) "\tconfigurable:" +(679:20-680:6) " false,\n " --> (364:19-365:5) " false,\n\t\t\t\t" +(680:6-680:18) " enumerable:" --> (365:5-365:17) "\tenumerable:" +(680:18-681:6) " false,\n " --> (365:17-366:5) " false,\n\t\t\t\t" +(681:6-681:16) " writable:" --> (366:5-366:15) "\twritable:" +(681:16-682:6) " false,\n " --> (366:15-367:5) " false,\n\t\t\t\t" +(682:6-682:13) " value:" --> (367:5-367:12) "\tvalue:" +(682:13-683:5) " self\n " --> (367:12-368:4) " self\n\t\t\t" +(683:5-683:6) "}" --> (368:4-368:6) "\t}" +(683:6-686:4) "); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n " --> (368:6-369:0) ");" +(686:4-686:11) " Object" --> (369:0-369:11) "\n\t\t\t\tObject" +(686:11-686:26) ".defineProperty" --> (369:11-369:26) ".defineProperty" +(686:26-686:35) "(element," --> (369:26-369:35) "(element," +(686:35-686:46) " '_source'," --> (369:35-369:46) " \"_source\"," +(686:46-687:6) " {\n " --> (369:46-370:5) " {\n\t\t\t\t" +(687:6-687:20) " configurable:" --> (370:5-370:19) "\tconfigurable:" +(687:20-688:6) " false,\n " --> (370:19-371:5) " false,\n\t\t\t\t" +(688:6-688:18) " enumerable:" --> (371:5-371:17) "\tenumerable:" +(688:18-689:6) " false,\n " --> (371:17-372:5) " false,\n\t\t\t\t" +(689:6-689:16) " writable:" --> (372:5-372:15) "\twritable:" +(689:16-690:6) " false,\n " --> (372:15-373:5) " false,\n\t\t\t\t" +(690:6-690:13) " value:" --> (373:5-373:12) "\tvalue:" +(690:13-691:5) " source\n " --> (373:12-374:4) " source\n\t\t\t" +(691:5-691:6) "}" --> (374:4-374:6) "\t}" +(691:6-693:4) ");\n\n " --> (374:6-375:0) ");" +(693:4-693:8) " if " --> (375:0-375:8) "\n\t\t\t\tif " +(693:8-693:15) "(Object" --> (375:8-375:15) "(Object" +(693:15-693:23) ".freeze)" --> (375:15-375:23) ".freeze)" +(693:23-694:6) " {\n " --> (375:23-376:0) " {" +(694:6-694:13) " Object" --> (376:0-376:12) "\n\t\t\t\t\tObject" +(694:13-694:20) ".freeze" --> (376:12-376:19) ".freeze" +(694:20-694:28) "(element" --> (376:19-376:27) "(element" +(694:28-694:34) ".props" --> (376:27-376:33) ".props" +(694:34-695:6) ");\n " --> (376:33-377:0) ");" +(695:6-695:13) " Object" --> (377:0-377:12) "\n\t\t\t\t\tObject" +(695:13-695:20) ".freeze" --> (377:12-377:19) ".freeze" +(695:20-695:28) "(element" --> (377:19-377:27) "(element" +(695:28-696:5) ");\n " --> (377:27-378:4) ");\n\t\t\t" +(696:5-697:3) "}\n " --> (378:4-379:3) "\t}\n\t\t" +(697:3-699:2) "}\n\n " --> (379:3-380:0) "\t}" +(699:2-699:9) " return" --> (380:0-380:10) "\n\t\t\treturn" +(699:9-700:1) " element;\n" --> (380:10-381:2) " element;\n\t" +(700:1-706:0) "};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n" --> (381:2-382:2) "\t};\n\t" +(706:0-706:9) "\nfunction" --> (382:2-382:11) "\tfunction" +(706:9-706:23) " createElement" --> (382:11-382:25) " createElement" +(706:23-706:29) "(type," --> (382:25-382:31) "(type," +(706:29-706:37) " config," --> (382:31-382:39) " config," +(706:37-706:47) " children)" --> (382:39-382:49) " children)" +(706:47-707:2) " {\n " --> (382:49-383:3) " {\n\t\t" +(707:2-707:6) " var" --> (383:3-383:7) "\tvar" +(707:6-709:2) " propName; // Reserved names are extracted\n\n " --> (383:7-384:3) " propName;\n\t\t" +(709:2-709:6) " var" --> (384:3-384:7) "\tvar" +(709:6-709:14) " props =" --> (384:7-384:15) " props =" +(709:14-709:16) " {" --> (384:15-384:16) " " +(709:16-710:2) "};\n " --> (384:16-385:3) "{};\n\t\t" +(710:2-710:6) " var" --> (385:3-385:7) "\tvar" +(710:6-710:12) " key =" --> (385:7-385:13) " key =" +(710:12-711:2) " null;\n " --> (385:13-386:3) " null;\n\t\t" +(711:2-711:6) " var" --> (386:3-386:7) "\tvar" +(711:6-711:12) " ref =" --> (386:7-386:13) " ref =" +(711:12-712:2) " null;\n " --> (386:13-387:3) " null;\n\t\t" +(712:2-712:6) " var" --> (387:3-387:7) "\tvar" +(712:6-712:13) " self =" --> (387:7-387:14) " self =" +(712:13-713:2) " null;\n " --> (387:14-388:3) " null;\n\t\t" +(713:2-713:6) " var" --> (388:3-388:7) "\tvar" +(713:6-713:15) " source =" --> (388:7-388:16) " source =" +(713:15-715:2) " null;\n\n " --> (388:16-389:0) " null;" +(715:2-715:6) " if " --> (389:0-389:7) "\n\t\t\tif " +(715:6-715:16) "(config !=" --> (389:7-389:17) "(config !=" +(715:16-715:22) " null)" --> (389:17-389:23) " null)" +(715:22-716:4) " {\n " --> (389:23-390:0) " {" +(716:4-716:8) " if " --> (390:0-390:8) "\n\t\t\t\tif " +(716:8-716:20) "(hasValidRef" --> (390:8-390:20) "(hasValidRef" +(716:20-716:27) "(config" --> (390:20-390:27) "(config" +(716:27-716:29) "))" --> (390:27-390:29) "))" +(716:29-717:6) " {\n " --> (390:29-391:0) " {" +(717:6-717:12) " ref =" --> (391:0-391:11) "\n\t\t\t\t\tref =" +(717:12-717:19) " config" --> (391:11-391:18) " config" +(717:19-719:6) ".ref;\n\n " --> (391:18-392:5) ".ref;\n\t\t\t\t" +(719:6-720:8) " {\n " --> (392:5-393:0) "\t{" +(720:8-720:45) " warnIfStringRefCannotBeAutoConverted" --> (393:0-393:43) "\n\t\t\t\t\t\twarnIfStringRefCannotBeAutoConverted" +(720:45-720:52) "(config" --> (393:43-393:50) "(config" +(720:52-721:7) ");\n " --> (393:50-394:5) ");\n\t\t\t\t" +(721:7-722:5) "}\n " --> (394:5-395:4) "\t}\n\t\t\t" +(722:5-724:4) "}\n\n " --> (395:4-396:0) "\t}" +(724:4-724:8) " if " --> (396:0-396:8) "\n\t\t\t\tif " +(724:8-724:20) "(hasValidKey" --> (396:8-396:20) "(hasValidKey" +(724:20-724:27) "(config" --> (396:20-396:27) "(config" +(724:27-724:29) "))" --> (396:27-396:29) "))" +(724:29-725:6) " {\n " --> (396:29-397:0) " {" +(725:6-725:12) " key =" --> (397:0-397:11) "\n\t\t\t\t\tkey =" +(725:12-725:17) " '' +" --> (397:11-397:16) " \"\" +" +(725:17-725:24) " config" --> (397:16-397:23) " config" +(725:24-726:5) ".key;\n " --> (397:23-398:4) ".key;\n\t\t\t" +(726:5-728:4) "}\n\n " --> (398:4-399:0) "\t}" +(728:4-728:11) " self =" --> (399:0-399:11) "\n\t\t\t\tself =" +(728:11-728:18) " config" --> (399:11-399:18) " config" +(728:18-728:29) ".__self ===" --> (399:18-399:29) ".__self ===" +(728:29-728:41) " undefined ?" --> (399:29-399:41) " undefined ?" +(728:41-728:48) " null :" --> (399:41-399:48) " null :" +(728:48-728:55) " config" --> (399:48-399:55) " config" +(728:55-729:4) ".__self;\n " --> (399:55-400:0) ".__self;" +(729:4-729:13) " source =" --> (400:0-400:13) "\n\t\t\t\tsource =" +(729:13-729:20) " config" --> (400:13-400:20) " config" +(729:20-729:33) ".__source ===" --> (400:20-400:33) ".__source ===" +(729:33-729:45) " undefined ?" --> (400:33-400:45) " undefined ?" +(729:45-729:52) " null :" --> (400:45-400:52) " null :" +(729:52-729:59) " config" --> (400:52-400:59) " config" +(729:59-731:4) ".__source; // Remaining properties are added to a new props object\n\n " --> (400:59-401:0) ".__source;" +(731:4-731:9) " for " --> (401:0-401:9) "\n\t\t\t\tfor " +(731:9-731:21) "(propName in" --> (401:9-401:21) "(propName in" +(731:21-731:29) " config)" --> (401:21-401:29) " config)" +(731:29-732:6) " {\n " --> (401:29-402:0) " {" +(732:6-732:10) " if " --> (402:0-402:9) "\n\t\t\t\t\tif " +(732:10-732:25) "(hasOwnProperty" --> (402:9-402:24) "(hasOwnProperty" +(732:25-732:30) ".call" --> (402:24-402:29) ".call" +(732:30-732:38) "(config," --> (402:29-402:37) "(config," +(732:38-732:47) " propName" --> (402:37-402:46) " propName" +(732:47-732:52) ") && " --> (402:46-402:51) ") && " +(732:52-732:67) "!RESERVED_PROPS" --> (402:51-402:66) "!RESERVED_PROPS" +(732:67-732:82) ".hasOwnProperty" --> (402:66-402:81) ".hasOwnProperty" +(732:82-732:91) "(propName" --> (402:81-402:90) "(propName" +(732:91-732:93) "))" --> (402:90-402:92) "))" +(732:93-733:8) " {\n " --> (402:92-403:0) " {" +(733:8-733:14) " props" --> (403:0-403:12) "\n\t\t\t\t\t\tprops" +(733:14-733:26) "[propName] =" --> (403:12-403:24) "[propName] =" +(733:26-733:33) " config" --> (403:24-403:31) " config" +(733:33-734:7) "[propName];\n " --> (403:31-404:5) "[propName];\n\t\t\t\t" +(734:7-735:5) "}\n " --> (404:5-405:4) "\t}\n\t\t\t" +(735:5-736:3) "}\n " --> (405:4-406:3) "\t}\n\t\t" +(736:3-740:2) "} // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n " --> (406:3-407:3) "\t}\n\t\t" +(740:2-740:6) " var" --> (407:3-407:7) "\tvar" +(740:6-740:23) " childrenLength =" --> (407:7-407:24) " childrenLength =" +(740:23-740:33) " arguments" --> (407:24-407:34) " arguments" +(740:33-740:42) ".length -" --> (407:34-407:43) ".length -" +(740:42-742:2) " 2;\n\n " --> (407:43-408:0) " 2;" +(742:2-742:6) " if " --> (408:0-408:7) "\n\t\t\tif " +(742:6-742:25) "(childrenLength ===" --> (408:7-408:26) "(childrenLength ===" +(742:25-742:28) " 1)" --> (408:26-408:29) " 1)" +(742:28-743:4) " {\n " --> (408:29-409:0) " {" +(743:4-743:10) " props" --> (409:0-409:10) "\n\t\t\t\tprops" +(743:10-743:21) ".children =" --> (409:10-409:21) ".children =" +(743:21-744:3) " children;\n " --> (409:21-410:3) " children;\n\t\t" +(744:3-744:13) "} else if " --> (410:3-410:14) "\t} else if " +(744:13-744:30) "(childrenLength >" --> (410:14-410:31) "(childrenLength >" +(744:30-744:33) " 1)" --> (410:31-410:34) " 1)" +(744:33-745:4) " {\n " --> (410:34-411:4) " {\n\t\t\t" +(745:4-745:8) " var" --> (411:4-411:8) "\tvar" +(745:8-745:21) " childArray =" --> (411:8-411:21) " childArray =" +(745:21-745:27) " Array" --> (411:21-411:27) " Array" +(745:27-745:42) "(childrenLength" --> (411:27-411:42) "(childrenLength" +(745:42-747:4) ");\n\n " --> (411:42-412:0) ");" +(747:4-747:9) " for " --> (412:0-412:9) "\n\t\t\t\tfor " +(747:9-747:13) "(var" --> (412:9-412:13) "(var" +(747:13-747:17) " i =" --> (412:13-412:17) " i =" +(747:17-747:20) " 0;" --> (412:17-412:20) " 0;" +(747:20-747:24) " i <" --> (412:20-412:24) " i <" +(747:24-747:40) " childrenLength;" --> (412:24-412:40) " childrenLength;" +(747:40-747:45) " i++)" --> (412:40-412:45) " i++)" +(747:45-748:6) " {\n " --> (412:45-413:0) " {" +(748:6-748:17) " childArray" --> (413:0-413:16) "\n\t\t\t\t\tchildArray" +(748:17-748:22) "[i] =" --> (413:16-413:21) "[i] =" +(748:22-748:32) " arguments" --> (413:21-413:31) " arguments" +(748:32-748:36) "[i +" --> (413:31-413:35) "[i +" +(748:36-749:5) " 2];\n " --> (413:35-414:4) " 2];\n\t\t\t" +(749:5-751:4) "}\n\n " --> (414:4-415:4) "\t}\n\t\t\t" +(751:4-752:6) " {\n " --> (415:4-416:0) "\t{" +(752:6-752:10) " if " --> (416:0-416:9) "\n\t\t\t\t\tif " +(752:10-752:17) "(Object" --> (416:9-416:16) "(Object" +(752:17-752:25) ".freeze)" --> (416:16-416:24) ".freeze)" +(752:25-753:8) " {\n " --> (416:24-417:0) " {" +(753:8-753:15) " Object" --> (417:0-417:13) "\n\t\t\t\t\t\tObject" +(753:15-753:22) ".freeze" --> (417:13-417:20) ".freeze" +(753:22-753:33) "(childArray" --> (417:20-417:31) "(childArray" +(753:33-754:7) ");\n " --> (417:31-418:5) ");\n\t\t\t\t" +(754:7-755:5) "}\n " --> (418:5-419:4) "\t}\n\t\t\t" +(755:5-757:4) "}\n\n " --> (419:4-420:0) "\t}" +(757:4-757:10) " props" --> (420:0-420:10) "\n\t\t\t\tprops" +(757:10-757:21) ".children =" --> (420:10-420:21) ".children =" +(757:21-758:3) " childArray;\n " --> (420:21-421:3) " childArray;\n\t\t" +(758:3-761:2) "} // Resolve default props\n\n\n " --> (421:3-422:0) "\t}" +(761:2-761:6) " if " --> (422:0-422:7) "\n\t\t\tif " +(761:6-761:14) "(type &&" --> (422:7-422:15) "(type &&" +(761:14-761:19) " type" --> (422:15-422:20) " type" +(761:19-761:33) ".defaultProps)" --> (422:20-422:34) ".defaultProps)" +(761:33-762:4) " {\n " --> (422:34-423:4) " {\n\t\t\t" +(762:4-762:8) " var" --> (423:4-423:8) "\tvar" +(762:8-762:23) " defaultProps =" --> (423:8-423:23) " defaultProps =" +(762:23-762:28) " type" --> (423:23-423:28) " type" +(762:28-764:4) ".defaultProps;\n\n " --> (423:28-424:0) ".defaultProps;" +(764:4-764:9) " for " --> (424:0-424:9) "\n\t\t\t\tfor " +(764:9-764:21) "(propName in" --> (424:9-424:21) "(propName in" +(764:21-764:35) " defaultProps)" --> (424:21-424:35) " defaultProps)" +(764:35-765:6) " {\n " --> (424:35-425:0) " {" +(765:6-765:10) " if " --> (425:0-425:9) "\n\t\t\t\t\tif " +(765:10-765:16) "(props" --> (425:9-425:15) "(props" +(765:16-765:30) "[propName] ===" --> (425:15-425:29) "[propName] ===" +(765:30-765:41) " undefined)" --> (425:29-425:40) " undefined)" +(765:41-766:8) " {\n " --> (425:40-426:0) " {" +(766:8-766:14) " props" --> (426:0-426:12) "\n\t\t\t\t\t\tprops" +(766:14-766:26) "[propName] =" --> (426:12-426:24) "[propName] =" +(766:26-766:39) " defaultProps" --> (426:24-426:37) " defaultProps" +(766:39-767:7) "[propName];\n " --> (426:37-427:5) "[propName];\n\t\t\t\t" +(767:7-768:5) "}\n " --> (427:5-428:4) "\t}\n\t\t\t" +(768:5-769:3) "}\n " --> (428:4-429:3) "\t}\n\t\t" +(769:3-771:2) "}\n\n " --> (429:3-430:3) "\t}\n\t\t" +(771:2-772:4) " {\n " --> (430:3-431:0) "\t{" +(772:4-772:8) " if " --> (431:0-431:8) "\n\t\t\t\tif " +(772:8-772:15) "(key ||" --> (431:8-431:15) "(key ||" +(772:15-772:20) " ref)" --> (431:15-431:20) " ref)" +(772:20-773:6) " {\n " --> (431:20-432:5) " {\n\t\t\t\t" +(773:6-773:10) " var" --> (432:5-432:9) "\tvar" +(773:10-773:31) " displayName = typeof" --> (432:9-432:30) " displayName = typeof" +(773:31-773:40) " type ===" --> (432:30-432:39) " type ===" +(773:40-773:53) " 'function' ?" --> (432:39-432:52) " \"function\" ?" +(773:53-773:58) " type" --> (432:52-432:57) " type" +(773:58-773:73) ".displayName ||" --> (432:57-432:72) ".displayName ||" +(773:73-773:78) " type" --> (432:72-432:77) " type" +(773:78-773:86) ".name ||" --> (432:77-432:85) ".name ||" +(773:86-773:98) " 'Unknown' :" --> (432:85-432:97) " \"Unknown\" :" +(773:98-775:6) " type;\n\n " --> (432:97-433:0) " type;" +(775:6-775:10) " if " --> (433:0-433:9) "\n\t\t\t\t\tif " +(775:10-775:15) "(key)" --> (433:9-433:14) "(key)" +(775:15-776:8) " {\n " --> (433:14-434:0) " {" +(776:8-776:35) " defineKeyPropWarningGetter" --> (434:0-434:33) "\n\t\t\t\t\t\tdefineKeyPropWarningGetter" +(776:35-776:42) "(props," --> (434:33-434:40) "(props," +(776:42-776:54) " displayName" --> (434:40-434:52) " displayName" +(776:54-777:7) ");\n " --> (434:52-435:5) ");\n\t\t\t\t" +(777:7-779:6) "}\n\n " --> (435:5-436:0) "\t}" +(779:6-779:10) " if " --> (436:0-436:9) "\n\t\t\t\t\tif " +(779:10-779:15) "(ref)" --> (436:9-436:14) "(ref)" +(779:15-780:8) " {\n " --> (436:14-437:0) " {" +(780:8-780:35) " defineRefPropWarningGetter" --> (437:0-437:33) "\n\t\t\t\t\t\tdefineRefPropWarningGetter" +(780:35-780:42) "(props," --> (437:33-437:40) "(props," +(780:42-780:54) " displayName" --> (437:40-437:52) " displayName" +(780:54-781:7) ");\n " --> (437:52-438:5) ");\n\t\t\t\t" +(781:7-782:5) "}\n " --> (438:5-439:4) "\t}\n\t\t\t" +(782:5-783:3) "}\n " --> (439:4-440:3) "\t}\n\t\t" +(783:3-785:2) "}\n\n " --> (440:3-441:0) "\t}" +(785:2-785:9) " return" --> (441:0-441:10) "\n\t\t\treturn" +(785:9-785:22) " ReactElement" --> (441:10-441:23) " ReactElement" +(785:22-785:28) "(type," --> (441:23-441:29) "(type," +(785:28-785:33) " key," --> (441:29-441:34) " key," +(785:33-785:38) " ref," --> (441:34-441:39) " ref," +(785:38-785:44) " self," --> (441:39-441:45) " self," +(785:44-785:52) " source," --> (441:45-441:53) " source," +(785:52-785:70) " ReactCurrentOwner" --> (441:53-441:71) " ReactCurrentOwner" +(785:70-785:79) ".current," --> (441:71-441:80) ".current," +(785:79-785:85) " props" --> (441:80-441:86) " props" +(785:85-786:1) ");\n" --> (441:86-442:2) ");\n\t" +(786:1-787:0) "}" --> (442:2-443:2) "\t}\n\t" +(787:0-787:9) "\nfunction" --> (443:2-443:11) "\tfunction" +(787:9-787:28) " cloneAndReplaceKey" --> (443:11-443:30) " cloneAndReplaceKey" +(787:28-787:40) "(oldElement," --> (443:30-443:42) "(oldElement," +(787:40-787:48) " newKey)" --> (443:42-443:50) " newKey)" +(787:48-788:2) " {\n " --> (443:50-444:3) " {\n\t\t" +(788:2-788:6) " var" --> (444:3-444:7) "\tvar" +(788:6-788:19) " newElement =" --> (444:7-444:20) " newElement =" +(788:19-788:32) " ReactElement" --> (444:20-444:33) " ReactElement" +(788:32-788:43) "(oldElement" --> (444:33-444:44) "(oldElement" +(788:43-788:49) ".type," --> (444:44-444:50) ".type," +(788:49-788:57) " newKey," --> (444:50-444:58) " newKey," +(788:57-788:68) " oldElement" --> (444:58-444:69) " oldElement" +(788:68-788:73) ".ref," --> (444:69-444:74) ".ref," +(788:73-788:84) " oldElement" --> (444:74-444:85) " oldElement" +(788:84-788:91) "._self," --> (444:85-444:92) "._self," +(788:91-788:102) " oldElement" --> (444:92-444:103) " oldElement" +(788:102-788:111) "._source," --> (444:103-444:112) "._source," +(788:111-788:122) " oldElement" --> (444:112-444:123) " oldElement" +(788:122-788:130) "._owner," --> (444:123-444:131) "._owner," +(788:130-788:141) " oldElement" --> (444:131-444:142) " oldElement" +(788:141-788:147) ".props" --> (444:142-444:148) ".props" +(788:147-789:2) ");\n " --> (444:148-445:0) ");" +(789:2-789:9) " return" --> (445:0-445:10) "\n\t\t\treturn" +(789:9-790:1) " newElement;\n" --> (445:10-446:2) " newElement;\n\t" +(790:1-796:0) "}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n" --> (446:2-447:2) "\t}\n\t" +(796:0-796:9) "\nfunction" --> (447:2-447:11) "\tfunction" +(796:9-796:22) " cloneElement" --> (447:11-447:24) " cloneElement" +(796:22-796:31) "(element," --> (447:24-447:33) "(element," +(796:31-796:39) " config," --> (447:33-447:41) " config," +(796:39-796:49) " children)" --> (447:41-447:51) " children)" +(796:49-797:2) " {\n " --> (447:51-448:0) " {" +(797:2-797:9) " if (!!" --> (448:0-448:10) "\n\t\t\tif (!!" +(797:9-797:21) "(element ===" --> (448:10-448:22) "(element ===" +(797:21-797:29) " null ||" --> (448:22-448:30) " null ||" +(797:29-797:41) " element ===" --> (448:30-448:42) " element ===" +(797:41-797:53) " undefined))" --> (448:42-448:54) " undefined))" +(797:53-798:4) " {\n " --> (448:54-449:4) " {\n\t\t\t" +(798:4-799:6) " {\n " --> (449:4-450:0) "\t{" +(799:6-799:12) " throw" --> (450:0-450:11) "\n\t\t\t\t\tthrow" +(799:12-799:19) " Error(" --> (450:11-450:17) " Error" +(799:19-799:102) " \"React.cloneElement(...): The argument must be a React element, but you passed \" +" --> (450:17-450:100) "(\"React.cloneElement(...): The argument must be a React element, but you passed \" +" +(799:102-799:112) " element +" --> (450:100-450:110) " element +" +(799:112-799:117) " \".\" " --> (450:110-450:114) " \".\"" +(799:117-800:5) ");\n " --> (450:114-451:4) ");\n\t\t\t" +(800:5-801:3) "}\n " --> (451:4-452:3) "\t}\n\t\t" +(801:3-803:2) "}\n\n " --> (452:3-453:3) "\t}\n\t\t" +(803:2-803:6) " var" --> (453:3-453:7) "\tvar" +(803:6-805:2) " propName; // Original props are copied\n\n " --> (453:7-454:3) " propName;\n\t\t" +(805:2-805:6) " var" --> (454:3-454:7) "\tvar" +(805:6-805:14) " props =" --> (454:7-454:15) " props =" +(805:14-805:22) " _assign" --> (454:15-454:23) " _assign" +(805:22-805:24) "({" --> (454:23-454:24) "(" +(805:24-805:26) "}," --> (454:24-454:27) "{}," +(805:26-805:34) " element" --> (454:27-454:35) " element" +(805:34-805:40) ".props" --> (454:35-454:41) ".props" +(805:40-808:2) "); // Reserved names are extracted\n\n\n " --> (454:41-455:3) ");\n\t\t" +(808:2-808:6) " var" --> (455:3-455:7) "\tvar" +(808:6-808:12) " key =" --> (455:7-455:13) " key =" +(808:12-808:20) " element" --> (455:13-455:21) " element" +(808:20-809:2) ".key;\n " --> (455:21-456:3) ".key;\n\t\t" +(809:2-809:6) " var" --> (456:3-456:7) "\tvar" +(809:6-809:12) " ref =" --> (456:7-456:13) " ref =" +(809:12-809:20) " element" --> (456:13-456:21) " element" +(809:20-811:2) ".ref; // Self is preserved since the owner is preserved.\n\n " --> (456:21-457:3) ".ref;\n\t\t" +(811:2-811:6) " var" --> (457:3-457:7) "\tvar" +(811:6-811:13) " self =" --> (457:7-457:14) " self =" +(811:13-811:21) " element" --> (457:14-457:22) " element" +(811:21-815:2) "._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n " --> (457:22-458:3) "._self;\n\t\t" +(815:2-815:6) " var" --> (458:3-458:7) "\tvar" +(815:6-815:15) " source =" --> (458:7-458:16) " source =" +(815:15-815:23) " element" --> (458:16-458:24) " element" +(815:23-817:2) "._source; // Owner will be preserved, unless ref is overridden\n\n " --> (458:24-459:3) "._source;\n\t\t" +(817:2-817:6) " var" --> (459:3-459:7) "\tvar" +(817:6-817:14) " owner =" --> (459:7-459:15) " owner =" +(817:14-817:22) " element" --> (459:15-459:23) " element" +(817:22-819:2) "._owner;\n\n " --> (459:23-460:0) "._owner;" +(819:2-819:6) " if " --> (460:0-460:7) "\n\t\t\tif " +(819:6-819:16) "(config !=" --> (460:7-460:17) "(config !=" +(819:16-819:22) " null)" --> (460:17-460:23) " null)" +(819:22-820:4) " {\n " --> (460:23-461:0) " {" +(820:4-820:8) " if " --> (461:0-461:8) "\n\t\t\t\tif " +(820:8-820:20) "(hasValidRef" --> (461:8-461:20) "(hasValidRef" +(820:20-820:27) "(config" --> (461:20-461:27) "(config" +(820:27-820:29) "))" --> (461:27-461:29) "))" +(820:29-822:6) " {\n // Silently steal the ref from the parent.\n " --> (461:29-462:0) " {" +(822:6-822:12) " ref =" --> (462:0-462:11) "\n\t\t\t\t\tref =" +(822:12-822:19) " config" --> (462:11-462:18) " config" +(822:19-823:6) ".ref;\n " --> (462:18-463:0) ".ref;" +(823:6-823:14) " owner =" --> (463:0-463:13) "\n\t\t\t\t\towner =" +(823:14-823:32) " ReactCurrentOwner" --> (463:13-463:31) " ReactCurrentOwner" +(823:32-824:5) ".current;\n " --> (463:31-464:4) ".current;\n\t\t\t" +(824:5-826:4) "}\n\n " --> (464:4-465:0) "\t}" +(826:4-826:8) " if " --> (465:0-465:8) "\n\t\t\t\tif " +(826:8-826:20) "(hasValidKey" --> (465:8-465:20) "(hasValidKey" +(826:20-826:27) "(config" --> (465:20-465:27) "(config" +(826:27-826:29) "))" --> (465:27-465:29) "))" +(826:29-827:6) " {\n " --> (465:29-466:0) " {" +(827:6-827:12) " key =" --> (466:0-466:11) "\n\t\t\t\t\tkey =" +(827:12-827:17) " '' +" --> (466:11-466:16) " \"\" +" +(827:17-827:24) " config" --> (466:16-466:23) " config" +(827:24-828:5) ".key;\n " --> (466:23-467:4) ".key;\n\t\t\t" +(828:5-831:4) "} // Remaining properties override existing props\n\n\n " --> (467:4-468:4) "\t}\n\t\t\t" +(831:4-831:8) " var" --> (468:4-468:8) "\tvar" +(831:8-833:4) " defaultProps;\n\n " --> (468:8-469:0) " defaultProps;" +(833:4-833:8) " if " --> (469:0-469:8) "\n\t\t\t\tif " +(833:8-833:16) "(element" --> (469:8-469:16) "(element" +(833:16-833:24) ".type &&" --> (469:16-469:24) ".type &&" +(833:24-833:32) " element" --> (469:24-469:32) " element" +(833:32-833:37) ".type" --> (469:32-469:37) ".type" +(833:37-833:51) ".defaultProps)" --> (469:37-469:51) ".defaultProps)" +(833:51-834:6) " {\n " --> (469:51-470:0) " {" +(834:6-834:21) " defaultProps =" --> (470:0-470:20) "\n\t\t\t\t\tdefaultProps =" +(834:21-834:29) " element" --> (470:20-470:28) " element" +(834:29-834:34) ".type" --> (470:28-470:33) ".type" +(834:34-835:5) ".defaultProps;\n " --> (470:33-471:4) ".defaultProps;\n\t\t\t" +(835:5-837:4) "}\n\n " --> (471:4-472:0) "\t}" +(837:4-837:9) " for " --> (472:0-472:9) "\n\t\t\t\tfor " +(837:9-837:21) "(propName in" --> (472:9-472:21) "(propName in" +(837:21-837:29) " config)" --> (472:21-472:29) " config)" +(837:29-838:6) " {\n " --> (472:29-473:0) " {" +(838:6-838:10) " if " --> (473:0-473:9) "\n\t\t\t\t\tif " +(838:10-838:25) "(hasOwnProperty" --> (473:9-473:24) "(hasOwnProperty" +(838:25-838:30) ".call" --> (473:24-473:29) ".call" +(838:30-838:38) "(config," --> (473:29-473:37) "(config," +(838:38-838:47) " propName" --> (473:37-473:46) " propName" +(838:47-838:52) ") && " --> (473:46-473:51) ") && " +(838:52-838:67) "!RESERVED_PROPS" --> (473:51-473:66) "!RESERVED_PROPS" +(838:67-838:82) ".hasOwnProperty" --> (473:66-473:81) ".hasOwnProperty" +(838:82-838:91) "(propName" --> (473:81-473:90) "(propName" +(838:91-838:93) "))" --> (473:90-473:92) "))" +(838:93-839:8) " {\n " --> (473:92-474:0) " {" +(839:8-839:12) " if " --> (474:0-474:10) "\n\t\t\t\t\t\tif " +(839:12-839:19) "(config" --> (474:10-474:17) "(config" +(839:19-839:33) "[propName] ===" --> (474:17-474:31) "[propName] ===" +(839:33-839:46) " undefined &&" --> (474:31-474:44) " undefined &&" +(839:46-839:63) " defaultProps !==" --> (474:44-474:61) " defaultProps !==" +(839:63-839:74) " undefined)" --> (474:61-474:72) " undefined)" +(839:74-841:10) " {\n // Resolve default props\n " --> (474:72-475:0) " {" +(841:10-841:16) " props" --> (475:0-475:13) "\n\t\t\t\t\t\t\tprops" +(841:16-841:28) "[propName] =" --> (475:13-475:25) "[propName] =" +(841:28-841:41) " defaultProps" --> (475:25-475:38) " defaultProps" +(841:41-842:9) "[propName];\n " --> (475:38-476:6) "[propName];\n\t\t\t\t\t" +(842:9-842:15) "} else" --> (476:6-476:13) "\t} else" +(842:15-843:10) " {\n " --> (476:13-477:0) " {" +(843:10-843:16) " props" --> (477:0-477:13) "\n\t\t\t\t\t\t\tprops" +(843:16-843:28) "[propName] =" --> (477:13-477:25) "[propName] =" +(843:28-843:35) " config" --> (477:25-477:32) " config" +(843:35-844:9) "[propName];\n " --> (477:32-478:6) "[propName];\n\t\t\t\t\t" +(844:9-845:7) "}\n " --> (478:6-479:5) "\t}\n\t\t\t\t" +(845:7-846:5) "}\n " --> (479:5-480:4) "\t}\n\t\t\t" +(846:5-847:3) "}\n " --> (480:4-481:3) "\t}\n\t\t" +(847:3-851:2) "} // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n " --> (481:3-482:3) "\t}\n\t\t" +(851:2-851:6) " var" --> (482:3-482:7) "\tvar" +(851:6-851:23) " childrenLength =" --> (482:7-482:24) " childrenLength =" +(851:23-851:33) " arguments" --> (482:24-482:34) " arguments" +(851:33-851:42) ".length -" --> (482:34-482:43) ".length -" +(851:42-853:2) " 2;\n\n " --> (482:43-483:0) " 2;" +(853:2-853:6) " if " --> (483:0-483:7) "\n\t\t\tif " +(853:6-853:25) "(childrenLength ===" --> (483:7-483:26) "(childrenLength ===" +(853:25-853:28) " 1)" --> (483:26-483:29) " 1)" +(853:28-854:4) " {\n " --> (483:29-484:0) " {" +(854:4-854:10) " props" --> (484:0-484:10) "\n\t\t\t\tprops" +(854:10-854:21) ".children =" --> (484:10-484:21) ".children =" +(854:21-855:3) " children;\n " --> (484:21-485:3) " children;\n\t\t" +(855:3-855:13) "} else if " --> (485:3-485:14) "\t} else if " +(855:13-855:30) "(childrenLength >" --> (485:14-485:31) "(childrenLength >" +(855:30-855:33) " 1)" --> (485:31-485:34) " 1)" +(855:33-856:4) " {\n " --> (485:34-486:4) " {\n\t\t\t" +(856:4-856:8) " var" --> (486:4-486:8) "\tvar" +(856:8-856:21) " childArray =" --> (486:8-486:21) " childArray =" +(856:21-856:27) " Array" --> (486:21-486:27) " Array" +(856:27-856:42) "(childrenLength" --> (486:27-486:42) "(childrenLength" +(856:42-858:4) ");\n\n " --> (486:42-487:0) ");" +(858:4-858:9) " for " --> (487:0-487:9) "\n\t\t\t\tfor " +(858:9-858:13) "(var" --> (487:9-487:13) "(var" +(858:13-858:17) " i =" --> (487:13-487:17) " i =" +(858:17-858:20) " 0;" --> (487:17-487:20) " 0;" +(858:20-858:24) " i <" --> (487:20-487:24) " i <" +(858:24-858:40) " childrenLength;" --> (487:24-487:40) " childrenLength;" +(858:40-858:45) " i++)" --> (487:40-487:45) " i++)" +(858:45-859:6) " {\n " --> (487:45-488:0) " {" +(859:6-859:17) " childArray" --> (488:0-488:16) "\n\t\t\t\t\tchildArray" +(859:17-859:22) "[i] =" --> (488:16-488:21) "[i] =" +(859:22-859:32) " arguments" --> (488:21-488:31) " arguments" +(859:32-859:36) "[i +" --> (488:31-488:35) "[i +" +(859:36-860:5) " 2];\n " --> (488:35-489:4) " 2];\n\t\t\t" +(860:5-862:4) "}\n\n " --> (489:4-490:0) "\t}" +(862:4-862:10) " props" --> (490:0-490:10) "\n\t\t\t\tprops" +(862:10-862:21) ".children =" --> (490:10-490:21) ".children =" +(862:21-863:3) " childArray;\n " --> (490:21-491:3) " childArray;\n\t\t" +(863:3-865:2) "}\n\n " --> (491:3-492:0) "\t}" +(865:2-865:9) " return" --> (492:0-492:10) "\n\t\t\treturn" +(865:9-865:22) " ReactElement" --> (492:10-492:23) " ReactElement" +(865:22-865:30) "(element" --> (492:23-492:31) "(element" +(865:30-865:36) ".type," --> (492:31-492:37) ".type," +(865:36-865:41) " key," --> (492:37-492:42) " key," +(865:41-865:46) " ref," --> (492:42-492:47) " ref," +(865:46-865:52) " self," --> (492:47-492:53) " self," +(865:52-865:60) " source," --> (492:53-492:61) " source," +(865:60-865:67) " owner," --> (492:61-492:68) " owner," +(865:67-865:73) " props" --> (492:68-492:74) " props" +(865:73-866:1) ");\n" --> (492:74-493:2) ");\n\t" +(866:1-875:0) "}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n" --> (493:2-494:2) "\t}\n\t" +(875:0-875:9) "\nfunction" --> (494:2-494:11) "\tfunction" +(875:9-875:24) " isValidElement" --> (494:11-494:26) " isValidElement" +(875:24-875:32) "(object)" --> (494:26-494:34) "(object)" +(875:32-876:2) " {\n " --> (494:34-495:0) " {" +(876:2-876:16) " return typeof" --> (495:0-495:17) "\n\t\t\treturn typeof" +(876:16-876:27) " object ===" --> (495:17-495:28) " object ===" +(876:27-876:39) " 'object' &&" --> (495:28-495:40) " \"object\" &&" +(876:39-876:50) " object !==" --> (495:40-495:51) " object !==" +(876:50-876:58) " null &&" --> (495:51-495:59) " null &&" +(876:58-876:65) " object" --> (495:59-495:66) " object" +(876:65-876:78) ".$$typeof ===" --> (495:66-495:79) ".$$typeof ===" +(876:78-877:1) " REACT_ELEMENT_TYPE;\n" --> (495:79-496:2) " REACT_ELEMENT_TYPE;\n\t" +(877:1-879:0) "}\n" --> (496:2-497:2) "\t}\n\t" +(879:0-879:4) "\nvar" --> (497:2-497:6) "\tvar" +(879:4-879:16) " SEPARATOR =" --> (497:6-497:18) " SEPARATOR =" +(879:16-880:0) " '.';" --> (497:18-498:2) " \".\";\n\t" +(880:0-880:4) "\nvar" --> (498:2-498:6) "\tvar" +(880:4-880:19) " SUBSEPARATOR =" --> (498:6-498:21) " SUBSEPARATOR =" +(880:19-888:0) " ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n" --> (498:21-499:2) " \":\";\n\t" +(888:0-888:9) "\nfunction" --> (499:2-499:11) "\tfunction" +(888:9-888:16) " escape" --> (499:11-499:18) " escape" +(888:16-888:21) "(key)" --> (499:18-499:23) "(key)" +(888:21-889:2) " {\n " --> (499:23-500:3) " {\n\t\t" +(889:2-889:6) " var" --> (500:3-500:7) "\tvar" +(889:6-889:20) " escapeRegex =" --> (500:7-500:21) " escapeRegex =" +(889:20-890:2) " /[=:]/g;\n " --> (500:21-501:3) " /[=:]/g;\n\t\t" +(890:2-890:6) " var" --> (501:3-501:7) "\tvar" +(890:6-890:22) " escaperLookup =" --> (501:7-501:23) " escaperLookup =" +(890:22-891:4) " {\n " --> (501:23-502:4) " {\n\t\t\t" +(891:4-891:9) " '=':" --> (502:4-502:9) "\t\"=\":" +(891:9-892:4) " '=0',\n " --> (502:9-503:4) " \"=0\",\n\t\t\t" +(892:4-892:9) " ':':" --> (503:4-503:9) "\t\":\":" +(892:9-893:3) " '=2'\n " --> (503:9-504:3) " \"=2\"\n\t\t" +(893:3-894:2) "};\n " --> (504:3-505:3) "\t};\n\t\t" +(894:2-894:6) " var" --> (505:3-505:7) "\tvar" +(894:6-894:22) " escapedString =" --> (505:7-505:23) " escapedString =" +(894:22-894:26) " key" --> (505:23-505:27) " key" +(894:26-894:34) ".replace" --> (505:27-505:35) ".replace" +(894:34-894:47) "(escapeRegex," --> (505:35-505:48) "(escapeRegex," +(894:47-894:57) " function " --> (505:48-505:57) " function" +(894:57-894:64) "(match)" --> (505:57-505:64) "(match)" +(894:64-895:4) " {\n " --> (505:64-506:0) " {" +(895:4-895:11) " return" --> (506:0-506:11) "\n\t\t\t\treturn" +(895:11-895:25) " escaperLookup" --> (506:11-506:25) " escaperLookup" +(895:25-896:3) "[match];\n " --> (506:25-507:3) "[match];\n\t\t" +(896:3-896:4) "}" --> (507:3-507:5) "\t}" +(896:4-897:2) ");\n " --> (507:5-508:0) ");" +(897:2-897:9) " return" --> (508:0-508:10) "\n\t\t\treturn" +(897:9-897:15) " '$' +" --> (508:10-508:16) " \"$\" +" +(897:15-898:1) " escapedString;\n" --> (508:16-509:2) " escapedString;\n\t" +(898:1-905:0) "}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n" --> (509:2-510:2) "\t}\n\t" +(905:0-905:4) "\nvar" --> (510:2-510:6) "\tvar" +(905:4-905:23) " didWarnAboutMaps =" --> (510:6-510:25) " didWarnAboutMaps =" +(905:23-906:0) " false;" --> (510:25-511:2) " false;\n\t" +(906:0-906:4) "\nvar" --> (511:2-511:6) "\tvar" +(906:4-906:33) " userProvidedKeyEscapeRegex =" --> (511:6-511:35) " userProvidedKeyEscapeRegex =" +(906:33-908:0) " /\\/+/g;\n" --> (511:35-512:2) " /\\/+/g;\n\t" +(908:0-908:9) "\nfunction" --> (512:2-512:11) "\tfunction" +(908:9-908:31) " escapeUserProvidedKey" --> (512:11-512:33) " escapeUserProvidedKey" +(908:31-908:37) "(text)" --> (512:33-512:39) "(text)" +(908:37-909:2) " {\n " --> (512:39-513:0) " {" +(909:2-909:9) " return" --> (513:0-513:10) "\n\t\t\treturn" +(909:9-909:14) " text" --> (513:10-513:15) " text" +(909:14-909:22) ".replace" --> (513:15-513:23) ".replace" +(909:22-909:50) "(userProvidedKeyEscapeRegex," --> (513:23-513:51) "(userProvidedKeyEscapeRegex," +(909:50-909:56) " '$&/'" --> (513:51-513:57) " \"$&/\"" +(909:56-910:1) ");\n" --> (513:57-514:2) ");\n\t" +(910:1-920:0) "}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n" --> (514:2-515:2) "\t}\n\t" +(920:0-920:9) "\nfunction" --> (515:2-515:11) "\tfunction" +(920:9-920:23) " getElementKey" --> (515:11-515:25) " getElementKey" +(920:23-920:32) "(element," --> (515:25-515:34) "(element," +(920:32-920:39) " index)" --> (515:34-515:41) " index)" +(920:39-923:2) " {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n " --> (515:41-516:0) " {" +(923:2-923:13) " if (typeof" --> (516:0-516:14) "\n\t\t\tif (typeof" +(923:13-923:25) " element ===" --> (516:14-516:26) " element ===" +(923:25-923:37) " 'object' &&" --> (516:26-516:38) " \"object\" &&" +(923:37-923:49) " element !==" --> (516:38-516:50) " element !==" +(923:49-923:57) " null &&" --> (516:50-516:58) " null &&" +(923:57-923:65) " element" --> (516:58-516:66) " element" +(923:65-923:72) ".key !=" --> (516:66-516:73) ".key !=" +(923:72-923:78) " null)" --> (516:73-516:79) " null)" +(923:78-925:4) " {\n // Explicit key\n " --> (516:79-517:0) " {" +(925:4-925:11) " return" --> (517:0-517:11) "\n\t\t\t\treturn" +(925:11-925:18) " escape" --> (517:11-517:18) " escape" +(925:18-925:23) "('' +" --> (517:18-517:23) "(\"\" +" +(925:23-925:31) " element" --> (517:23-517:31) " element" +(925:31-925:35) ".key" --> (517:31-517:35) ".key" +(925:35-926:3) ");\n " --> (517:35-518:3) ");\n\t\t" +(926:3-929:2) "} // Implicit key determined by the index in the set\n\n\n " --> (518:3-519:0) "\t}" +(929:2-929:9) " return" --> (519:0-519:10) "\n\t\t\treturn" +(929:9-929:15) " index" --> (519:10-519:16) " index" +(929:15-929:24) ".toString" --> (519:16-519:25) ".toString" +(929:24-929:27) "(36" --> (519:25-519:28) "(36" +(929:27-930:1) ");\n" --> (519:28-520:2) ");\n\t" +(930:1-932:0) "}\n" --> (520:2-521:2) "\t}\n\t" +(932:0-932:9) "\nfunction" --> (521:2-521:11) "\tfunction" +(932:9-932:22) " mapIntoArray" --> (521:11-521:24) " mapIntoArray" +(932:22-932:32) "(children," --> (521:24-521:34) "(children," +(932:32-932:39) " array," --> (521:34-521:41) " array," +(932:39-932:54) " escapedPrefix," --> (521:41-521:56) " escapedPrefix," +(932:54-932:65) " nameSoFar," --> (521:56-521:67) " nameSoFar," +(932:65-932:75) " callback)" --> (521:67-521:77) " callback)" +(932:75-933:2) " {\n " --> (521:77-522:3) " {\n\t\t" +(933:2-933:6) " var" --> (522:3-522:7) "\tvar" +(933:6-933:20) " type = typeof" --> (522:7-522:21) " type = typeof" +(933:20-935:2) " children;\n\n " --> (522:21-523:0) " children;" +(935:2-935:6) " if " --> (523:0-523:7) "\n\t\t\tif " +(935:6-935:15) "(type ===" --> (523:7-523:16) "(type ===" +(935:15-935:30) " 'undefined' ||" --> (523:16-523:31) " \"undefined\" ||" +(935:30-935:39) " type ===" --> (523:31-523:40) " type ===" +(935:39-935:50) " 'boolean')" --> (523:40-523:51) " \"boolean\")" +(935:50-937:4) " {\n // All of the above are perceived as null.\n " --> (523:51-524:0) " {" +(937:4-937:15) " children =" --> (524:0-524:15) "\n\t\t\t\tchildren =" +(937:15-938:3) " null;\n " --> (524:15-525:3) " null;\n\t\t" +(938:3-940:2) "}\n\n " --> (525:3-526:3) "\t}\n\t\t" +(940:2-940:6) " var" --> (526:3-526:7) "\tvar" +(940:6-940:23) " invokeCallback =" --> (526:7-526:24) " invokeCallback =" +(940:23-942:2) " false;\n\n " --> (526:24-527:0) " false;" +(942:2-942:6) " if " --> (527:0-527:7) "\n\t\t\tif " +(942:6-942:19) "(children ===" --> (527:7-527:20) "(children ===" +(942:19-942:25) " null)" --> (527:20-527:26) " null)" +(942:25-943:4) " {\n " --> (527:26-528:0) " {" +(943:4-943:21) " invokeCallback =" --> (528:0-528:21) "\n\t\t\t\tinvokeCallback =" +(943:21-944:3) " true;\n " --> (528:21-529:3) " true;\n\t\t" +(944:3-944:9) "} else" --> (529:3-529:10) "\t} else" +(944:9-945:4) " {\n " --> (529:10-530:0) " {" +(945:4-945:12) " switch " --> (530:0-530:12) "\n\t\t\t\tswitch " +(945:12-945:4) " switch " --> (530:12-530:18) "(type)" +(945:4-946:6) " switch (type) {\n " --> (530:18-531:0) " {" +(946:6-946:11) " case" --> (531:0-531:10) "\n\t\t\t\t\tcase" +(946:11-947:6) " 'string':\n " --> (531:10-532:0) " \"string\":" +(947:6-947:11) " case" --> (532:0-532:10) "\n\t\t\t\t\tcase" +(947:11-948:8) " 'number':\n " --> (532:10-533:0) " \"number\":" +(948:8-948:25) " invokeCallback =" --> (533:0-533:23) "\n\t\t\t\t\t\tinvokeCallback =" +(948:25-949:8) " true;\n " --> (533:23-534:0) " true;" +(949:8-951:6) " break;\n\n " --> (534:0-535:0) "\n\t\t\t\t\t\tbreak;" +(951:6-951:11) " case" --> (535:0-535:10) "\n\t\t\t\t\tcase" +(951:11-952:8) " 'object':\n " --> (535:10-535:19) " \"object\"" +(952:8-952:16) " switch " --> (535:19-535:28) ": switch " +(952:16-952:25) "(children" --> (535:28-535:37) "(children" +(952:25-952:8) " switch (children" --> (535:37-535:47) ".$$typeof)" +(952:8-953:10) " switch (children.$$typeof) {\n " --> (535:47-536:0) " {" +(953:10-953:15) " case" --> (536:0-536:11) "\n\t\t\t\t\t\tcase" +(953:15-954:10) " REACT_ELEMENT_TYPE:\n " --> (536:11-537:0) " REACT_ELEMENT_TYPE:" +(954:10-954:15) " case" --> (537:0-537:11) "\n\t\t\t\t\t\tcase" +(954:15-955:12) " REACT_PORTAL_TYPE:\n " --> (537:11-537:29) " REACT_PORTAL_TYPE" +(955:12-955:29) " invokeCallback =" --> (537:29-537:47) ": invokeCallback =" +(955:29-956:9) " true;\n " --> (537:47-538:5) " true;\n\t\t\t\t" +(956:9-958:5) "}\n\n " --> (538:5-539:4) "\t}\n\t\t\t" +(958:5-959:3) "}\n " --> (539:4-540:3) "\t}\n\t\t" +(959:3-961:2) "}\n\n " --> (540:3-541:0) "\t}" +(961:2-961:6) " if " --> (541:0-541:7) "\n\t\t\tif " +(961:6-961:22) "(invokeCallback)" --> (541:7-541:23) "(invokeCallback)" +(961:22-962:4) " {\n " --> (541:23-542:4) " {\n\t\t\t" +(962:4-962:8) " var" --> (542:4-542:8) "\tvar" +(962:8-962:17) " _child =" --> (542:8-542:17) " _child =" +(962:17-963:4) " children;\n " --> (542:17-543:4) " children;\n\t\t\t" +(963:4-963:8) " var" --> (543:4-543:8) "\tvar" +(963:8-963:22) " mappedChild =" --> (543:8-543:22) " mappedChild =" +(963:22-963:31) " callback" --> (543:22-543:31) " callback" +(963:31-963:38) "(_child" --> (543:31-543:38) "(_child" +(963:38-966:4) "); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n " --> (543:38-544:4) ");\n\t\t\t" +(966:4-966:8) " var" --> (544:4-544:8) "\tvar" +(966:8-966:19) " childKey =" --> (544:8-544:19) " childKey =" +(966:19-966:33) " nameSoFar ===" --> (544:19-544:33) " nameSoFar ===" +(966:33-966:38) " '' ?" --> (544:33-544:38) " \"\" ?" +(966:38-966:50) " SEPARATOR +" --> (544:38-544:50) " SEPARATOR +" +(966:50-966:64) " getElementKey" --> (544:50-544:64) " getElementKey" +(966:64-966:72) "(_child," --> (544:64-544:72) "(_child," +(966:72-966:74) " 0" --> (544:72-544:74) " 0" +(966:74-966:77) ") :" --> (544:74-544:77) ") :" +(966:77-968:4) " nameSoFar;\n\n " --> (544:77-545:0) " nameSoFar;" +(968:4-968:8) " if " --> (545:0-545:8) "\n\t\t\t\tif " +(968:8-968:14) "(Array" --> (545:8-545:14) "(Array" +(968:14-968:22) ".isArray" --> (545:14-545:22) ".isArray" +(968:22-968:34) "(mappedChild" --> (545:22-545:34) "(mappedChild" +(968:34-968:36) "))" --> (545:34-545:36) "))" +(968:36-969:6) " {\n " --> (545:36-546:5) " {\n\t\t\t\t" +(969:6-969:10) " var" --> (546:5-546:9) "\tvar" +(969:10-969:28) " escapedChildKey =" --> (546:9-546:27) " escapedChildKey =" +(969:28-971:6) " '';\n\n " --> (546:27-547:0) " \"\";" +(971:6-971:10) " if " --> (547:0-547:9) "\n\t\t\t\t\tif " +(971:10-971:22) "(childKey !=" --> (547:9-547:21) "(childKey !=" +(971:22-971:28) " null)" --> (547:21-547:27) " null)" +(971:28-972:8) " {\n " --> (547:27-548:0) " {" +(972:8-972:26) " escapedChildKey =" --> (548:0-548:24) "\n\t\t\t\t\t\tescapedChildKey =" +(972:26-972:48) " escapeUserProvidedKey" --> (548:24-548:46) " escapeUserProvidedKey" +(972:48-972:57) "(childKey" --> (548:46-548:55) "(childKey" +(972:57-972:60) ") +" --> (548:55-548:58) ") +" +(972:60-973:7) " '/';\n " --> (548:58-549:5) " \"/\";\n\t\t\t\t" +(973:7-975:6) "}\n\n " --> (549:5-550:0) "\t}" +(975:6-975:19) " mapIntoArray" --> (550:0-550:18) "\n\t\t\t\t\tmapIntoArray" +(975:19-975:32) "(mappedChild," --> (550:18-550:31) "(mappedChild," +(975:32-975:39) " array," --> (550:31-550:38) " array," +(975:39-975:56) " escapedChildKey," --> (550:38-550:55) " escapedChildKey," +(975:56-975:60) " ''," --> (550:55-550:59) " \"\"," +(975:60-975:70) " function " --> (550:59-550:68) " function" +(975:70-975:73) "(c)" --> (550:68-550:71) "(c)" +(975:73-976:8) " {\n " --> (550:71-551:0) " {" +(976:8-976:15) " return" --> (551:0-551:13) "\n\t\t\t\t\t\treturn" +(976:15-977:7) " c;\n " --> (551:13-552:5) " c;\n\t\t\t\t" +(977:7-977:8) "}" --> (552:5-552:7) "\t}" +(977:8-978:5) ");\n " --> (552:7-553:4) ");\n\t\t\t" +(978:5-978:15) "} else if " --> (553:4-553:15) "\t} else if " +(978:15-978:30) "(mappedChild !=" --> (553:15-553:30) "(mappedChild !=" +(978:30-978:36) " null)" --> (553:30-553:36) " null)" +(978:36-979:6) " {\n " --> (553:36-554:0) " {" +(979:6-979:10) " if " --> (554:0-554:9) "\n\t\t\t\t\tif " +(979:10-979:25) "(isValidElement" --> (554:9-554:24) "(isValidElement" +(979:25-979:37) "(mappedChild" --> (554:24-554:36) "(mappedChild" +(979:37-979:39) "))" --> (554:36-554:38) "))" +(979:39-980:8) " {\n " --> (554:38-555:0) " {" +(980:8-980:22) " mappedChild =" --> (555:0-555:20) "\n\t\t\t\t\t\tmappedChild =" +(980:22-980:41) " cloneAndReplaceKey" --> (555:20-555:39) " cloneAndReplaceKey" +(980:41-982:8) "(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n " --> (555:39-555:52) "(mappedChild," +(982:8-983:8) " escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n " --> (555:52-555:69) " escapedPrefix + " +(983:8-983:20) " mappedChild" --> (555:69-555:81) "(mappedChild" +(983:20-983:29) ".key && (" --> (555:81-555:90) ".key && (" +(983:29-983:39) "!_child ||" --> (555:90-555:100) "!_child ||" +(983:39-983:46) " _child" --> (555:100-555:107) " _child" +(983:46-983:54) ".key !==" --> (555:107-555:115) ".key !==" +(983:54-983:66) " mappedChild" --> (555:115-555:127) " mappedChild" +(983:66-984:8) ".key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n " --> (555:127-555:134) ".key) ?" +(984:8-984:30) " escapeUserProvidedKey" --> (555:134-555:156) " escapeUserProvidedKey" +(984:30-984:35) "('' +" --> (555:156-555:161) "(\"\" +" +(984:35-984:47) " mappedChild" --> (555:161-555:173) " mappedChild" +(984:47-984:51) ".key" --> (555:173-555:177) ".key" +(984:51-984:54) ") +" --> (555:177-555:180) ") +" +(984:54-984:60) " '/' :" --> (555:180-555:186) " \"/\" :" +(984:60-984:66) " '') +" --> (555:186-555:192) " \"\") +" +(984:66-984:75) " childKey" --> (555:192-555:201) " childKey" +(984:75-985:7) ");\n " --> (555:201-556:5) ");\n\t\t\t\t" +(985:7-987:6) "}\n\n " --> (556:5-557:0) "\t}" +(987:6-987:12) " array" --> (557:0-557:11) "\n\t\t\t\t\tarray" +(987:12-987:17) ".push" --> (557:11-557:16) ".push" +(987:17-987:29) "(mappedChild" --> (557:16-557:28) "(mappedChild" +(987:29-988:5) ");\n " --> (557:28-558:4) ");\n\t\t\t" +(988:5-990:4) "}\n\n " --> (558:4-559:0) "\t}" +(990:4-990:11) " return" --> (559:0-559:11) "\n\t\t\t\treturn" +(990:11-991:3) " 1;\n " --> (559:11-560:3) " 1;\n\t\t" +(991:3-993:2) "}\n\n " --> (560:3-561:3) "\t}\n\t\t" +(993:2-993:6) " var" --> (561:3-561:7) "\tvar" +(993:6-994:2) " child;\n " --> (561:7-562:3) " child;\n\t\t" +(994:2-994:6) " var" --> (562:3-562:7) "\tvar" +(994:6-995:2) " nextName;\n " --> (562:7-563:3) " nextName;\n\t\t" +(995:2-995:6) " var" --> (563:3-563:7) "\tvar" +(995:6-995:21) " subtreeCount =" --> (563:7-563:22) " subtreeCount =" +(995:21-997:2) " 0; // Count of children found in the current subtree.\n\n " --> (563:22-564:3) " 0;\n\t\t" +(997:2-997:6) " var" --> (564:3-564:7) "\tvar" +(997:6-997:23) " nextNamePrefix =" --> (564:7-564:24) " nextNamePrefix =" +(997:23-997:37) " nameSoFar ===" --> (564:24-564:38) " nameSoFar ===" +(997:37-997:42) " '' ?" --> (564:38-564:43) " \"\" ?" +(997:42-997:54) " SEPARATOR :" --> (564:43-564:55) " SEPARATOR :" +(997:54-997:66) " nameSoFar +" --> (564:55-564:67) " nameSoFar +" +(997:66-999:2) " SUBSEPARATOR;\n\n " --> (564:67-565:0) " SUBSEPARATOR;" +(999:2-999:6) " if " --> (565:0-565:7) "\n\t\t\tif " +(999:6-999:12) "(Array" --> (565:7-565:13) "(Array" +(999:12-999:20) ".isArray" --> (565:13-565:21) ".isArray" +(999:20-999:29) "(children" --> (565:21-565:30) "(children" +(999:29-999:31) "))" --> (565:30-565:32) "))" +(999:31-1000:4) " {\n " --> (565:32-566:0) " {" +(1000:4-1000:9) " for " --> (566:0-566:9) "\n\t\t\t\tfor " +(1000:9-1000:13) "(var" --> (566:9-566:13) "(var" +(1000:13-1000:17) " i =" --> (566:13-566:17) " i =" +(1000:17-1000:20) " 0;" --> (566:17-566:20) " 0;" +(1000:20-1000:24) " i <" --> (566:20-566:24) " i <" +(1000:24-1000:33) " children" --> (566:24-566:33) " children" +(1000:33-1000:41) ".length;" --> (566:33-566:41) ".length;" +(1000:41-1000:46) " i++)" --> (566:41-566:46) " i++)" +(1000:46-1001:6) " {\n " --> (566:46-567:0) " {" +(1001:6-1001:14) " child =" --> (567:0-567:13) "\n\t\t\t\t\tchild =" +(1001:14-1001:23) " children" --> (567:13-567:22) " children" +(1001:23-1002:6) "[i];\n " --> (567:22-568:0) "[i];" +(1002:6-1002:17) " nextName =" --> (568:0-568:16) "\n\t\t\t\t\tnextName =" +(1002:17-1002:34) " nextNamePrefix +" --> (568:16-568:33) " nextNamePrefix +" +(1002:34-1002:48) " getElementKey" --> (568:33-568:47) " getElementKey" +(1002:48-1002:55) "(child," --> (568:47-568:54) "(child," +(1002:55-1002:57) " i" --> (568:54-568:56) " i" +(1002:57-1003:6) ");\n " --> (568:56-569:0) ");" +(1003:6-1003:22) " subtreeCount +=" --> (569:0-569:21) "\n\t\t\t\t\tsubtreeCount +=" +(1003:22-1003:35) " mapIntoArray" --> (569:21-569:34) " mapIntoArray" +(1003:35-1003:42) "(child," --> (569:34-569:41) "(child," +(1003:42-1003:49) " array," --> (569:41-569:48) " array," +(1003:49-1003:64) " escapedPrefix," --> (569:48-569:63) " escapedPrefix," +(1003:64-1003:74) " nextName," --> (569:63-569:73) " nextName," +(1003:74-1003:83) " callback" --> (569:73-569:82) " callback" +(1003:83-1004:5) ");\n " --> (569:82-570:4) ");\n\t\t\t" +(1004:5-1005:3) "}\n " --> (570:4-571:3) "\t}\n\t\t" +(1005:3-1005:9) "} else" --> (571:3-571:10) "\t} else" +(1005:9-1006:4) " {\n " --> (571:10-572:4) " {\n\t\t\t" +(1006:4-1006:8) " var" --> (572:4-572:8) "\tvar" +(1006:8-1006:21) " iteratorFn =" --> (572:8-572:21) " iteratorFn =" +(1006:21-1006:35) " getIteratorFn" --> (572:21-572:35) " getIteratorFn" +(1006:35-1006:44) "(children" --> (572:35-572:44) "(children" +(1006:44-1008:4) ");\n\n " --> (572:44-573:0) ");" +(1008:4-1008:15) " if (typeof" --> (573:0-573:15) "\n\t\t\t\tif (typeof" +(1008:15-1008:30) " iteratorFn ===" --> (573:15-573:30) " iteratorFn ===" +(1008:30-1008:42) " 'function')" --> (573:30-573:42) " \"function\")" +(1008:42-1009:6) " {\n " --> (573:42-574:5) " {\n\t\t\t\t" +(1009:6-1009:10) " var" --> (574:5-574:9) "\tvar" +(1009:10-1009:29) " iterableChildren =" --> (574:9-574:28) " iterableChildren =" +(1009:29-1011:6) " children;\n\n " --> (574:28-575:5) " children;\n\t\t\t\t" +(1011:6-1013:8) " {\n // Warn about using Maps as children\n " --> (575:5-576:0) "\t{" +(1013:8-1013:12) " if " --> (576:0-576:10) "\n\t\t\t\t\t\tif " +(1013:12-1013:27) "(iteratorFn ===" --> (576:10-576:25) "(iteratorFn ===" +(1013:27-1013:44) " iterableChildren" --> (576:25-576:42) " iterableChildren" +(1013:44-1013:53) ".entries)" --> (576:42-576:51) ".entries)" +(1013:53-1014:10) " {\n " --> (576:51-577:0) " {" +(1014:10-1014:15) " if (" --> (577:0-577:12) "\n\t\t\t\t\t\t\tif (" +(1014:15-1014:33) "!didWarnAboutMaps)" --> (577:12-577:30) "!didWarnAboutMaps)" +(1014:33-1015:12) " {\n " --> (577:30-578:0) " {" +(1015:12-1015:17) " warn" --> (578:0-578:13) "\n\t\t\t\t\t\t\t\twarn" +(1015:17-1015:63) "('Using Maps as children is not supported. ' +" --> (578:13-578:59) "(\"Using Maps as children is not supported. \" +" +(1015:63-1015:110) " 'Use an array of keyed ReactElements instead.'" --> (578:59-578:106) " \"Use an array of keyed ReactElements instead.\"" +(1015:110-1016:11) ");\n " --> (578:106-579:7) ");\n\t\t\t\t\t\t" +(1016:11-1018:10) "}\n\n " --> (579:7-580:0) "\t}" +(1018:10-1018:29) " didWarnAboutMaps =" --> (580:0-580:26) "\n\t\t\t\t\t\t\tdidWarnAboutMaps =" +(1018:29-1019:9) " true;\n " --> (580:26-581:6) " true;\n\t\t\t\t\t" +(1019:9-1020:7) "}\n " --> (581:6-582:5) "\t}\n\t\t\t\t" +(1020:7-1022:6) "}\n\n " --> (582:5-583:5) "\t}\n\t\t\t\t" +(1022:6-1022:10) " var" --> (583:5-583:9) "\tvar" +(1022:10-1022:21) " iterator =" --> (583:9-583:20) " iterator =" +(1022:21-1022:32) " iteratorFn" --> (583:20-583:31) " iteratorFn" +(1022:32-1022:37) ".call" --> (583:31-583:36) ".call" +(1022:37-1022:54) "(iterableChildren" --> (583:36-583:53) "(iterableChildren" +(1022:54-1023:6) ");\n " --> (583:53-584:5) ");\n\t\t\t\t" +(1023:6-1023:10) " var" --> (584:5-584:9) "\tvar" +(1023:10-1024:6) " step;\n " --> (584:9-585:5) " step;\n\t\t\t\t" +(1024:6-1024:10) " var" --> (585:5-585:9) "\tvar" +(1024:10-1024:15) " ii =" --> (585:9-585:14) " ii =" +(1024:15-1026:6) " 0;\n\n " --> (585:14-586:0) " 0;" +(1026:6-1026:15) " while (!" --> (586:0-586:14) "\n\t\t\t\t\twhile (!" +(1026:15-1026:22) "(step =" --> (586:14-586:21) "(step =" +(1026:22-1026:31) " iterator" --> (586:21-586:30) " iterator" +(1026:31-1026:37) ".next(" --> (586:30-586:36) ".next(" +(1026:37-1026:39) "))" --> (586:36-586:38) "))" +(1026:39-1026:45) ".done)" --> (586:38-586:44) ".done)" +(1026:45-1027:8) " {\n " --> (586:44-587:0) " {" +(1027:8-1027:16) " child =" --> (587:0-587:14) "\n\t\t\t\t\t\tchild =" +(1027:16-1027:21) " step" --> (587:14-587:19) " step" +(1027:21-1028:8) ".value;\n " --> (587:19-588:0) ".value;" +(1028:8-1028:19) " nextName =" --> (588:0-588:17) "\n\t\t\t\t\t\tnextName =" +(1028:19-1028:36) " nextNamePrefix +" --> (588:17-588:34) " nextNamePrefix +" +(1028:36-1028:50) " getElementKey" --> (588:34-588:48) " getElementKey" +(1028:50-1028:57) "(child," --> (588:48-588:55) "(child," +(1028:57-1028:62) " ii++" --> (588:55-588:60) " ii++" +(1028:62-1029:8) ");\n " --> (588:60-589:0) ");" +(1029:8-1029:24) " subtreeCount +=" --> (589:0-589:22) "\n\t\t\t\t\t\tsubtreeCount +=" +(1029:24-1029:37) " mapIntoArray" --> (589:22-589:35) " mapIntoArray" +(1029:37-1029:44) "(child," --> (589:35-589:42) "(child," +(1029:44-1029:51) " array," --> (589:42-589:49) " array," +(1029:51-1029:66) " escapedPrefix," --> (589:49-589:64) " escapedPrefix," +(1029:66-1029:76) " nextName," --> (589:64-589:74) " nextName," +(1029:76-1029:85) " callback" --> (589:74-589:83) " callback" +(1029:85-1030:7) ");\n " --> (589:83-590:5) ");\n\t\t\t\t" +(1030:7-1031:5) "}\n " --> (590:5-591:4) "\t}\n\t\t\t" +(1031:5-1031:15) "} else if " --> (591:4-591:15) "\t} else if " +(1031:15-1031:24) "(type ===" --> (591:15-591:24) "(type ===" +(1031:24-1031:34) " 'object')" --> (591:24-591:34) " \"object\")" +(1031:34-1032:6) " {\n " --> (591:34-592:5) " {\n\t\t\t\t" +(1032:6-1032:10) " var" --> (592:5-592:9) "\tvar" +(1032:10-1032:27) " childrenString =" --> (592:9-592:26) " childrenString =" +(1032:27-1032:32) " '' +" --> (592:26-592:31) " \"\" +" +(1032:32-1034:6) " children;\n\n " --> (592:31-593:5) " children;\n\t\t\t\t" +(1034:6-1035:8) " {\n " --> (593:5-594:6) "\t{\n\t\t\t\t\t" +(1035:8-1036:10) " {\n " --> (594:6-595:0) "\t{" +(1036:10-1036:16) " throw" --> (595:0-595:13) "\n\t\t\t\t\t\t\tthrow" +(1036:16-1036:23) " Error(" --> (595:13-595:19) " Error" +(1036:23-1036:76) " \"Objects are not valid as a React child (found: \" + " --> (595:19-595:72) "(\"Objects are not valid as a React child (found: \" + " +(1036:76-1036:95) "(childrenString ===" --> (595:72-595:91) "(childrenString ===" +(1036:95-1036:115) " '[object Object]' ?" --> (595:91-595:111) " \"[object Object]\" ?" +(1036:115-1036:138) " 'object with keys {' +" --> (595:111-595:134) " \"object with keys {\" +" +(1036:138-1036:145) " Object" --> (595:134-595:141) " Object" +(1036:145-1036:150) ".keys" --> (595:141-595:146) ".keys" +(1036:150-1036:159) "(children" --> (595:146-595:155) "(children" +(1036:159-1036:160) ")" --> (595:155-595:156) ")" +(1036:160-1036:165) ".join" --> (595:156-595:161) ".join" +(1036:165-1036:170) "(', '" --> (595:161-595:166) "(\", \"" +(1036:170-1036:173) ") +" --> (595:166-595:169) ") +" +(1036:173-1036:179) " '}' :" --> (595:169-595:175) " \"}\" :" +(1036:179-1036:197) " childrenString) +" --> (595:175-595:193) " childrenString) +" +(1036:197-1036:274) " \"). If you meant to render a collection of children, use an array instead.\" " --> (595:193-595:269) " \"). If you meant to render a collection of children, use an array instead.\"" +(1036:274-1037:9) ");\n " --> (595:269-596:6) ");\n\t\t\t\t\t" +(1037:9-1038:7) "}\n " --> (596:6-597:5) "\t}\n\t\t\t\t" +(1038:7-1039:5) "}\n " --> (597:5-598:4) "\t}\n\t\t\t" +(1039:5-1040:3) "}\n " --> (598:4-599:3) "\t}\n\t\t" +(1040:3-1042:2) "}\n\n " --> (599:3-600:0) "\t}" +(1042:2-1042:9) " return" --> (600:0-600:10) "\n\t\t\treturn" +(1042:9-1043:1) " subtreeCount;\n" --> (600:10-601:2) " subtreeCount;\n\t" +(1043:1-1058:0) "}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */" --> (601:2-602:2) "\t}\n\t" +(1058:0-1058:9) "\nfunction" --> (602:2-602:11) "\tfunction" +(1058:9-1058:21) " mapChildren" --> (602:11-602:23) " mapChildren" +(1058:21-1058:31) "(children," --> (602:23-602:33) "(children," +(1058:31-1058:37) " func," --> (602:33-602:39) " func," +(1058:37-1058:46) " context)" --> (602:39-602:48) " context)" +(1058:46-1059:2) " {\n " --> (602:48-603:0) " {" +(1059:2-1059:6) " if " --> (603:0-603:7) "\n\t\t\tif " +(1059:6-1059:18) "(children ==" --> (603:7-603:19) "(children ==" +(1059:18-1059:24) " null)" --> (603:19-603:25) " null)" +(1059:24-1060:4) " {\n " --> (603:25-604:0) " {" +(1060:4-1060:11) " return" --> (604:0-604:11) "\n\t\t\t\treturn" +(1060:11-1061:3) " children;\n " --> (604:11-605:3) " children;\n\t\t" +(1061:3-1063:2) "}\n\n " --> (605:3-606:3) "\t}\n\t\t" +(1063:2-1063:6) " var" --> (606:3-606:7) "\tvar" +(1063:6-1063:15) " result =" --> (606:7-606:16) " result =" +(1063:15-1063:17) " [" --> (606:16-606:18) " [" +(1063:17-1064:2) "];\n " --> (606:18-607:3) "];\n\t\t" +(1064:2-1064:6) " var" --> (607:3-607:7) "\tvar" +(1064:6-1064:14) " count =" --> (607:7-607:15) " count =" +(1064:14-1065:2) " 0;\n " --> (607:15-608:0) " 0;" +(1065:2-1065:15) " mapIntoArray" --> (608:0-608:16) "\n\t\t\tmapIntoArray" +(1065:15-1065:25) "(children," --> (608:16-608:26) "(children," +(1065:25-1065:33) " result," --> (608:26-608:34) " result," +(1065:33-1065:37) " ''," --> (608:34-608:38) " \"\"," +(1065:37-1065:41) " ''," --> (608:38-608:42) " \"\"," +(1065:41-1065:51) " function " --> (608:42-608:51) " function" +(1065:51-1065:58) "(child)" --> (608:51-608:58) "(child)" +(1065:58-1066:4) " {\n " --> (608:58-609:0) " {" +(1066:4-1066:11) " return" --> (609:0-609:11) "\n\t\t\t\treturn" +(1066:11-1066:16) " func" --> (609:11-609:16) " func" +(1066:16-1066:21) ".call" --> (609:16-609:21) ".call" +(1066:21-1066:30) "(context," --> (609:21-609:30) "(context," +(1066:30-1066:37) " child," --> (609:30-609:37) " child," +(1066:37-1066:45) " count++" --> (609:37-609:45) " count++" +(1066:45-1067:3) ");\n " --> (609:45-610:3) ");\n\t\t" +(1067:3-1067:4) "}" --> (610:3-610:5) "\t}" +(1067:4-1068:2) ");\n " --> (610:5-611:0) ");" +(1068:2-1068:9) " return" --> (611:0-611:10) "\n\t\t\treturn" +(1068:9-1069:1) " result;\n" --> (611:10-612:2) " result;\n\t" +(1069:1-1081:0) "}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n" --> (612:2-613:2) "\t}\n\t" +(1081:0-1081:9) "\nfunction" --> (613:2-613:11) "\tfunction" +(1081:9-1081:23) " countChildren" --> (613:11-613:25) " countChildren" +(1081:23-1081:33) "(children)" --> (613:25-613:35) "(children)" +(1081:33-1082:2) " {\n " --> (613:35-614:3) " {\n\t\t" +(1082:2-1082:6) " var" --> (614:3-614:7) "\tvar" +(1082:6-1082:10) " n =" --> (614:7-614:11) " n =" +(1082:10-1083:2) " 0;\n " --> (614:11-615:0) " 0;" +(1083:2-1083:14) " mapChildren" --> (615:0-615:15) "\n\t\t\tmapChildren" +(1083:14-1083:24) "(children," --> (615:15-615:25) "(children," +(1083:24-1083:36) " function ()" --> (615:25-615:36) " function()" +(1083:36-1084:4) " {\n " --> (615:36-616:0) " {" +(1084:4-1085:3) " n++; // Don't return anything\n " --> (616:0-617:3) "\n\t\t\t\tn++;\n\t\t" +(1085:3-1085:4) "}" --> (617:3-617:5) "\t}" +(1085:4-1086:2) ");\n " --> (617:5-618:0) ");" +(1086:2-1086:9) " return" --> (618:0-618:10) "\n\t\t\treturn" +(1086:9-1087:1) " n;\n" --> (618:10-619:2) " n;\n\t" +(1087:1-1101:0) "}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */" --> (619:2-620:2) "\t}\n\t" +(1101:0-1101:9) "\nfunction" --> (620:2-620:11) "\tfunction" +(1101:9-1101:25) " forEachChildren" --> (620:11-620:27) " forEachChildren" +(1101:25-1101:35) "(children," --> (620:27-620:37) "(children," +(1101:35-1101:48) " forEachFunc," --> (620:37-620:50) " forEachFunc," +(1101:48-1101:64) " forEachContext)" --> (620:50-620:66) " forEachContext)" +(1101:64-1102:2) " {\n " --> (620:66-621:0) " {" +(1102:2-1102:14) " mapChildren" --> (621:0-621:15) "\n\t\t\tmapChildren" +(1102:14-1102:24) "(children," --> (621:15-621:25) "(children," +(1102:24-1102:36) " function ()" --> (621:25-621:36) " function()" +(1102:36-1103:4) " {\n " --> (621:36-622:0) " {" +(1103:4-1103:16) " forEachFunc" --> (622:0-622:16) "\n\t\t\t\tforEachFunc" +(1103:16-1103:22) ".apply" --> (622:16-622:22) ".apply" +(1103:22-1103:28) "(this," --> (622:22-622:28) "(this," +(1103:28-1103:38) " arguments" --> (622:28-622:38) " arguments" +(1103:38-1104:3) "); // Don't return anything.\n " --> (622:38-623:3) ");\n\t\t" +(1104:3-1104:5) "}," --> (623:3-623:6) "\t}," +(1104:5-1104:20) " forEachContext" --> (623:6-623:21) " forEachContext" +(1104:20-1105:1) ");\n" --> (623:21-624:2) ");\n\t" +(1105:1-1114:0) "}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n" --> (624:2-625:2) "\t}\n\t" +(1114:0-1114:9) "\nfunction" --> (625:2-625:11) "\tfunction" +(1114:9-1114:17) " toArray" --> (625:11-625:19) " toArray" +(1114:17-1114:27) "(children)" --> (625:19-625:29) "(children)" +(1114:27-1115:2) " {\n " --> (625:29-626:0) " {" +(1115:2-1115:9) " return" --> (626:0-626:10) "\n\t\t\treturn" +(1115:9-1115:21) " mapChildren" --> (626:10-626:22) " mapChildren" +(1115:21-1115:31) "(children," --> (626:22-626:32) "(children," +(1115:31-1115:41) " function " --> (626:32-626:41) " function" +(1115:41-1115:48) "(child)" --> (626:41-626:48) "(child)" +(1115:48-1116:4) " {\n " --> (626:48-627:0) " {" +(1116:4-1116:11) " return" --> (627:0-627:11) "\n\t\t\t\treturn" +(1116:11-1117:3) " child;\n " --> (627:11-628:3) " child;\n\t\t" +(1117:3-1117:4) "}" --> (628:3-628:5) "\t}" +(1117:4-1117:8) ") ||" --> (628:5-628:9) ") ||" +(1117:8-1117:10) " [" --> (628:9-628:11) " [" +(1117:10-1118:1) "];\n" --> (628:11-629:2) "];\n\t" +(1118:1-1135:0) "}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n" --> (629:2-630:2) "\t}\n\t" +(1135:0-1135:9) "\nfunction" --> (630:2-630:11) "\tfunction" +(1135:9-1135:19) " onlyChild" --> (630:11-630:21) " onlyChild" +(1135:19-1135:29) "(children)" --> (630:21-630:31) "(children)" +(1135:29-1136:2) " {\n " --> (630:31-631:0) " {" +(1136:2-1136:7) " if (" --> (631:0-631:8) "\n\t\t\tif (" +(1136:7-1136:22) "!isValidElement" --> (631:8-631:23) "!isValidElement" +(1136:22-1136:31) "(children" --> (631:23-631:32) "(children" +(1136:31-1136:33) "))" --> (631:32-631:34) "))" +(1136:33-1137:4) " {\n " --> (631:34-632:4) " {\n\t\t\t" +(1137:4-1138:6) " {\n " --> (632:4-633:0) "\t{" +(1138:6-1138:12) " throw" --> (633:0-633:11) "\n\t\t\t\t\tthrow" +(1138:12-1138:19) " Error(" --> (633:11-633:17) " Error" +(1138:19-1138:92) " \"React.Children.only expected to receive a single React element child.\" " --> (633:17-633:89) "(\"React.Children.only expected to receive a single React element child.\"" +(1138:92-1139:5) ");\n " --> (633:89-634:4) ");\n\t\t\t" +(1139:5-1140:3) "}\n " --> (634:4-635:3) "\t}\n\t\t" +(1140:3-1142:2) "}\n\n " --> (635:3-636:0) "\t}" +(1142:2-1142:9) " return" --> (636:0-636:10) "\n\t\t\treturn" +(1142:9-1143:1) " children;\n" --> (636:10-637:2) " children;\n\t" +(1143:1-1145:0) "}\n" --> (637:2-638:2) "\t}\n\t" +(1145:0-1145:9) "\nfunction" --> (638:2-638:11) "\tfunction" +(1145:9-1145:23) " createContext" --> (638:11-638:25) " createContext" +(1145:23-1145:37) "(defaultValue," --> (638:25-638:39) "(defaultValue," +(1145:37-1145:59) " calculateChangedBits)" --> (638:39-638:61) " calculateChangedBits)" +(1145:59-1146:2) " {\n " --> (638:61-639:0) " {" +(1146:2-1146:6) " if " --> (639:0-639:7) "\n\t\t\tif " +(1146:6-1146:31) "(calculateChangedBits ===" --> (639:7-639:32) "(calculateChangedBits ===" +(1146:31-1146:42) " undefined)" --> (639:32-639:43) " undefined)" +(1146:42-1147:4) " {\n " --> (639:43-640:0) " {" +(1147:4-1147:27) " calculateChangedBits =" --> (640:0-640:27) "\n\t\t\t\tcalculateChangedBits =" +(1147:27-1148:3) " null;\n " --> (640:27-641:3) " null;\n\t\t" +(1148:3-1148:9) "} else" --> (641:3-641:10) "\t} else" +(1148:9-1149:4) " {\n " --> (641:10-642:4) " {\n\t\t\t" +(1149:4-1150:6) " {\n " --> (642:4-643:0) "\t{" +(1150:6-1150:10) " if " --> (643:0-643:9) "\n\t\t\t\t\tif " +(1150:10-1150:35) "(calculateChangedBits !==" --> (643:9-643:34) "(calculateChangedBits !==" +(1150:35-1150:50) " null && typeof" --> (643:34-643:49) " null && typeof" +(1150:50-1150:75) " calculateChangedBits !==" --> (643:49-643:74) " calculateChangedBits !==" +(1150:75-1150:87) " 'function')" --> (643:74-643:86) " \"function\")" +(1150:87-1151:8) " {\n " --> (643:86-644:0) " {" +(1151:8-1151:14) " error" --> (644:0-644:12) "\n\t\t\t\t\t\terror" +(1151:14-1151:80) "('createContext: Expected the optional second argument to be a ' +" --> (644:12-644:78) "(\"createContext: Expected the optional second argument to be a \" +" +(1151:80-1151:114) " 'function. Instead received: %s'," --> (644:78-644:112) " \"function. Instead received: %s\"," +(1151:114-1151:135) " calculateChangedBits" --> (644:112-644:133) " calculateChangedBits" +(1151:135-1152:7) ");\n " --> (644:133-645:5) ");\n\t\t\t\t" +(1152:7-1153:5) "}\n " --> (645:5-646:4) "\t}\n\t\t\t" +(1153:5-1154:3) "}\n " --> (646:4-647:3) "\t}\n\t\t" +(1154:3-1156:2) "}\n\n " --> (647:3-648:3) "\t}\n\t\t" +(1156:2-1156:6) " var" --> (648:3-648:7) "\tvar" +(1156:6-1156:16) " context =" --> (648:7-648:17) " context =" +(1156:16-1157:4) " {\n " --> (648:17-649:4) " {\n\t\t\t" +(1157:4-1157:14) " $$typeof:" --> (649:4-649:14) "\t$$typeof:" +(1157:14-1158:4) " REACT_CONTEXT_TYPE,\n " --> (649:14-650:4) " REACT_CONTEXT_TYPE,\n\t\t\t" +(1158:4-1158:27) " _calculateChangedBits:" --> (650:4-650:27) "\t_calculateChangedBits:" +(1158:27-1164:4) " calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n " --> (650:27-651:4) " calculateChangedBits,\n\t\t\t" +(1164:4-1164:19) " _currentValue:" --> (651:4-651:19) "\t_currentValue:" +(1164:19-1165:4) " defaultValue,\n " --> (651:19-652:4) " defaultValue,\n\t\t\t" +(1165:4-1165:20) " _currentValue2:" --> (652:4-652:20) "\t_currentValue2:" +(1165:20-1168:4) " defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n " --> (652:20-653:4) " defaultValue,\n\t\t\t" +(1168:4-1168:18) " _threadCount:" --> (653:4-653:18) "\t_threadCount:" +(1168:18-1170:4) " 0,\n // These are circular\n " --> (653:18-654:4) " 0,\n\t\t\t" +(1170:4-1170:14) " Provider:" --> (654:4-654:14) "\tProvider:" +(1170:14-1171:4) " null,\n " --> (654:14-655:4) " null,\n\t\t\t" +(1171:4-1171:14) " Consumer:" --> (655:4-655:14) "\tConsumer:" +(1171:14-1172:3) " null\n " --> (655:14-656:3) " null\n\t\t" +(1172:3-1173:2) "};\n " --> (656:3-657:0) "\t};" +(1173:2-1173:10) " context" --> (657:0-657:11) "\n\t\t\tcontext" +(1173:10-1173:21) ".Provider =" --> (657:11-657:22) ".Provider =" +(1173:21-1174:4) " {\n " --> (657:22-658:4) " {\n\t\t\t" +(1174:4-1174:14) " $$typeof:" --> (658:4-658:14) "\t$$typeof:" +(1174:14-1175:4) " REACT_PROVIDER_TYPE,\n " --> (658:14-659:4) " REACT_PROVIDER_TYPE,\n\t\t\t" +(1175:4-1175:14) " _context:" --> (659:4-659:14) "\t_context:" +(1175:14-1176:3) " context\n " --> (659:14-660:3) " context\n\t\t" +(1176:3-1177:2) "};\n " --> (660:3-661:3) "\t};\n\t\t" +(1177:2-1177:6) " var" --> (661:3-661:7) "\tvar" +(1177:6-1177:50) " hasWarnedAboutUsingNestedContextConsumers =" --> (661:7-661:51) " hasWarnedAboutUsingNestedContextConsumers =" +(1177:50-1178:2) " false;\n " --> (661:51-662:3) " false;\n\t\t" +(1178:2-1178:6) " var" --> (662:3-662:7) "\tvar" +(1178:6-1178:44) " hasWarnedAboutUsingConsumerProvider =" --> (662:7-662:45) " hasWarnedAboutUsingConsumerProvider =" +(1178:44-1179:2) " false;\n " --> (662:45-663:3) " false;\n\t\t" +(1179:2-1179:6) " var" --> (663:3-663:7) "\tvar" +(1179:6-1179:44) " hasWarnedAboutDisplayNameOnConsumer =" --> (663:7-663:45) " hasWarnedAboutDisplayNameOnConsumer =" +(1179:44-1181:2) " false;\n\n " --> (663:45-664:3) " false;\n\t\t" +(1181:2-1185:4) " {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n " --> (664:3-665:4) "\t{\n\t\t\t" +(1185:4-1185:8) " var" --> (665:4-665:8) "\tvar" +(1185:8-1185:19) " Consumer =" --> (665:8-665:19) " Consumer =" +(1185:19-1186:6) " {\n " --> (665:19-666:5) " {\n\t\t\t\t" +(1186:6-1186:16) " $$typeof:" --> (666:5-666:15) "\t$$typeof:" +(1186:16-1187:6) " REACT_CONTEXT_TYPE,\n " --> (666:15-667:5) " REACT_CONTEXT_TYPE,\n\t\t\t\t" +(1187:6-1187:16) " _context:" --> (667:5-667:15) "\t_context:" +(1187:16-1188:6) " context,\n " --> (667:15-668:5) " context,\n\t\t\t\t" +(1188:6-1188:29) " _calculateChangedBits:" --> (668:5-668:28) "\t_calculateChangedBits:" +(1188:29-1188:37) " context" --> (668:28-668:36) " context" +(1188:37-1189:5) "._calculateChangedBits\n " --> (668:36-669:4) "._calculateChangedBits\n\t\t\t" +(1189:5-1191:4) "}; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n " --> (669:4-670:0) "\t};" +(1191:4-1191:11) " Object" --> (670:0-670:11) "\n\t\t\t\tObject" +(1191:11-1191:28) ".defineProperties" --> (670:11-670:28) ".defineProperties" +(1191:28-1191:38) "(Consumer," --> (670:28-670:38) "(Consumer," +(1191:38-1192:6) " {\n " --> (670:38-671:5) " {\n\t\t\t\t" +(1192:6-1192:16) " Provider:" --> (671:5-671:15) "\tProvider:" +(1192:16-1193:8) " {\n " --> (671:15-672:6) " {\n\t\t\t\t\t" +(1193:8-1193:13) " get:" --> (672:6-672:11) "\tget:" +(1193:13-1193:25) " function ()" --> (672:11-672:22) " function()" +(1193:25-1194:10) " {\n " --> (672:22-673:0) " {" +(1194:10-1194:15) " if (" --> (673:0-673:12) "\n\t\t\t\t\t\t\tif (" +(1194:15-1194:52) "!hasWarnedAboutUsingConsumerProvider)" --> (673:12-673:49) "!hasWarnedAboutUsingConsumerProvider)" +(1194:52-1195:12) " {\n " --> (673:49-674:0) " {" +(1195:12-1195:50) " hasWarnedAboutUsingConsumerProvider =" --> (674:0-674:46) "\n\t\t\t\t\t\t\t\thasWarnedAboutUsingConsumerProvider =" +(1195:50-1197:12) " true;\n\n " --> (674:46-675:0) " true;" +(1197:12-1197:18) " error" --> (675:0-675:14) "\n\t\t\t\t\t\t\t\terror" +(1197:18-1197:101) "('Rendering is not supported and will be removed in ' +" --> (675:14-675:97) "(\"Rendering is not supported and will be removed in \" +" +(1197:101-1197:178) " 'a future major release. Did you mean to render instead?'" --> (675:97-675:174) " \"a future major release. Did you mean to render instead?\"" +(1197:178-1198:11) ");\n " --> (675:174-676:7) ");\n\t\t\t\t\t\t" +(1198:11-1200:10) "}\n\n " --> (676:7-677:0) "\t}" +(1200:10-1200:17) " return" --> (677:0-677:14) "\n\t\t\t\t\t\t\treturn" +(1200:17-1200:25) " context" --> (677:14-677:22) " context" +(1200:25-1201:9) ".Provider;\n " --> (677:22-678:6) ".Provider;\n\t\t\t\t\t" +(1201:9-1202:8) "},\n " --> (678:6-679:6) "\t},\n\t\t\t\t\t" +(1202:8-1202:13) " set:" --> (679:6-679:11) "\tset:" +(1202:13-1202:23) " function " --> (679:11-679:20) " function" +(1202:23-1202:34) "(_Provider)" --> (679:20-679:31) "(_Provider)" +(1202:34-1203:10) " {\n " --> (679:31-680:0) " {" +(1203:10-1203:18) " context" --> (680:0-680:15) "\n\t\t\t\t\t\t\tcontext" +(1203:18-1203:29) ".Provider =" --> (680:15-680:26) ".Provider =" +(1203:29-1204:9) " _Provider;\n " --> (680:26-681:6) " _Provider;\n\t\t\t\t\t" +(1204:9-1205:7) "}\n " --> (681:6-682:5) "\t}\n\t\t\t\t" +(1205:7-1206:6) "},\n " --> (682:5-683:5) "\t},\n\t\t\t\t" +(1206:6-1206:21) " _currentValue:" --> (683:5-683:20) "\t_currentValue:" +(1206:21-1207:8) " {\n " --> (683:20-684:6) " {\n\t\t\t\t\t" +(1207:8-1207:13) " get:" --> (684:6-684:11) "\tget:" +(1207:13-1207:25) " function ()" --> (684:11-684:22) " function()" +(1207:25-1208:10) " {\n " --> (684:22-685:0) " {" +(1208:10-1208:17) " return" --> (685:0-685:14) "\n\t\t\t\t\t\t\treturn" +(1208:17-1208:25) " context" --> (685:14-685:22) " context" +(1208:25-1209:9) "._currentValue;\n " --> (685:22-686:6) "._currentValue;\n\t\t\t\t\t" +(1209:9-1210:8) "},\n " --> (686:6-687:6) "\t},\n\t\t\t\t\t" +(1210:8-1210:13) " set:" --> (687:6-687:11) "\tset:" +(1210:13-1210:23) " function " --> (687:11-687:20) " function" +(1210:23-1210:38) "(_currentValue)" --> (687:20-687:35) "(_currentValue)" +(1210:38-1211:10) " {\n " --> (687:35-688:0) " {" +(1211:10-1211:18) " context" --> (688:0-688:15) "\n\t\t\t\t\t\t\tcontext" +(1211:18-1211:34) "._currentValue =" --> (688:15-688:31) "._currentValue =" +(1211:34-1212:9) " _currentValue;\n " --> (688:31-689:6) " _currentValue;\n\t\t\t\t\t" +(1212:9-1213:7) "}\n " --> (689:6-690:5) "\t}\n\t\t\t\t" +(1213:7-1214:6) "},\n " --> (690:5-691:5) "\t},\n\t\t\t\t" +(1214:6-1214:22) " _currentValue2:" --> (691:5-691:21) "\t_currentValue2:" +(1214:22-1215:8) " {\n " --> (691:21-692:6) " {\n\t\t\t\t\t" +(1215:8-1215:13) " get:" --> (692:6-692:11) "\tget:" +(1215:13-1215:25) " function ()" --> (692:11-692:22) " function()" +(1215:25-1216:10) " {\n " --> (692:22-693:0) " {" +(1216:10-1216:17) " return" --> (693:0-693:14) "\n\t\t\t\t\t\t\treturn" +(1216:17-1216:25) " context" --> (693:14-693:22) " context" +(1216:25-1217:9) "._currentValue2;\n " --> (693:22-694:6) "._currentValue2;\n\t\t\t\t\t" +(1217:9-1218:8) "},\n " --> (694:6-695:6) "\t},\n\t\t\t\t\t" +(1218:8-1218:13) " set:" --> (695:6-695:11) "\tset:" +(1218:13-1218:23) " function " --> (695:11-695:20) " function" +(1218:23-1218:39) "(_currentValue2)" --> (695:20-695:36) "(_currentValue2)" +(1218:39-1219:10) " {\n " --> (695:36-696:0) " {" +(1219:10-1219:18) " context" --> (696:0-696:15) "\n\t\t\t\t\t\t\tcontext" +(1219:18-1219:35) "._currentValue2 =" --> (696:15-696:32) "._currentValue2 =" +(1219:35-1220:9) " _currentValue2;\n " --> (696:32-697:6) " _currentValue2;\n\t\t\t\t\t" +(1220:9-1221:7) "}\n " --> (697:6-698:5) "\t}\n\t\t\t\t" +(1221:7-1222:6) "},\n " --> (698:5-699:5) "\t},\n\t\t\t\t" +(1222:6-1222:20) " _threadCount:" --> (699:5-699:19) "\t_threadCount:" +(1222:20-1223:8) " {\n " --> (699:19-700:6) " {\n\t\t\t\t\t" +(1223:8-1223:13) " get:" --> (700:6-700:11) "\tget:" +(1223:13-1223:25) " function ()" --> (700:11-700:22) " function()" +(1223:25-1224:10) " {\n " --> (700:22-701:0) " {" +(1224:10-1224:17) " return" --> (701:0-701:14) "\n\t\t\t\t\t\t\treturn" +(1224:17-1224:25) " context" --> (701:14-701:22) " context" +(1224:25-1225:9) "._threadCount;\n " --> (701:22-702:6) "._threadCount;\n\t\t\t\t\t" +(1225:9-1226:8) "},\n " --> (702:6-703:6) "\t},\n\t\t\t\t\t" +(1226:8-1226:13) " set:" --> (703:6-703:11) "\tset:" +(1226:13-1226:23) " function " --> (703:11-703:20) " function" +(1226:23-1226:37) "(_threadCount)" --> (703:20-703:34) "(_threadCount)" +(1226:37-1227:10) " {\n " --> (703:34-704:0) " {" +(1227:10-1227:18) " context" --> (704:0-704:15) "\n\t\t\t\t\t\t\tcontext" +(1227:18-1227:33) "._threadCount =" --> (704:15-704:30) "._threadCount =" +(1227:33-1228:9) " _threadCount;\n " --> (704:30-705:6) " _threadCount;\n\t\t\t\t\t" +(1228:9-1229:7) "}\n " --> (705:6-706:5) "\t}\n\t\t\t\t" +(1229:7-1230:6) "},\n " --> (706:5-707:5) "\t},\n\t\t\t\t" +(1230:6-1230:16) " Consumer:" --> (707:5-707:15) "\tConsumer:" +(1230:16-1231:8) " {\n " --> (707:15-707:17) " {" +(1231:8-1231:13) " get:" --> (707:17-707:22) " get:" +(1231:13-1231:25) " function ()" --> (707:22-707:33) " function()" +(1231:25-1232:10) " {\n " --> (707:33-708:0) " {" +(1232:10-1232:15) " if (" --> (708:0-708:11) "\n\t\t\t\t\t\tif (" +(1232:15-1232:58) "!hasWarnedAboutUsingNestedContextConsumers)" --> (708:11-708:54) "!hasWarnedAboutUsingNestedContextConsumers)" +(1232:58-1233:12) " {\n " --> (708:54-709:0) " {" +(1233:12-1233:56) " hasWarnedAboutUsingNestedContextConsumers =" --> (709:0-709:51) "\n\t\t\t\t\t\t\thasWarnedAboutUsingNestedContextConsumers =" +(1233:56-1235:12) " true;\n\n " --> (709:51-710:0) " true;" +(1235:12-1235:18) " error" --> (710:0-710:13) "\n\t\t\t\t\t\t\terror" +(1235:18-1235:101) "('Rendering is not supported and will be removed in ' +" --> (710:13-710:96) "(\"Rendering is not supported and will be removed in \" +" +(1235:101-1235:178) " 'a future major release. Did you mean to render instead?'" --> (710:96-710:173) " \"a future major release. Did you mean to render instead?\"" +(1235:178-1236:11) ");\n " --> (710:173-711:6) ");\n\t\t\t\t\t" +(1236:11-1238:10) "}\n\n " --> (711:6-712:0) "\t}" +(1238:10-1238:17) " return" --> (712:0-712:13) "\n\t\t\t\t\t\treturn" +(1238:17-1238:25) " context" --> (712:13-712:21) " context" +(1238:25-1239:9) ".Consumer;\n " --> (712:21-713:5) ".Consumer;\n\t\t\t\t" +(1239:9-1240:7) "}\n " --> (713:5-713:7) "\t}" +(1240:7-1241:6) "},\n " --> (713:7-714:5) " },\n\t\t\t\t" +(1241:6-1241:19) " displayName:" --> (714:5-714:18) "\tdisplayName:" +(1241:19-1242:8) " {\n " --> (714:18-715:6) " {\n\t\t\t\t\t" +(1242:8-1242:13) " get:" --> (715:6-715:11) "\tget:" +(1242:13-1242:25) " function ()" --> (715:11-715:22) " function()" +(1242:25-1243:10) " {\n " --> (715:22-716:0) " {" +(1243:10-1243:17) " return" --> (716:0-716:14) "\n\t\t\t\t\t\t\treturn" +(1243:17-1243:25) " context" --> (716:14-716:22) " context" +(1243:25-1244:9) ".displayName;\n " --> (716:22-717:6) ".displayName;\n\t\t\t\t\t" +(1244:9-1245:8) "},\n " --> (717:6-718:6) "\t},\n\t\t\t\t\t" +(1245:8-1245:13) " set:" --> (718:6-718:11) "\tset:" +(1245:13-1245:23) " function " --> (718:11-718:20) " function" +(1245:23-1245:36) "(displayName)" --> (718:20-718:33) "(displayName)" +(1245:36-1246:10) " {\n " --> (718:33-719:0) " {" +(1246:10-1246:15) " if (" --> (719:0-719:12) "\n\t\t\t\t\t\t\tif (" +(1246:15-1246:52) "!hasWarnedAboutDisplayNameOnConsumer)" --> (719:12-719:49) "!hasWarnedAboutDisplayNameOnConsumer)" +(1246:52-1247:12) " {\n " --> (719:49-720:0) " {" +(1247:12-1247:17) " warn" --> (720:0-720:13) "\n\t\t\t\t\t\t\t\twarn" +(1247:17-1247:79) "('Setting `displayName` on Context.Consumer has no effect. ' +" --> (720:13-720:75) "(\"Setting `displayName` on Context.Consumer has no effect. \" +" +(1247:79-1247:157) " \"You should set it directly on the context with Context.displayName = '%s'.\"," --> (720:75-720:153) " \"You should set it directly on the context with Context.displayName = '%s'.\"," +(1247:157-1247:169) " displayName" --> (720:153-720:165) " displayName" +(1247:169-1249:12) ");\n\n " --> (720:165-721:0) ");" +(1249:12-1249:50) " hasWarnedAboutDisplayNameOnConsumer =" --> (721:0-721:46) "\n\t\t\t\t\t\t\t\thasWarnedAboutDisplayNameOnConsumer =" +(1249:50-1250:11) " true;\n " --> (721:46-722:7) " true;\n\t\t\t\t\t\t" +(1250:11-1251:9) "}\n " --> (722:7-723:6) "\t}\n\t\t\t\t\t" +(1251:9-1252:7) "}\n " --> (723:6-724:5) "\t}\n\t\t\t\t" +(1252:7-1253:5) "}\n " --> (724:5-725:4) "\t}\n\t\t\t" +(1253:5-1253:6) "}" --> (725:4-725:6) "\t}" +(1253:6-1255:4) "); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n " --> (725:6-726:0) ");" +(1255:4-1255:12) " context" --> (726:0-726:12) "\n\t\t\t\tcontext" +(1255:12-1255:23) ".Consumer =" --> (726:12-726:23) ".Consumer =" +(1255:23-1256:3) " Consumer;\n " --> (726:23-727:3) " Consumer;\n\t\t" +(1256:3-1258:2) "}\n\n " --> (727:3-728:3) "\t}\n\t\t" +(1258:2-1259:4) " {\n " --> (728:3-729:0) "\t{" +(1259:4-1259:12) " context" --> (729:0-729:12) "\n\t\t\t\tcontext" +(1259:12-1259:31) "._currentRenderer =" --> (729:12-729:31) "._currentRenderer =" +(1259:31-1260:4) " null;\n " --> (729:31-730:0) " null;" +(1260:4-1260:12) " context" --> (730:0-730:12) "\n\t\t\t\tcontext" +(1260:12-1260:32) "._currentRenderer2 =" --> (730:12-730:32) "._currentRenderer2 =" +(1260:32-1261:3) " null;\n " --> (730:32-731:3) " null;\n\t\t" +(1261:3-1263:2) "}\n\n " --> (731:3-732:0) "\t}" +(1263:2-1263:9) " return" --> (732:0-732:10) "\n\t\t\treturn" +(1263:9-1264:1) " context;\n" --> (732:10-733:2) " context;\n\t" +(1264:1-1266:0) "}\n" --> (733:2-734:2) "\t}\n\t" +(1266:0-1266:4) "\nvar" --> (734:2-734:6) "\tvar" +(1266:4-1266:21) " Uninitialized = " --> (734:6-734:23) " Uninitialized = " +(1266:21-1267:0) "-1;" --> (734:23-735:2) "-1;\n\t" +(1267:0-1267:4) "\nvar" --> (735:2-735:6) "\tvar" +(1267:4-1267:14) " Pending =" --> (735:6-735:16) " Pending =" +(1267:14-1268:0) " 0;" --> (735:16-736:2) " 0;\n\t" +(1268:0-1268:4) "\nvar" --> (736:2-736:6) "\tvar" +(1268:4-1268:15) " Resolved =" --> (736:6-736:17) " Resolved =" +(1268:15-1269:0) " 1;" --> (736:17-737:2) " 1;\n\t" +(1269:0-1269:4) "\nvar" --> (737:2-737:6) "\tvar" +(1269:4-1269:15) " Rejected =" --> (737:6-737:17) " Rejected =" +(1269:15-1271:0) " 2;\n" --> (737:17-738:2) " 2;\n\t" +(1271:0-1271:9) "\nfunction" --> (738:2-738:11) "\tfunction" +(1271:9-1271:25) " lazyInitializer" --> (738:11-738:27) " lazyInitializer" +(1271:25-1271:34) "(payload)" --> (738:27-738:36) "(payload)" +(1271:34-1272:2) " {\n " --> (738:36-739:0) " {" +(1272:2-1272:6) " if " --> (739:0-739:7) "\n\t\t\tif " +(1272:6-1272:14) "(payload" --> (739:7-739:15) "(payload" +(1272:14-1272:26) "._status ===" --> (739:15-739:27) "._status ===" +(1272:26-1272:41) " Uninitialized)" --> (739:27-739:42) " Uninitialized)" +(1272:41-1273:4) " {\n " --> (739:42-740:4) " {\n\t\t\t" +(1273:4-1273:8) " var" --> (740:4-740:8) "\tvar" +(1273:8-1273:15) " ctor =" --> (740:8-740:15) " ctor =" +(1273:15-1273:23) " payload" --> (740:15-740:23) " payload" +(1273:23-1274:4) "._result;\n " --> (740:23-741:4) "._result;\n\t\t\t" +(1274:4-1274:8) " var" --> (741:4-741:8) "\tvar" +(1274:8-1274:19) " thenable =" --> (741:8-741:19) " thenable =" +(1274:19-1274:25) " ctor(" --> (741:19-741:25) " ctor(" +(1274:25-1276:4) "); // Transition to the next state.\n\n " --> (741:25-742:4) ");\n\t\t\t" +(1276:4-1276:8) " var" --> (742:4-742:8) "\tvar" +(1276:8-1276:18) " pending =" --> (742:8-742:18) " pending =" +(1276:18-1277:4) " payload;\n " --> (742:18-743:0) " payload;" +(1277:4-1277:12) " pending" --> (743:0-743:12) "\n\t\t\t\tpending" +(1277:12-1277:22) "._status =" --> (743:12-743:22) "._status =" +(1277:22-1278:4) " Pending;\n " --> (743:22-744:0) " Pending;" +(1278:4-1278:12) " pending" --> (744:0-744:12) "\n\t\t\t\tpending" +(1278:12-1278:22) "._result =" --> (744:12-744:22) "._result =" +(1278:22-1279:4) " thenable;\n " --> (744:22-745:0) " thenable;" +(1279:4-1279:13) " thenable" --> (745:0-745:13) "\n\t\t\t\tthenable" +(1279:13-1279:18) ".then" --> (745:13-745:18) ".then" +(1279:18-1279:28) "(function " --> (745:18-745:27) "(function" +(1279:28-1279:42) "(moduleObject)" --> (745:27-745:41) "(moduleObject)" +(1279:42-1280:6) " {\n " --> (745:41-746:0) " {" +(1280:6-1280:10) " if " --> (746:0-746:9) "\n\t\t\t\t\tif " +(1280:10-1280:18) "(payload" --> (746:9-746:17) "(payload" +(1280:18-1280:30) "._status ===" --> (746:17-746:29) "._status ===" +(1280:30-1280:39) " Pending)" --> (746:29-746:38) " Pending)" +(1280:39-1281:8) " {\n " --> (746:38-747:6) " {\n\t\t\t\t\t" +(1281:8-1281:12) " var" --> (747:6-747:10) "\tvar" +(1281:12-1281:28) " defaultExport =" --> (747:10-747:26) " defaultExport =" +(1281:28-1281:41) " moduleObject" --> (747:26-747:39) " moduleObject" +(1281:41-1283:8) ".default;\n\n " --> (747:39-748:6) ".default;\n\t\t\t\t\t" +(1283:8-1284:10) " {\n " --> (748:6-749:0) "\t{" +(1284:10-1284:14) " if " --> (749:0-749:11) "\n\t\t\t\t\t\t\tif " +(1284:14-1284:32) "(defaultExport ===" --> (749:11-749:29) "(defaultExport ===" +(1284:32-1284:43) " undefined)" --> (749:29-749:40) " undefined)" +(1284:43-1285:12) " {\n " --> (749:40-750:0) " {" +(1285:12-1285:18) " error" --> (750:0-750:14) "\n\t\t\t\t\t\t\t\terror" +(1285:18-1285:77) "('lazy: Expected the result of a dynamic import() call. ' +" --> (750:14-750:73) "(\"lazy: Expected the result of a dynamic import() call. \" +" +(1285:77-1286:12) " 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n " --> (750:73-750:134) " \"Instead received: %s\\n\\nYour code should look like: \\n \" +" +(1286:12-1286:51) " 'const MyComponent = lazy(() => imp' +" --> (750:134-750:173) " \"const MyComponent = lazy(() => imp\" +" +(1286:51-1286:76) " \"ort('./MyComponent'))\"," --> (750:173-750:198) " \"ort('./MyComponent'))\"," +(1286:76-1286:89) " moduleObject" --> (750:198-750:211) " moduleObject" +(1286:89-1287:11) ");\n " --> (750:211-751:7) ");\n\t\t\t\t\t\t" +(1287:11-1288:9) "}\n " --> (751:7-752:6) "\t}\n\t\t\t\t\t" +(1288:9-1291:8) "} // Transition to the next state.\n\n\n " --> (752:6-753:6) "\t}\n\t\t\t\t\t" +(1291:8-1291:12) " var" --> (753:6-753:10) "\tvar" +(1291:12-1291:23) " resolved =" --> (753:10-753:21) " resolved =" +(1291:23-1292:8) " payload;\n " --> (753:21-754:0) " payload;" +(1292:8-1292:17) " resolved" --> (754:0-754:15) "\n\t\t\t\t\t\tresolved" +(1292:17-1292:27) "._status =" --> (754:15-754:25) "._status =" +(1292:27-1293:8) " Resolved;\n " --> (754:25-755:0) " Resolved;" +(1293:8-1293:17) " resolved" --> (755:0-755:15) "\n\t\t\t\t\t\tresolved" +(1293:17-1293:27) "._result =" --> (755:15-755:25) "._result =" +(1293:27-1294:7) " defaultExport;\n " --> (755:25-756:5) " defaultExport;\n\t\t\t\t" +(1294:7-1295:5) "}\n " --> (756:5-757:4) "\t}\n\t\t\t" +(1295:5-1295:7) "}," --> (757:4-757:7) "\t}," +(1295:7-1295:17) " function " --> (757:7-757:16) " function" +(1295:17-1295:24) "(error)" --> (757:16-757:23) "(error)" +(1295:24-1296:6) " {\n " --> (757:23-758:0) " {" +(1296:6-1296:10) " if " --> (758:0-758:9) "\n\t\t\t\t\tif " +(1296:10-1296:18) "(payload" --> (758:9-758:17) "(payload" +(1296:18-1296:30) "._status ===" --> (758:17-758:29) "._status ===" +(1296:30-1296:39) " Pending)" --> (758:29-758:38) " Pending)" +(1296:39-1298:8) " {\n // Transition to the next state.\n " --> (758:38-759:6) " {\n\t\t\t\t\t" +(1298:8-1298:12) " var" --> (759:6-759:10) "\tvar" +(1298:12-1298:23) " rejected =" --> (759:10-759:21) " rejected =" +(1298:23-1299:8) " payload;\n " --> (759:21-760:0) " payload;" +(1299:8-1299:17) " rejected" --> (760:0-760:15) "\n\t\t\t\t\t\trejected" +(1299:17-1299:27) "._status =" --> (760:15-760:25) "._status =" +(1299:27-1300:8) " Rejected;\n " --> (760:25-761:0) " Rejected;" +(1300:8-1300:17) " rejected" --> (761:0-761:15) "\n\t\t\t\t\t\trejected" +(1300:17-1300:27) "._result =" --> (761:15-761:25) "._result =" +(1300:27-1301:7) " error;\n " --> (761:25-762:5) " error;\n\t\t\t\t" +(1301:7-1302:5) "}\n " --> (762:5-763:4) "\t}\n\t\t\t" +(1302:5-1302:6) "}" --> (763:4-763:6) "\t}" +(1302:6-1303:3) ");\n " --> (763:6-764:3) ");\n\t\t" +(1303:3-1305:2) "}\n\n " --> (764:3-765:0) "\t}" +(1305:2-1305:6) " if " --> (765:0-765:7) "\n\t\t\tif " +(1305:6-1305:14) "(payload" --> (765:7-765:15) "(payload" +(1305:14-1305:26) "._status ===" --> (765:15-765:27) "._status ===" +(1305:26-1305:36) " Resolved)" --> (765:27-765:37) " Resolved)" +(1305:36-1306:4) " {\n " --> (765:37-766:0) " {" +(1306:4-1306:11) " return" --> (766:0-766:11) "\n\t\t\t\treturn" +(1306:11-1306:19) " payload" --> (766:11-766:19) " payload" +(1306:19-1307:3) "._result;\n " --> (766:19-767:3) "._result;\n\t\t" +(1307:3-1307:9) "} else" --> (767:3-767:10) "\t} else" +(1307:9-1308:4) " {\n " --> (767:10-768:0) " {" +(1308:4-1308:10) " throw" --> (768:0-768:10) "\n\t\t\t\tthrow" +(1308:10-1308:18) " payload" --> (768:10-768:18) " payload" +(1308:18-1309:3) "._result;\n " --> (768:18-769:3) "._result;\n\t\t" +(1309:3-1310:1) "}\n" --> (769:3-770:2) "\t}\n\t" +(1310:1-1312:0) "}\n" --> (770:2-771:2) "\t}\n\t" +(1312:0-1312:9) "\nfunction" --> (771:2-771:11) "\tfunction" +(1312:9-1312:14) " lazy" --> (771:11-771:16) " lazy" +(1312:14-1312:20) "(ctor)" --> (771:16-771:22) "(ctor)" +(1312:20-1313:2) " {\n " --> (771:22-772:3) " {\n\t\t" +(1313:2-1313:6) " var" --> (772:3-772:7) "\tvar" +(1313:6-1313:16) " payload =" --> (772:7-772:17) " payload =" +(1313:16-1315:4) " {\n // We use these fields to store the result.\n " --> (772:17-773:4) " {\n\t\t\t" +(1315:4-1315:14) " _status: " --> (773:4-773:14) "\t_status: " +(1315:14-1316:4) "-1,\n " --> (773:14-774:4) "-1,\n\t\t\t" +(1316:4-1316:13) " _result:" --> (774:4-774:13) "\t_result:" +(1316:13-1317:3) " ctor\n " --> (774:13-775:3) " ctor\n\t\t" +(1317:3-1318:2) "};\n " --> (775:3-776:3) "\t};\n\t\t" +(1318:2-1318:6) " var" --> (776:3-776:7) "\tvar" +(1318:6-1318:17) " lazyType =" --> (776:7-776:18) " lazyType =" +(1318:17-1319:4) " {\n " --> (776:18-777:4) " {\n\t\t\t" +(1319:4-1319:14) " $$typeof:" --> (777:4-777:14) "\t$$typeof:" +(1319:14-1320:4) " REACT_LAZY_TYPE,\n " --> (777:14-778:4) " REACT_LAZY_TYPE,\n\t\t\t" +(1320:4-1320:14) " _payload:" --> (778:4-778:14) "\t_payload:" +(1320:14-1321:4) " payload,\n " --> (778:14-779:4) " payload,\n\t\t\t" +(1321:4-1321:11) " _init:" --> (779:4-779:11) "\t_init:" +(1321:11-1322:3) " lazyInitializer\n " --> (779:11-780:3) " lazyInitializer\n\t\t" +(1322:3-1324:2) "};\n\n " --> (780:3-781:3) "\t};\n\t\t" +(1324:2-1326:4) " {\n // In production, this would just set it on the object.\n " --> (781:3-782:4) "\t{\n\t\t\t" +(1326:4-1326:8) " var" --> (782:4-782:8) "\tvar" +(1326:8-1327:4) " defaultProps;\n " --> (782:8-783:4) " defaultProps;\n\t\t\t" +(1327:4-1327:8) " var" --> (783:4-783:8) "\tvar" +(1327:8-1329:4) " propTypes; // $FlowFixMe\n\n " --> (783:8-784:0) " propTypes;" +(1329:4-1329:11) " Object" --> (784:0-784:11) "\n\t\t\t\tObject" +(1329:11-1329:28) ".defineProperties" --> (784:11-784:28) ".defineProperties" +(1329:28-1329:38) "(lazyType," --> (784:28-784:38) "(lazyType," +(1329:38-1330:6) " {\n " --> (784:38-785:5) " {\n\t\t\t\t" +(1330:6-1330:20) " defaultProps:" --> (785:5-785:19) "\tdefaultProps:" +(1330:20-1331:8) " {\n " --> (785:19-786:6) " {\n\t\t\t\t\t" +(1331:8-1331:22) " configurable:" --> (786:6-786:20) "\tconfigurable:" +(1331:22-1332:8) " true,\n " --> (786:20-787:6) " true,\n\t\t\t\t\t" +(1332:8-1332:13) " get:" --> (787:6-787:11) "\tget:" +(1332:13-1332:25) " function ()" --> (787:11-787:22) " function()" +(1332:25-1333:10) " {\n " --> (787:22-788:0) " {" +(1333:10-1333:17) " return" --> (788:0-788:14) "\n\t\t\t\t\t\t\treturn" +(1333:17-1334:9) " defaultProps;\n " --> (788:14-789:6) " defaultProps;\n\t\t\t\t\t" +(1334:9-1335:8) "},\n " --> (789:6-790:6) "\t},\n\t\t\t\t\t" +(1335:8-1335:13) " set:" --> (790:6-790:11) "\tset:" +(1335:13-1335:23) " function " --> (790:11-790:20) " function" +(1335:23-1335:40) "(newDefaultProps)" --> (790:20-790:37) "(newDefaultProps)" +(1335:40-1336:10) " {\n " --> (790:37-791:0) " {" +(1336:10-1336:16) " error" --> (791:0-791:13) "\n\t\t\t\t\t\t\terror" +(1336:16-1336:86) "('React.lazy(...): It is not supported to assign `defaultProps` to ' +" --> (791:13-791:83) "(\"React.lazy(...): It is not supported to assign `defaultProps` to \" +" +(1336:86-1336:156) " 'a lazy component import. Either specify them where the component ' +" --> (791:83-791:153) " \"a lazy component import. Either specify them where the component \" +" +(1336:156-1336:212) " 'is defined, or create a wrapping component around it.'" --> (791:153-791:209) " \"is defined, or create a wrapping component around it.\"" +(1336:212-1338:10) ");\n\n " --> (791:209-792:0) ");" +(1338:10-1338:25) " defaultProps =" --> (792:0-792:22) "\n\t\t\t\t\t\t\tdefaultProps =" +(1338:25-1341:10) " newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n " --> (792:22-793:0) " newDefaultProps;" +(1341:10-1341:17) " Object" --> (793:0-793:14) "\n\t\t\t\t\t\t\tObject" +(1341:17-1341:32) ".defineProperty" --> (793:14-793:29) ".defineProperty" +(1341:32-1341:42) "(lazyType," --> (793:29-793:39) "(lazyType," +(1341:42-1341:58) " 'defaultProps'," --> (793:39-793:55) " \"defaultProps\"," +(1341:58-1342:12) " {\n " --> (793:55-793:57) " {" +(1342:12-1342:24) " enumerable:" --> (793:57-793:69) " enumerable:" +(1342:24-1343:11) " true\n " --> (793:69-793:74) " true" +(1343:11-1343:12) "}" --> (793:74-793:76) " }" +(1343:12-1344:9) ");\n " --> (793:76-794:6) ");\n\t\t\t\t\t" +(1344:9-1345:7) "}\n " --> (794:6-795:5) "\t}\n\t\t\t\t" +(1345:7-1346:6) "},\n " --> (795:5-796:5) "\t},\n\t\t\t\t" +(1346:6-1346:17) " propTypes:" --> (796:5-796:16) "\tpropTypes:" +(1346:17-1347:8) " {\n " --> (796:16-797:6) " {\n\t\t\t\t\t" +(1347:8-1347:22) " configurable:" --> (797:6-797:20) "\tconfigurable:" +(1347:22-1348:8) " true,\n " --> (797:20-798:6) " true,\n\t\t\t\t\t" +(1348:8-1348:13) " get:" --> (798:6-798:11) "\tget:" +(1348:13-1348:25) " function ()" --> (798:11-798:22) " function()" +(1348:25-1349:10) " {\n " --> (798:22-799:0) " {" +(1349:10-1349:17) " return" --> (799:0-799:14) "\n\t\t\t\t\t\t\treturn" +(1349:17-1350:9) " propTypes;\n " --> (799:14-800:6) " propTypes;\n\t\t\t\t\t" +(1350:9-1351:8) "},\n " --> (800:6-801:6) "\t},\n\t\t\t\t\t" +(1351:8-1351:13) " set:" --> (801:6-801:11) "\tset:" +(1351:13-1351:23) " function " --> (801:11-801:20) " function" +(1351:23-1351:37) "(newPropTypes)" --> (801:20-801:34) "(newPropTypes)" +(1351:37-1352:10) " {\n " --> (801:34-802:0) " {" +(1352:10-1352:16) " error" --> (802:0-802:13) "\n\t\t\t\t\t\t\terror" +(1352:16-1352:83) "('React.lazy(...): It is not supported to assign `propTypes` to ' +" --> (802:13-802:80) "(\"React.lazy(...): It is not supported to assign `propTypes` to \" +" +(1352:83-1352:153) " 'a lazy component import. Either specify them where the component ' +" --> (802:80-802:150) " \"a lazy component import. Either specify them where the component \" +" +(1352:153-1352:209) " 'is defined, or create a wrapping component around it.'" --> (802:150-802:206) " \"is defined, or create a wrapping component around it.\"" +(1352:209-1354:10) ");\n\n " --> (802:206-803:0) ");" +(1354:10-1354:22) " propTypes =" --> (803:0-803:19) "\n\t\t\t\t\t\t\tpropTypes =" +(1354:22-1357:10) " newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n " --> (803:19-804:0) " newPropTypes;" +(1357:10-1357:17) " Object" --> (804:0-804:14) "\n\t\t\t\t\t\t\tObject" +(1357:17-1357:32) ".defineProperty" --> (804:14-804:29) ".defineProperty" +(1357:32-1357:42) "(lazyType," --> (804:29-804:39) "(lazyType," +(1357:42-1357:55) " 'propTypes'," --> (804:39-804:52) " \"propTypes\"," +(1357:55-1358:12) " {\n " --> (804:52-804:54) " {" +(1358:12-1358:24) " enumerable:" --> (804:54-804:66) " enumerable:" +(1358:24-1359:11) " true\n " --> (804:66-804:71) " true" +(1359:11-1359:12) "}" --> (804:71-804:73) " }" +(1359:12-1360:9) ");\n " --> (804:73-805:6) ");\n\t\t\t\t\t" +(1360:9-1361:7) "}\n " --> (805:6-806:5) "\t}\n\t\t\t\t" +(1361:7-1362:5) "}\n " --> (806:5-807:4) "\t}\n\t\t\t" +(1362:5-1362:6) "}" --> (807:4-807:6) "\t}" +(1362:6-1363:3) ");\n " --> (807:6-808:3) ");\n\t\t" +(1363:3-1365:2) "}\n\n " --> (808:3-809:0) "\t}" +(1365:2-1365:9) " return" --> (809:0-809:10) "\n\t\t\treturn" +(1365:9-1366:1) " lazyType;\n" --> (809:10-810:2) " lazyType;\n\t" +(1366:1-1368:0) "}\n" --> (810:2-811:2) "\t}\n\t" +(1368:0-1368:9) "\nfunction" --> (811:2-811:11) "\tfunction" +(1368:9-1368:20) " forwardRef" --> (811:11-811:22) " forwardRef" +(1368:20-1368:28) "(render)" --> (811:22-811:30) "(render)" +(1368:28-1369:2) " {\n " --> (811:30-812:3) " {\n\t\t" +(1369:2-1370:4) " {\n " --> (812:3-813:0) "\t{" +(1370:4-1370:8) " if " --> (813:0-813:8) "\n\t\t\t\tif " +(1370:8-1370:18) "(render !=" --> (813:8-813:18) "(render !=" +(1370:18-1370:26) " null &&" --> (813:18-813:26) " null &&" +(1370:26-1370:33) " render" --> (813:26-813:33) " render" +(1370:33-1370:46) ".$$typeof ===" --> (813:33-813:46) ".$$typeof ===" +(1370:46-1370:63) " REACT_MEMO_TYPE)" --> (813:46-813:63) " REACT_MEMO_TYPE)" +(1370:63-1371:6) " {\n " --> (813:63-814:0) " {" +(1371:6-1371:12) " error" --> (814:0-814:11) "\n\t\t\t\t\terror" +(1371:12-1371:77) "('forwardRef requires a render function but received a `memo` ' +" --> (814:11-814:76) "(\"forwardRef requires a render function but received a `memo` \" +" +(1371:77-1371:131) " 'component. Instead of forwardRef(memo(...)), use ' +" --> (814:76-814:130) " \"component. Instead of forwardRef(memo(...)), use \" +" +(1371:131-1371:156) " 'memo(forwardRef(...)).'" --> (814:130-814:155) " \"memo(forwardRef(...)).\"" +(1371:156-1372:5) ");\n " --> (814:155-815:4) ");\n\t\t\t" +(1372:5-1372:22) "} else if (typeof" --> (815:4-815:22) "\t} else if (typeof" +(1372:22-1372:33) " render !==" --> (815:22-815:33) " render !==" +(1372:33-1372:45) " 'function')" --> (815:33-815:45) " \"function\")" +(1372:45-1373:6) " {\n " --> (815:45-816:0) " {" +(1373:6-1373:12) " error" --> (816:0-816:11) "\n\t\t\t\t\terror" +(1373:12-1373:71) "('forwardRef requires a render function but was given %s.'," --> (816:11-816:70) "(\"forwardRef requires a render function but was given %s.\"," +(1373:71-1373:82) " render ===" --> (816:70-816:81) " render ===" +(1373:82-1373:89) " null ?" --> (816:81-816:88) " null ?" +(1373:89-1373:105) " 'null' : typeof" --> (816:88-816:104) " \"null\" : typeof" +(1373:105-1373:112) " render" --> (816:104-816:111) " render" +(1373:112-1374:5) ");\n " --> (816:111-817:4) ");\n\t\t\t" +(1374:5-1374:11) "} else" --> (817:4-817:11) "\t} else" +(1374:11-1375:6) " {\n " --> (817:11-818:0) " {" +(1375:6-1375:10) " if " --> (818:0-818:9) "\n\t\t\t\t\tif " +(1375:10-1375:17) "(render" --> (818:9-818:16) "(render" +(1375:17-1375:28) ".length !==" --> (818:16-818:27) ".length !==" +(1375:28-1375:33) " 0 &&" --> (818:27-818:32) " 0 &&" +(1375:33-1375:40) " render" --> (818:32-818:39) " render" +(1375:40-1375:51) ".length !==" --> (818:39-818:50) ".length !==" +(1375:51-1375:54) " 2)" --> (818:50-818:53) " 2)" +(1375:54-1376:8) " {\n " --> (818:53-819:0) " {" +(1376:8-1376:14) " error" --> (819:0-819:12) "\n\t\t\t\t\t\terror" +(1376:14-1376:94) "('forwardRef render functions accept exactly two parameters: props and ref. %s'," --> (819:12-819:92) "(\"forwardRef render functions accept exactly two parameters: props and ref. %s\"," +(1376:94-1376:101) " render" --> (819:92-819:99) " render" +(1376:101-1376:112) ".length ===" --> (819:99-819:110) ".length ===" +(1376:112-1376:116) " 1 ?" --> (819:110-819:114) " 1 ?" +(1376:116-1376:161) " 'Did you forget to use the ref parameter?' :" --> (819:114-819:159) " \"Did you forget to use the ref parameter?\" :" +(1376:161-1376:207) " 'Any additional parameter will be undefined.'" --> (819:159-819:205) " \"Any additional parameter will be undefined.\"" +(1376:207-1377:7) ");\n " --> (819:205-820:5) ");\n\t\t\t\t" +(1377:7-1378:5) "}\n " --> (820:5-821:4) "\t}\n\t\t\t" +(1378:5-1380:4) "}\n\n " --> (821:4-822:0) "\t}" +(1380:4-1380:8) " if " --> (822:0-822:8) "\n\t\t\t\tif " +(1380:8-1380:18) "(render !=" --> (822:8-822:18) "(render !=" +(1380:18-1380:24) " null)" --> (822:18-822:24) " null)" +(1380:24-1381:6) " {\n " --> (822:24-823:0) " {" +(1381:6-1381:10) " if " --> (823:0-823:9) "\n\t\t\t\t\tif " +(1381:10-1381:17) "(render" --> (823:9-823:16) "(render" +(1381:17-1381:33) ".defaultProps !=" --> (823:16-823:32) ".defaultProps !=" +(1381:33-1381:41) " null ||" --> (823:32-823:40) " null ||" +(1381:41-1381:48) " render" --> (823:40-823:47) " render" +(1381:48-1381:61) ".propTypes !=" --> (823:47-823:60) ".propTypes !=" +(1381:61-1381:67) " null)" --> (823:60-823:66) " null)" +(1381:67-1382:8) " {\n " --> (823:66-824:0) " {" +(1382:8-1382:14) " error" --> (824:0-824:12) "\n\t\t\t\t\t\terror" +(1382:14-1382:89) "('forwardRef render functions do not support propTypes or defaultProps. ' +" --> (824:12-824:87) "(\"forwardRef render functions do not support propTypes or defaultProps. \" +" +(1382:89-1382:136) " 'Did you accidentally pass a React component?'" --> (824:87-824:134) " \"Did you accidentally pass a React component?\"" +(1382:136-1383:7) ");\n " --> (824:134-825:5) ");\n\t\t\t\t" +(1383:7-1384:5) "}\n " --> (825:5-826:4) "\t}\n\t\t\t" +(1384:5-1385:3) "}\n " --> (826:4-827:3) "\t}\n\t\t" +(1385:3-1387:2) "}\n\n " --> (827:3-828:3) "\t}\n\t\t" +(1387:2-1387:6) " var" --> (828:3-828:7) "\tvar" +(1387:6-1387:20) " elementType =" --> (828:7-828:21) " elementType =" +(1387:20-1388:4) " {\n " --> (828:21-829:4) " {\n\t\t\t" +(1388:4-1388:14) " $$typeof:" --> (829:4-829:14) "\t$$typeof:" +(1388:14-1389:12) " REACT_FORWARD_REF_TYPE,\n render:" --> (829:14-830:4) " REACT_FORWARD_REF_TYPE,\n\t\t\t" +(1389:12-1390:3) " render\n " --> (830:4-831:3) "\trender\n\t\t" +(1390:3-1392:2) "};\n\n " --> (831:3-832:3) "\t};\n\t\t" +(1392:2-1393:4) " {\n " --> (832:3-833:4) "\t{\n\t\t\t" +(1393:4-1393:8) " var" --> (833:4-833:8) "\tvar" +(1393:8-1394:4) " ownName;\n " --> (833:8-834:0) " ownName;" +(1394:4-1394:11) " Object" --> (834:0-834:11) "\n\t\t\t\tObject" +(1394:11-1394:26) ".defineProperty" --> (834:11-834:26) ".defineProperty" +(1394:26-1394:39) "(elementType," --> (834:26-834:39) "(elementType," +(1394:39-1394:54) " 'displayName'," --> (834:39-834:54) " \"displayName\"," +(1394:54-1395:6) " {\n " --> (834:54-835:5) " {\n\t\t\t\t" +(1395:6-1395:18) " enumerable:" --> (835:5-835:17) "\tenumerable:" +(1395:18-1396:6) " false,\n " --> (835:17-836:5) " false,\n\t\t\t\t" +(1396:6-1396:20) " configurable:" --> (836:5-836:19) "\tconfigurable:" +(1396:20-1397:6) " true,\n " --> (836:19-837:5) " true,\n\t\t\t\t" +(1397:6-1397:11) " get:" --> (837:5-837:10) "\tget:" +(1397:11-1397:23) " function ()" --> (837:10-837:21) " function()" +(1397:23-1398:8) " {\n " --> (837:21-838:0) " {" +(1398:8-1398:15) " return" --> (838:0-838:13) "\n\t\t\t\t\t\treturn" +(1398:15-1399:7) " ownName;\n " --> (838:13-839:5) " ownName;\n\t\t\t\t" +(1399:7-1400:6) "},\n " --> (839:5-840:5) "\t},\n\t\t\t\t" +(1400:6-1400:11) " set:" --> (840:5-840:10) "\tset:" +(1400:11-1400:21) " function " --> (840:10-840:19) " function" +(1400:21-1400:27) "(name)" --> (840:19-840:25) "(name)" +(1400:27-1401:8) " {\n " --> (840:25-841:0) " {" +(1401:8-1401:18) " ownName =" --> (841:0-841:16) "\n\t\t\t\t\t\townName =" +(1401:18-1403:8) " name;\n\n " --> (841:16-842:0) " name;" +(1403:8-1403:12) " if " --> (842:0-842:10) "\n\t\t\t\t\t\tif " +(1403:12-1403:19) "(render" --> (842:10-842:17) "(render" +(1403:19-1403:34) ".displayName ==" --> (842:17-842:32) ".displayName ==" +(1403:34-1403:40) " null)" --> (842:32-842:38) " null)" +(1403:40-1404:10) " {\n " --> (842:38-843:0) " {" +(1404:10-1404:17) " render" --> (843:0-843:14) "\n\t\t\t\t\t\t\trender" +(1404:17-1404:31) ".displayName =" --> (843:14-843:28) ".displayName =" +(1404:31-1405:9) " name;\n " --> (843:28-844:6) " name;\n\t\t\t\t\t" +(1405:9-1406:7) "}\n " --> (844:6-845:5) "\t}\n\t\t\t\t" +(1406:7-1407:5) "}\n " --> (845:5-846:4) "\t}\n\t\t\t" +(1407:5-1407:6) "}" --> (846:4-846:6) "\t}" +(1407:6-1408:3) ");\n " --> (846:6-847:3) ");\n\t\t" +(1408:3-1410:2) "}\n\n " --> (847:3-848:0) "\t}" +(1410:2-1410:9) " return" --> (848:0-848:10) "\n\t\t\treturn" +(1410:9-1411:1) " elementType;\n" --> (848:10-849:2) " elementType;\n\t" +(1411:1-1415:0) "}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n" --> (849:2-850:2) "\t}\n\t" +(1415:0-1415:4) "\nvar" --> (850:2-850:6) "\tvar" +(1415:4-1415:21) " enableScopeAPI =" --> (850:6-850:23) " enableScopeAPI =" +(1415:21-1417:0) " false; // Experimental Create Event Handle API.\n" --> (850:23-851:2) " false;\n\t" +(1417:0-1417:9) "\nfunction" --> (851:2-851:11) "\tfunction" +(1417:9-1417:28) " isValidElementType" --> (851:11-851:30) " isValidElementType" +(1417:28-1417:34) "(type)" --> (851:30-851:36) "(type)" +(1417:34-1418:2) " {\n " --> (851:36-852:0) " {" +(1418:2-1418:13) " if (typeof" --> (852:0-852:14) "\n\t\t\tif (typeof" +(1418:13-1418:22) " type ===" --> (852:14-852:23) " type ===" +(1418:22-1418:41) " 'string' || typeof" --> (852:23-852:42) " \"string\" || typeof" +(1418:41-1418:50) " type ===" --> (852:42-852:51) " type ===" +(1418:50-1418:62) " 'function')" --> (852:51-852:63) " \"function\")" +(1418:62-1419:4) " {\n " --> (852:63-853:0) " {" +(1419:4-1419:11) " return" --> (853:0-853:11) "\n\t\t\t\treturn" +(1419:11-1420:3) " true;\n " --> (853:11-854:3) " true;\n\t\t" +(1420:3-1423:2) "} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n " --> (854:3-855:0) "\t}" +(1423:2-1423:6) " if " --> (855:0-855:7) "\n\t\t\tif " +(1423:6-1423:15) "(type ===" --> (855:7-855:16) "(type ===" +(1423:15-1423:23) " exports" --> (855:16-855:24) " exports" +(1423:23-1423:35) ".Fragment ||" --> (855:24-855:36) ".Fragment ||" +(1423:35-1423:44) " type ===" --> (855:36-855:45) " type ===" +(1423:44-1423:52) " exports" --> (855:45-855:53) " exports" +(1423:52-1423:64) ".Profiler ||" --> (855:53-855:65) ".Profiler ||" +(1423:64-1423:73) " type ===" --> (855:65-855:74) " type ===" +(1423:73-1423:106) " REACT_DEBUG_TRACING_MODE_TYPE ||" --> (855:74-855:107) " REACT_DEBUG_TRACING_MODE_TYPE ||" +(1423:106-1423:115) " type ===" --> (855:107-855:116) " type ===" +(1423:115-1423:123) " exports" --> (855:116-855:124) " exports" +(1423:123-1423:137) ".StrictMode ||" --> (855:124-855:138) ".StrictMode ||" +(1423:137-1423:146) " type ===" --> (855:138-855:147) " type ===" +(1423:146-1423:154) " exports" --> (855:147-855:155) " exports" +(1423:154-1423:166) ".Suspense ||" --> (855:155-855:167) ".Suspense ||" +(1423:166-1423:175) " type ===" --> (855:167-855:176) " type ===" +(1423:175-1423:203) " REACT_SUSPENSE_LIST_TYPE ||" --> (855:176-855:204) " REACT_SUSPENSE_LIST_TYPE ||" +(1423:203-1423:212) " type ===" --> (855:204-855:213) " type ===" +(1423:212-1423:240) " REACT_LEGACY_HIDDEN_TYPE ||" --> (855:213-855:241) " REACT_LEGACY_HIDDEN_TYPE ||" +(1423:240-1423:257) " enableScopeAPI )" --> (855:241-855:257) " enableScopeAPI)" +(1423:257-1424:4) " {\n " --> (855:257-856:0) " {" +(1424:4-1424:11) " return" --> (856:0-856:11) "\n\t\t\t\treturn" +(1424:11-1425:3) " true;\n " --> (856:11-857:3) " true;\n\t\t" +(1425:3-1427:2) "}\n\n " --> (857:3-858:0) "\t}" +(1427:2-1427:13) " if (typeof" --> (858:0-858:14) "\n\t\t\tif (typeof" +(1427:13-1427:22) " type ===" --> (858:14-858:23) " type ===" +(1427:22-1427:34) " 'object' &&" --> (858:23-858:35) " \"object\" &&" +(1427:34-1427:43) " type !==" --> (858:35-858:44) " type !==" +(1427:43-1427:49) " null)" --> (858:44-858:50) " null)" +(1427:49-1428:4) " {\n " --> (858:50-859:0) " {" +(1428:4-1428:8) " if " --> (859:0-859:8) "\n\t\t\t\tif " +(1428:8-1428:13) "(type" --> (859:8-859:13) "(type" +(1428:13-1428:26) ".$$typeof ===" --> (859:13-859:26) ".$$typeof ===" +(1428:26-1428:45) " REACT_LAZY_TYPE ||" --> (859:26-859:45) " REACT_LAZY_TYPE ||" +(1428:45-1428:50) " type" --> (859:45-859:50) " type" +(1428:50-1428:63) ".$$typeof ===" --> (859:50-859:63) ".$$typeof ===" +(1428:63-1428:82) " REACT_MEMO_TYPE ||" --> (859:63-859:82) " REACT_MEMO_TYPE ||" +(1428:82-1428:87) " type" --> (859:82-859:87) " type" +(1428:87-1428:100) ".$$typeof ===" --> (859:87-859:100) ".$$typeof ===" +(1428:100-1428:123) " REACT_PROVIDER_TYPE ||" --> (859:100-859:123) " REACT_PROVIDER_TYPE ||" +(1428:123-1428:128) " type" --> (859:123-859:128) " type" +(1428:128-1428:141) ".$$typeof ===" --> (859:128-859:141) ".$$typeof ===" +(1428:141-1428:163) " REACT_CONTEXT_TYPE ||" --> (859:141-859:163) " REACT_CONTEXT_TYPE ||" +(1428:163-1428:168) " type" --> (859:163-859:168) " type" +(1428:168-1428:181) ".$$typeof ===" --> (859:168-859:181) ".$$typeof ===" +(1428:181-1428:207) " REACT_FORWARD_REF_TYPE ||" --> (859:181-859:207) " REACT_FORWARD_REF_TYPE ||" +(1428:207-1428:212) " type" --> (859:207-859:212) " type" +(1428:212-1428:225) ".$$typeof ===" --> (859:212-859:225) ".$$typeof ===" +(1428:225-1428:251) " REACT_FUNDAMENTAL_TYPE ||" --> (859:225-859:251) " REACT_FUNDAMENTAL_TYPE ||" +(1428:251-1428:256) " type" --> (859:251-859:256) " type" +(1428:256-1428:269) ".$$typeof ===" --> (859:256-859:269) ".$$typeof ===" +(1428:269-1428:289) " REACT_BLOCK_TYPE ||" --> (859:269-859:289) " REACT_BLOCK_TYPE ||" +(1428:289-1428:294) " type" --> (859:289-859:294) " type" +(1428:294-1428:301) "[0] ===" --> (859:294-859:301) "[0] ===" +(1428:301-1428:326) " REACT_SERVER_BLOCK_TYPE)" --> (859:301-859:326) " REACT_SERVER_BLOCK_TYPE)" +(1428:326-1429:6) " {\n " --> (859:326-860:0) " {" +(1429:6-1429:13) " return" --> (860:0-860:12) "\n\t\t\t\t\treturn" +(1429:13-1430:5) " true;\n " --> (860:12-861:4) " true;\n\t\t\t" +(1430:5-1431:3) "}\n " --> (861:4-862:3) "\t}\n\t\t" +(1431:3-1433:2) "}\n\n " --> (862:3-863:0) "\t}" +(1433:2-1433:9) " return" --> (863:0-863:10) "\n\t\t\treturn" +(1433:9-1434:1) " false;\n" --> (863:10-864:2) " false;\n\t" +(1434:1-1436:0) "}\n" --> (864:2-865:2) "\t}\n\t" +(1436:0-1436:9) "\nfunction" --> (865:2-865:11) "\tfunction" +(1436:9-1436:14) " memo" --> (865:11-865:16) " memo" +(1436:14-1436:20) "(type," --> (865:16-865:22) "(type," +(1436:20-1436:29) " compare)" --> (865:22-865:31) " compare)" +(1436:29-1437:2) " {\n " --> (865:31-866:3) " {\n\t\t" +(1437:2-1438:4) " {\n " --> (866:3-867:0) "\t{" +(1438:4-1438:9) " if (" --> (867:0-867:9) "\n\t\t\t\tif (" +(1438:9-1438:28) "!isValidElementType" --> (867:9-867:28) "!isValidElementType" +(1438:28-1438:33) "(type" --> (867:28-867:33) "(type" +(1438:33-1438:35) "))" --> (867:33-867:35) "))" +(1438:35-1439:6) " {\n " --> (867:35-868:0) " {" +(1439:6-1439:12) " error" --> (868:0-868:11) "\n\t\t\t\t\terror" +(1439:12-1439:71) "('memo: The first argument must be a component. Instead ' +" --> (868:11-868:70) "(\"memo: The first argument must be a component. Instead \" +" +(1439:71-1439:87) " 'received: %s'," --> (868:70-868:86) " \"received: %s\"," +(1439:87-1439:96) " type ===" --> (868:86-868:95) " type ===" +(1439:96-1439:103) " null ?" --> (868:95-868:102) " null ?" +(1439:103-1439:119) " 'null' : typeof" --> (868:102-868:118) " \"null\" : typeof" +(1439:119-1439:124) " type" --> (868:118-868:123) " type" +(1439:124-1440:5) ");\n " --> (868:123-869:4) ");\n\t\t\t" +(1440:5-1441:3) "}\n " --> (869:4-870:3) "\t}\n\t\t" +(1441:3-1443:2) "}\n\n " --> (870:3-871:3) "\t}\n\t\t" +(1443:2-1443:6) " var" --> (871:3-871:7) "\tvar" +(1443:6-1443:20) " elementType =" --> (871:7-871:21) " elementType =" +(1443:20-1444:4) " {\n " --> (871:21-872:4) " {\n\t\t\t" +(1444:4-1444:14) " $$typeof:" --> (872:4-872:14) "\t$$typeof:" +(1444:14-1445:10) " REACT_MEMO_TYPE,\n type:" --> (872:14-873:4) " REACT_MEMO_TYPE,\n\t\t\t" +(1445:10-1446:4) " type,\n " --> (873:4-874:4) "\ttype,\n\t\t\t" +(1446:4-1446:13) " compare:" --> (874:4-874:13) "\tcompare:" +(1446:13-1446:25) " compare ===" --> (874:13-874:25) " compare ===" +(1446:25-1446:37) " undefined ?" --> (874:25-874:37) " undefined ?" +(1446:37-1446:44) " null :" --> (874:37-874:44) " null :" +(1446:44-1447:3) " compare\n " --> (874:44-875:3) " compare\n\t\t" +(1447:3-1449:2) "};\n\n " --> (875:3-876:3) "\t};\n\t\t" +(1449:2-1450:4) " {\n " --> (876:3-877:4) "\t{\n\t\t\t" +(1450:4-1450:8) " var" --> (877:4-877:8) "\tvar" +(1450:8-1451:4) " ownName;\n " --> (877:8-878:0) " ownName;" +(1451:4-1451:11) " Object" --> (878:0-878:11) "\n\t\t\t\tObject" +(1451:11-1451:26) ".defineProperty" --> (878:11-878:26) ".defineProperty" +(1451:26-1451:39) "(elementType," --> (878:26-878:39) "(elementType," +(1451:39-1451:54) " 'displayName'," --> (878:39-878:54) " \"displayName\"," +(1451:54-1452:6) " {\n " --> (878:54-879:5) " {\n\t\t\t\t" +(1452:6-1452:18) " enumerable:" --> (879:5-879:17) "\tenumerable:" +(1452:18-1453:6) " false,\n " --> (879:17-880:5) " false,\n\t\t\t\t" +(1453:6-1453:20) " configurable:" --> (880:5-880:19) "\tconfigurable:" +(1453:20-1454:6) " true,\n " --> (880:19-881:5) " true,\n\t\t\t\t" +(1454:6-1454:11) " get:" --> (881:5-881:10) "\tget:" +(1454:11-1454:23) " function ()" --> (881:10-881:21) " function()" +(1454:23-1455:8) " {\n " --> (881:21-882:0) " {" +(1455:8-1455:15) " return" --> (882:0-882:13) "\n\t\t\t\t\t\treturn" +(1455:15-1456:7) " ownName;\n " --> (882:13-883:5) " ownName;\n\t\t\t\t" +(1456:7-1457:6) "},\n " --> (883:5-884:5) "\t},\n\t\t\t\t" +(1457:6-1457:11) " set:" --> (884:5-884:10) "\tset:" +(1457:11-1457:21) " function " --> (884:10-884:19) " function" +(1457:21-1457:27) "(name)" --> (884:19-884:25) "(name)" +(1457:27-1458:8) " {\n " --> (884:25-885:0) " {" +(1458:8-1458:18) " ownName =" --> (885:0-885:16) "\n\t\t\t\t\t\townName =" +(1458:18-1460:8) " name;\n\n " --> (885:16-886:0) " name;" +(1460:8-1460:12) " if " --> (886:0-886:10) "\n\t\t\t\t\t\tif " +(1460:12-1460:17) "(type" --> (886:10-886:15) "(type" +(1460:17-1460:32) ".displayName ==" --> (886:15-886:30) ".displayName ==" +(1460:32-1460:38) " null)" --> (886:30-886:36) " null)" +(1460:38-1461:10) " {\n " --> (886:36-887:0) " {" +(1461:10-1461:15) " type" --> (887:0-887:12) "\n\t\t\t\t\t\t\ttype" +(1461:15-1461:29) ".displayName =" --> (887:12-887:26) ".displayName =" +(1461:29-1462:9) " name;\n " --> (887:26-888:6) " name;\n\t\t\t\t\t" +(1462:9-1463:7) "}\n " --> (888:6-889:5) "\t}\n\t\t\t\t" +(1463:7-1464:5) "}\n " --> (889:5-890:4) "\t}\n\t\t\t" +(1464:5-1464:6) "}" --> (890:4-890:6) "\t}" +(1464:6-1465:3) ");\n " --> (890:6-891:3) ");\n\t\t" +(1465:3-1467:2) "}\n\n " --> (891:3-892:0) "\t}" +(1467:2-1467:9) " return" --> (892:0-892:10) "\n\t\t\treturn" +(1467:9-1468:1) " elementType;\n" --> (892:10-893:2) " elementType;\n\t" +(1468:1-1470:0) "}\n" --> (893:2-894:2) "\t}\n\t" +(1470:0-1470:9) "\nfunction" --> (894:2-894:11) "\tfunction" +(1470:9-1470:29) " resolveDispatcher()" --> (894:11-894:31) " resolveDispatcher()" +(1470:29-1471:2) " {\n " --> (894:31-895:3) " {\n\t\t" +(1471:2-1471:6) " var" --> (895:3-895:7) "\tvar" +(1471:6-1471:19) " dispatcher =" --> (895:7-895:20) " dispatcher =" +(1471:19-1471:42) " ReactCurrentDispatcher" --> (895:20-895:43) " ReactCurrentDispatcher" +(1471:42-1473:2) ".current;\n\n " --> (895:43-896:0) ".current;" +(1473:2-1473:8) " if (!" --> (896:0-896:9) "\n\t\t\tif (!" +(1473:8-1473:23) "(dispatcher !==" --> (896:9-896:24) "(dispatcher !==" +(1473:23-1473:30) " null))" --> (896:24-896:31) " null))" +(1473:30-1474:4) " {\n " --> (896:31-897:4) " {\n\t\t\t" +(1474:4-1475:6) " {\n " --> (897:4-898:0) "\t{" +(1475:6-1475:12) " throw" --> (898:0-898:11) "\n\t\t\t\t\tthrow" +(1475:12-1475:19) " Error(" --> (898:11-898:17) " Error" +(1475:19-1475:454) " \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.\" " --> (898:17-898:451) "(\"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.\"" +(1475:454-1476:5) ");\n " --> (898:451-899:4) ");\n\t\t\t" +(1476:5-1477:3) "}\n " --> (899:4-900:3) "\t}\n\t\t" +(1477:3-1479:2) "}\n\n " --> (900:3-901:0) "\t}" +(1479:2-1479:9) " return" --> (901:0-901:10) "\n\t\t\treturn" +(1479:9-1480:1) " dispatcher;\n" --> (901:10-902:2) " dispatcher;\n\t" +(1480:1-1482:0) "}\n" --> (902:2-903:2) "\t}\n\t" +(1482:0-1482:9) "\nfunction" --> (903:2-903:11) "\tfunction" +(1482:9-1482:20) " useContext" --> (903:11-903:22) " useContext" +(1482:20-1482:29) "(Context," --> (903:22-903:31) "(Context," +(1482:29-1482:52) " unstable_observedBits)" --> (903:31-903:54) " unstable_observedBits)" +(1482:52-1483:2) " {\n " --> (903:54-904:3) " {\n\t\t" +(1483:2-1483:6) " var" --> (904:3-904:7) "\tvar" +(1483:6-1483:19) " dispatcher =" --> (904:7-904:20) " dispatcher =" +(1483:19-1483:38) " resolveDispatcher(" --> (904:20-904:39) " resolveDispatcher(" +(1483:38-1485:2) ");\n\n " --> (904:39-905:3) ");\n\t\t" +(1485:2-1486:4) " {\n " --> (905:3-906:0) "\t{" +(1486:4-1486:8) " if " --> (906:0-906:8) "\n\t\t\t\tif " +(1486:8-1486:34) "(unstable_observedBits !==" --> (906:8-906:34) "(unstable_observedBits !==" +(1486:34-1486:45) " undefined)" --> (906:34-906:45) " undefined)" +(1486:45-1487:6) " {\n " --> (906:45-907:0) " {" +(1487:6-1487:12) " error" --> (907:0-907:11) "\n\t\t\t\t\terror" +(1487:12-1487:69) "('useContext() second argument is reserved for future ' +" --> (907:11-907:68) "(\"useContext() second argument is reserved for future \" +" +(1487:69-1487:117) " 'use in React. Passing it is not supported. ' +" --> (907:68-907:116) " \"use in React. Passing it is not supported. \" +" +(1487:117-1487:138) " 'You passed: %s.%s'," --> (907:116-907:137) " \"You passed: %s.%s\"," +(1487:138-1487:168) " unstable_observedBits, typeof" --> (907:137-907:167) " unstable_observedBits, typeof" +(1487:168-1487:194) " unstable_observedBits ===" --> (907:167-907:193) " unstable_observedBits ===" +(1487:194-1487:206) " 'number' &&" --> (907:193-907:205) " \"number\" &&" +(1487:206-1487:212) " Array" --> (907:205-907:211) " Array" +(1487:212-1487:220) ".isArray" --> (907:211-907:219) ".isArray" +(1487:220-1487:230) "(arguments" --> (907:219-907:229) "(arguments" +(1487:230-1487:233) "[2]" --> (907:229-907:232) "[2]" +(1487:233-1487:236) ") ?" --> (907:232-907:235) ") ?" +(1487:236-1487:281) " '\\n\\nDid you call array.map(useContext)? ' +" --> (907:235-907:280) " \"\\n\\nDid you call array.map(useContext)? \" +" +(1487:281-1487:332) " 'Calling Hooks inside a loop is not supported. ' +" --> (907:280-907:331) " \"Calling Hooks inside a loop is not supported. \" +" +(1487:332-1487:390) " 'Learn more at https://reactjs.org/link/rules-of-hooks' :" --> (907:331-907:389) " \"Learn more at https://reactjs.org/link/rules-of-hooks\" :" +(1487:390-1487:393) " ''" --> (907:389-907:392) " \"\"" +(1487:393-1488:5) ");\n " --> (907:392-908:4) ");\n\t\t\t" +(1488:5-1491:4) "} // TODO: add a more generic warning for invalid values.\n\n\n " --> (908:4-909:0) "\t}" +(1491:4-1491:8) " if " --> (909:0-909:8) "\n\t\t\t\tif " +(1491:8-1491:16) "(Context" --> (909:8-909:16) "(Context" +(1491:16-1491:29) "._context !==" --> (909:16-909:29) "._context !==" +(1491:29-1491:40) " undefined)" --> (909:29-909:40) " undefined)" +(1491:40-1492:6) " {\n " --> (909:40-910:5) " {\n\t\t\t\t" +(1492:6-1492:10) " var" --> (910:5-910:9) "\tvar" +(1492:10-1492:24) " realContext =" --> (910:9-910:23) " realContext =" +(1492:24-1492:32) " Context" --> (910:23-910:31) " Context" +(1492:32-1495:6) "._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n " --> (910:31-911:0) "._context;" +(1495:6-1495:10) " if " --> (911:0-911:9) "\n\t\t\t\t\tif " +(1495:10-1495:22) "(realContext" --> (911:9-911:21) "(realContext" +(1495:22-1495:35) ".Consumer ===" --> (911:21-911:34) ".Consumer ===" +(1495:35-1495:44) " Context)" --> (911:34-911:43) " Context)" +(1495:44-1496:8) " {\n " --> (911:43-912:0) " {" +(1496:8-1496:14) " error" --> (912:0-912:12) "\n\t\t\t\t\t\terror" +(1496:14-1496:102) "('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' +" --> (912:12-912:100) "(\"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be \" +" +(1496:102-1496:189) " 'removed in a future major release. Did you mean to call useContext(Context) instead?'" --> (912:100-912:187) " \"removed in a future major release. Did you mean to call useContext(Context) instead?\"" +(1496:189-1497:7) ");\n " --> (912:187-913:5) ");\n\t\t\t\t" +(1497:7-1497:17) "} else if " --> (913:5-913:16) "\t} else if " +(1497:17-1497:29) "(realContext" --> (913:16-913:28) "(realContext" +(1497:29-1497:42) ".Provider ===" --> (913:28-913:41) ".Provider ===" +(1497:42-1497:51) " Context)" --> (913:41-913:50) " Context)" +(1497:51-1498:8) " {\n " --> (913:50-914:0) " {" +(1498:8-1498:14) " error" --> (914:0-914:12) "\n\t\t\t\t\t\terror" +(1498:14-1498:74) "('Calling useContext(Context.Provider) is not supported. ' +" --> (914:12-914:72) "(\"Calling useContext(Context.Provider) is not supported. \" +" +(1498:74-1498:126) " 'Did you mean to call useContext(Context) instead?'" --> (914:72-914:124) " \"Did you mean to call useContext(Context) instead?\"" +(1498:126-1499:7) ");\n " --> (914:124-915:5) ");\n\t\t\t\t" +(1499:7-1500:5) "}\n " --> (915:5-916:4) "\t}\n\t\t\t" +(1500:5-1501:3) "}\n " --> (916:4-917:3) "\t}\n\t\t" +(1501:3-1503:2) "}\n\n " --> (917:3-918:0) "\t}" +(1503:2-1503:9) " return" --> (918:0-918:10) "\n\t\t\treturn" +(1503:9-1503:20) " dispatcher" --> (918:10-918:21) " dispatcher" +(1503:20-1503:31) ".useContext" --> (918:21-918:32) ".useContext" +(1503:31-1503:40) "(Context," --> (918:32-918:41) "(Context," +(1503:40-1503:62) " unstable_observedBits" --> (918:41-918:63) " unstable_observedBits" +(1503:62-1504:1) ");\n" --> (918:63-919:2) ");\n\t" +(1504:1-1505:0) "}" --> (919:2-920:2) "\t}\n\t" +(1505:0-1505:9) "\nfunction" --> (920:2-920:11) "\tfunction" +(1505:9-1505:18) " useState" --> (920:11-920:20) " useState" +(1505:18-1505:32) "(initialState)" --> (920:20-920:34) "(initialState)" +(1505:32-1506:2) " {\n " --> (920:34-921:3) " {\n\t\t" +(1506:2-1506:6) " var" --> (921:3-921:7) "\tvar" +(1506:6-1506:19) " dispatcher =" --> (921:7-921:20) " dispatcher =" +(1506:19-1506:38) " resolveDispatcher(" --> (921:20-921:39) " resolveDispatcher(" +(1506:38-1507:2) ");\n " --> (921:39-922:0) ");" +(1507:2-1507:9) " return" --> (922:0-922:10) "\n\t\t\treturn" +(1507:9-1507:20) " dispatcher" --> (922:10-922:21) " dispatcher" +(1507:20-1507:29) ".useState" --> (922:21-922:30) ".useState" +(1507:29-1507:42) "(initialState" --> (922:30-922:43) "(initialState" +(1507:42-1508:1) ");\n" --> (922:43-923:2) ");\n\t" +(1508:1-1509:0) "}" --> (923:2-924:2) "\t}\n\t" +(1509:0-1509:9) "\nfunction" --> (924:2-924:11) "\tfunction" +(1509:9-1509:20) " useReducer" --> (924:11-924:22) " useReducer" +(1509:20-1509:29) "(reducer," --> (924:22-924:31) "(reducer," +(1509:29-1509:41) " initialArg," --> (924:31-924:43) " initialArg," +(1509:41-1509:47) " init)" --> (924:43-924:49) " init)" +(1509:47-1510:2) " {\n " --> (924:49-925:3) " {\n\t\t" +(1510:2-1510:6) " var" --> (925:3-925:7) "\tvar" +(1510:6-1510:19) " dispatcher =" --> (925:7-925:20) " dispatcher =" +(1510:19-1510:38) " resolveDispatcher(" --> (925:20-925:39) " resolveDispatcher(" +(1510:38-1511:2) ");\n " --> (925:39-926:0) ");" +(1511:2-1511:9) " return" --> (926:0-926:10) "\n\t\t\treturn" +(1511:9-1511:20) " dispatcher" --> (926:10-926:21) " dispatcher" +(1511:20-1511:31) ".useReducer" --> (926:21-926:32) ".useReducer" +(1511:31-1511:40) "(reducer," --> (926:32-926:41) "(reducer," +(1511:40-1511:52) " initialArg," --> (926:41-926:53) " initialArg," +(1511:52-1511:57) " init" --> (926:53-926:58) " init" +(1511:57-1512:1) ");\n" --> (926:58-927:2) ");\n\t" +(1512:1-1513:0) "}" --> (927:2-928:2) "\t}\n\t" +(1513:0-1513:9) "\nfunction" --> (928:2-928:11) "\tfunction" +(1513:9-1513:16) " useRef" --> (928:11-928:18) " useRef" +(1513:16-1513:30) "(initialValue)" --> (928:18-928:32) "(initialValue)" +(1513:30-1514:2) " {\n " --> (928:32-929:3) " {\n\t\t" +(1514:2-1514:6) " var" --> (929:3-929:7) "\tvar" +(1514:6-1514:19) " dispatcher =" --> (929:7-929:20) " dispatcher =" +(1514:19-1514:38) " resolveDispatcher(" --> (929:20-929:39) " resolveDispatcher(" +(1514:38-1515:2) ");\n " --> (929:39-930:0) ");" +(1515:2-1515:9) " return" --> (930:0-930:10) "\n\t\t\treturn" +(1515:9-1515:20) " dispatcher" --> (930:10-930:21) " dispatcher" +(1515:20-1515:27) ".useRef" --> (930:21-930:28) ".useRef" +(1515:27-1515:40) "(initialValue" --> (930:28-930:41) "(initialValue" +(1515:40-1516:1) ");\n" --> (930:41-931:2) ");\n\t" +(1516:1-1517:0) "}" --> (931:2-932:2) "\t}\n\t" +(1517:0-1517:9) "\nfunction" --> (932:2-932:11) "\tfunction" +(1517:9-1517:19) " useEffect" --> (932:11-932:21) " useEffect" +(1517:19-1517:27) "(create," --> (932:21-932:29) "(create," +(1517:27-1517:33) " deps)" --> (932:29-932:35) " deps)" +(1517:33-1518:2) " {\n " --> (932:35-933:3) " {\n\t\t" +(1518:2-1518:6) " var" --> (933:3-933:7) "\tvar" +(1518:6-1518:19) " dispatcher =" --> (933:7-933:20) " dispatcher =" +(1518:19-1518:38) " resolveDispatcher(" --> (933:20-933:39) " resolveDispatcher(" +(1518:38-1519:2) ");\n " --> (933:39-934:0) ");" +(1519:2-1519:9) " return" --> (934:0-934:10) "\n\t\t\treturn" +(1519:9-1519:20) " dispatcher" --> (934:10-934:21) " dispatcher" +(1519:20-1519:30) ".useEffect" --> (934:21-934:31) ".useEffect" +(1519:30-1519:38) "(create," --> (934:31-934:39) "(create," +(1519:38-1519:43) " deps" --> (934:39-934:44) " deps" +(1519:43-1520:1) ");\n" --> (934:44-935:2) ");\n\t" +(1520:1-1521:0) "}" --> (935:2-936:2) "\t}\n\t" +(1521:0-1521:9) "\nfunction" --> (936:2-936:11) "\tfunction" +(1521:9-1521:25) " useLayoutEffect" --> (936:11-936:27) " useLayoutEffect" +(1521:25-1521:33) "(create," --> (936:27-936:35) "(create," +(1521:33-1521:39) " deps)" --> (936:35-936:41) " deps)" +(1521:39-1522:2) " {\n " --> (936:41-937:3) " {\n\t\t" +(1522:2-1522:6) " var" --> (937:3-937:7) "\tvar" +(1522:6-1522:19) " dispatcher =" --> (937:7-937:20) " dispatcher =" +(1522:19-1522:38) " resolveDispatcher(" --> (937:20-937:39) " resolveDispatcher(" +(1522:38-1523:2) ");\n " --> (937:39-938:0) ");" +(1523:2-1523:9) " return" --> (938:0-938:10) "\n\t\t\treturn" +(1523:9-1523:20) " dispatcher" --> (938:10-938:21) " dispatcher" +(1523:20-1523:36) ".useLayoutEffect" --> (938:21-938:37) ".useLayoutEffect" +(1523:36-1523:44) "(create," --> (938:37-938:45) "(create," +(1523:44-1523:49) " deps" --> (938:45-938:50) " deps" +(1523:49-1524:1) ");\n" --> (938:50-939:2) ");\n\t" +(1524:1-1525:0) "}" --> (939:2-940:2) "\t}\n\t" +(1525:0-1525:9) "\nfunction" --> (940:2-940:11) "\tfunction" +(1525:9-1525:21) " useCallback" --> (940:11-940:23) " useCallback" +(1525:21-1525:31) "(callback," --> (940:23-940:33) "(callback," +(1525:31-1525:37) " deps)" --> (940:33-940:39) " deps)" +(1525:37-1526:2) " {\n " --> (940:39-941:3) " {\n\t\t" +(1526:2-1526:6) " var" --> (941:3-941:7) "\tvar" +(1526:6-1526:19) " dispatcher =" --> (941:7-941:20) " dispatcher =" +(1526:19-1526:38) " resolveDispatcher(" --> (941:20-941:39) " resolveDispatcher(" +(1526:38-1527:2) ");\n " --> (941:39-942:0) ");" +(1527:2-1527:9) " return" --> (942:0-942:10) "\n\t\t\treturn" +(1527:9-1527:20) " dispatcher" --> (942:10-942:21) " dispatcher" +(1527:20-1527:32) ".useCallback" --> (942:21-942:33) ".useCallback" +(1527:32-1527:42) "(callback," --> (942:33-942:43) "(callback," +(1527:42-1527:47) " deps" --> (942:43-942:48) " deps" +(1527:47-1528:1) ");\n" --> (942:48-943:2) ");\n\t" +(1528:1-1529:0) "}" --> (943:2-944:2) "\t}\n\t" +(1529:0-1529:9) "\nfunction" --> (944:2-944:11) "\tfunction" +(1529:9-1529:17) " useMemo" --> (944:11-944:19) " useMemo" +(1529:17-1529:25) "(create," --> (944:19-944:27) "(create," +(1529:25-1529:31) " deps)" --> (944:27-944:33) " deps)" +(1529:31-1530:2) " {\n " --> (944:33-945:3) " {\n\t\t" +(1530:2-1530:6) " var" --> (945:3-945:7) "\tvar" +(1530:6-1530:19) " dispatcher =" --> (945:7-945:20) " dispatcher =" +(1530:19-1530:38) " resolveDispatcher(" --> (945:20-945:39) " resolveDispatcher(" +(1530:38-1531:2) ");\n " --> (945:39-946:0) ");" +(1531:2-1531:9) " return" --> (946:0-946:10) "\n\t\t\treturn" +(1531:9-1531:20) " dispatcher" --> (946:10-946:21) " dispatcher" +(1531:20-1531:28) ".useMemo" --> (946:21-946:29) ".useMemo" +(1531:28-1531:36) "(create," --> (946:29-946:37) "(create," +(1531:36-1531:41) " deps" --> (946:37-946:42) " deps" +(1531:41-1532:1) ");\n" --> (946:42-947:2) ");\n\t" +(1532:1-1533:0) "}" --> (947:2-948:2) "\t}\n\t" +(1533:0-1533:9) "\nfunction" --> (948:2-948:11) "\tfunction" +(1533:9-1533:29) " useImperativeHandle" --> (948:11-948:31) " useImperativeHandle" +(1533:29-1533:34) "(ref," --> (948:31-948:36) "(ref," +(1533:34-1533:42) " create," --> (948:36-948:44) " create," +(1533:42-1533:48) " deps)" --> (948:44-948:50) " deps)" +(1533:48-1534:2) " {\n " --> (948:50-949:3) " {\n\t\t" +(1534:2-1534:6) " var" --> (949:3-949:7) "\tvar" +(1534:6-1534:19) " dispatcher =" --> (949:7-949:20) " dispatcher =" +(1534:19-1534:38) " resolveDispatcher(" --> (949:20-949:39) " resolveDispatcher(" +(1534:38-1535:2) ");\n " --> (949:39-950:0) ");" +(1535:2-1535:9) " return" --> (950:0-950:10) "\n\t\t\treturn" +(1535:9-1535:20) " dispatcher" --> (950:10-950:21) " dispatcher" +(1535:20-1535:40) ".useImperativeHandle" --> (950:21-950:41) ".useImperativeHandle" +(1535:40-1535:45) "(ref," --> (950:41-950:46) "(ref," +(1535:45-1535:53) " create," --> (950:46-950:54) " create," +(1535:53-1535:58) " deps" --> (950:54-950:59) " deps" +(1535:58-1536:1) ");\n" --> (950:59-951:2) ");\n\t" +(1536:1-1537:0) "}" --> (951:2-952:2) "\t}\n\t" +(1537:0-1537:9) "\nfunction" --> (952:2-952:11) "\tfunction" +(1537:9-1537:23) " useDebugValue" --> (952:11-952:25) " useDebugValue" +(1537:23-1537:30) "(value," --> (952:25-952:32) "(value," +(1537:30-1537:43) " formatterFn)" --> (952:32-952:45) " formatterFn)" +(1537:43-1538:2) " {\n " --> (952:45-953:3) " {\n\t\t" +(1538:2-1539:4) " {\n " --> (953:3-954:4) "\t{\n\t\t\t" +(1539:4-1539:8) " var" --> (954:4-954:8) "\tvar" +(1539:8-1539:21) " dispatcher =" --> (954:8-954:21) " dispatcher =" +(1539:21-1539:40) " resolveDispatcher(" --> (954:21-954:40) " resolveDispatcher(" +(1539:40-1540:4) ");\n " --> (954:40-955:0) ");" +(1540:4-1540:11) " return" --> (955:0-955:11) "\n\t\t\t\treturn" +(1540:11-1540:22) " dispatcher" --> (955:11-955:22) " dispatcher" +(1540:22-1540:36) ".useDebugValue" --> (955:22-955:36) ".useDebugValue" +(1540:36-1540:43) "(value," --> (955:36-955:43) "(value," +(1540:43-1540:55) " formatterFn" --> (955:43-955:55) " formatterFn" +(1540:55-1541:3) ");\n " --> (955:55-956:3) ");\n\t\t" +(1541:3-1542:1) "}\n" --> (956:3-957:2) "\t}\n\t" +(1542:1-1548:0) "}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method." --> (957:2-958:2) "\t}\n\t" +(1548:0-1548:4) "\nvar" --> (958:2-958:6) "\tvar" +(1548:4-1548:20) " disabledDepth =" --> (958:6-958:22) " disabledDepth =" +(1548:20-1549:0) " 0;" --> (958:22-959:2) " 0;\n\t" +(1549:0-1549:4) "\nvar" --> (959:2-959:6) "\tvar" +(1549:4-1550:0) " prevLog;" --> (959:6-960:2) " prevLog;\n\t" +(1550:0-1550:4) "\nvar" --> (960:2-960:6) "\tvar" +(1550:4-1551:0) " prevInfo;" --> (960:6-961:2) " prevInfo;\n\t" +(1551:0-1551:4) "\nvar" --> (961:2-961:6) "\tvar" +(1551:4-1552:0) " prevWarn;" --> (961:6-962:2) " prevWarn;\n\t" +(1552:0-1552:4) "\nvar" --> (962:2-962:6) "\tvar" +(1552:4-1553:0) " prevError;" --> (962:6-963:2) " prevError;\n\t" +(1553:0-1553:4) "\nvar" --> (963:2-963:6) "\tvar" +(1553:4-1554:0) " prevGroup;" --> (963:6-964:2) " prevGroup;\n\t" +(1554:0-1554:4) "\nvar" --> (964:2-964:6) "\tvar" +(1554:4-1555:0) " prevGroupCollapsed;" --> (964:6-965:2) " prevGroupCollapsed;\n\t" +(1555:0-1555:4) "\nvar" --> (965:2-965:6) "\tvar" +(1555:4-1557:0) " prevGroupEnd;\n" --> (965:6-966:2) " prevGroupEnd;\n\t" +(1557:0-1557:9) "\nfunction" --> (966:2-966:11) "\tfunction" +(1557:9-1557:23) " disabledLog()" --> (966:11-966:25) " disabledLog()" +(1557:23-1557:25) " {" --> (966:25-966:26) " " +(1557:25-1559:0) "}\n" --> (966:26-967:0) "{}" +(1559:0-1559:12) "\ndisabledLog" --> (967:0-967:14) "\n\t\tdisabledLog" +(1559:12-1559:33) ".__reactDisabledLog =" --> (967:14-967:35) ".__reactDisabledLog =" +(1559:33-1560:0) " true;" --> (967:35-968:2) " true;\n\t" +(1560:0-1560:9) "\nfunction" --> (968:2-968:11) "\tfunction" +(1560:9-1560:23) " disableLogs()" --> (968:11-968:25) " disableLogs()" +(1560:23-1561:2) " {\n " --> (968:25-969:3) " {\n\t\t" +(1561:2-1562:4) " {\n " --> (969:3-970:0) "\t{" +(1562:4-1562:8) " if " --> (970:0-970:8) "\n\t\t\t\tif " +(1562:8-1562:26) "(disabledDepth ===" --> (970:8-970:26) "(disabledDepth ===" +(1562:26-1562:29) " 0)" --> (970:26-970:29) " 0)" +(1562:29-1564:6) " {\n /* eslint-disable react-internal/no-production-logging */\n " --> (970:29-971:0) " {" +(1564:6-1564:16) " prevLog =" --> (971:0-971:15) "\n\t\t\t\t\tprevLog =" +(1564:16-1564:24) " console" --> (971:15-971:23) " console" +(1564:24-1565:6) ".log;\n " --> (971:23-972:0) ".log;" +(1565:6-1565:17) " prevInfo =" --> (972:0-972:16) "\n\t\t\t\t\tprevInfo =" +(1565:17-1565:25) " console" --> (972:16-972:24) " console" +(1565:25-1566:6) ".info;\n " --> (972:24-973:0) ".info;" +(1566:6-1566:17) " prevWarn =" --> (973:0-973:16) "\n\t\t\t\t\tprevWarn =" +(1566:17-1566:25) " console" --> (973:16-973:24) " console" +(1566:25-1567:6) ".warn;\n " --> (973:24-974:0) ".warn;" +(1567:6-1567:18) " prevError =" --> (974:0-974:17) "\n\t\t\t\t\tprevError =" +(1567:18-1567:26) " console" --> (974:17-974:25) " console" +(1567:26-1568:6) ".error;\n " --> (974:25-975:0) ".error;" +(1568:6-1568:18) " prevGroup =" --> (975:0-975:17) "\n\t\t\t\t\tprevGroup =" +(1568:18-1568:26) " console" --> (975:17-975:25) " console" +(1568:26-1569:6) ".group;\n " --> (975:25-976:0) ".group;" +(1569:6-1569:27) " prevGroupCollapsed =" --> (976:0-976:26) "\n\t\t\t\t\tprevGroupCollapsed =" +(1569:27-1569:35) " console" --> (976:26-976:34) " console" +(1569:35-1570:6) ".groupCollapsed;\n " --> (976:34-977:0) ".groupCollapsed;" +(1570:6-1570:21) " prevGroupEnd =" --> (977:0-977:20) "\n\t\t\t\t\tprevGroupEnd =" +(1570:21-1570:29) " console" --> (977:20-977:28) " console" +(1570:29-1572:6) ".groupEnd; // https://github.com/facebook/react/issues/19099\n\n " --> (977:28-978:5) ".groupEnd;\n\t\t\t\t" +(1572:6-1572:10) " var" --> (978:5-978:9) "\tvar" +(1572:10-1572:18) " props =" --> (978:9-978:17) " props =" +(1572:18-1573:8) " {\n " --> (978:17-979:6) " {\n\t\t\t\t\t" +(1573:8-1573:22) " configurable:" --> (979:6-979:20) "\tconfigurable:" +(1573:22-1574:8) " true,\n " --> (979:20-980:6) " true,\n\t\t\t\t\t" +(1574:8-1574:20) " enumerable:" --> (980:6-980:18) "\tenumerable:" +(1574:20-1575:8) " true,\n " --> (980:18-981:6) " true,\n\t\t\t\t\t" +(1575:8-1575:15) " value:" --> (981:6-981:13) "\tvalue:" +(1575:15-1576:8) " disabledLog,\n " --> (981:13-982:6) " disabledLog,\n\t\t\t\t\t" +(1576:8-1576:18) " writable:" --> (982:6-982:16) "\twritable:" +(1576:18-1577:7) " true\n " --> (982:16-983:5) " true\n\t\t\t\t" +(1577:7-1579:6) "}; // $FlowFixMe Flow thinks console is immutable.\n\n " --> (983:5-984:0) "\t};" +(1579:6-1579:13) " Object" --> (984:0-984:12) "\n\t\t\t\t\tObject" +(1579:13-1579:30) ".defineProperties" --> (984:12-984:29) ".defineProperties" +(1579:30-1579:39) "(console," --> (984:29-984:38) "(console," +(1579:39-1580:8) " {\n " --> (984:38-985:6) " {\n\t\t\t\t\t" +(1580:8-1580:14) " info:" --> (985:6-985:12) "\tinfo:" +(1580:14-1581:8) " props,\n " --> (985:12-986:6) " props,\n\t\t\t\t\t" +(1581:8-1581:13) " log:" --> (986:6-986:11) "\tlog:" +(1581:13-1582:8) " props,\n " --> (986:11-987:6) " props,\n\t\t\t\t\t" +(1582:8-1582:14) " warn:" --> (987:6-987:12) "\twarn:" +(1582:14-1583:8) " props,\n " --> (987:12-988:6) " props,\n\t\t\t\t\t" +(1583:8-1583:15) " error:" --> (988:6-988:13) "\terror:" +(1583:15-1584:8) " props,\n " --> (988:13-989:6) " props,\n\t\t\t\t\t" +(1584:8-1584:15) " group:" --> (989:6-989:13) "\tgroup:" +(1584:15-1585:8) " props,\n " --> (989:13-990:6) " props,\n\t\t\t\t\t" +(1585:8-1585:24) " groupCollapsed:" --> (990:6-990:22) "\tgroupCollapsed:" +(1585:24-1586:8) " props,\n " --> (990:22-991:6) " props,\n\t\t\t\t\t" +(1586:8-1586:18) " groupEnd:" --> (991:6-991:16) "\tgroupEnd:" +(1586:18-1587:7) " props\n " --> (991:16-992:5) " props\n\t\t\t\t" +(1587:7-1587:8) "}" --> (992:5-992:7) "\t}" +(1587:8-1589:5) ");\n /* eslint-enable react-internal/no-production-logging */\n " --> (992:7-993:4) ");\n\t\t\t" +(1589:5-1591:4) "}\n\n " --> (993:4-994:0) "\t}" +(1591:4-1592:3) " disabledDepth++;\n " --> (994:0-995:3) "\n\t\t\t\tdisabledDepth++;\n\t\t" +(1592:3-1593:1) "}\n" --> (995:3-996:2) "\t}\n\t" +(1593:1-1594:0) "}" --> (996:2-997:2) "\t}\n\t" +(1594:0-1594:9) "\nfunction" --> (997:2-997:11) "\tfunction" +(1594:9-1594:24) " reenableLogs()" --> (997:11-997:26) " reenableLogs()" +(1594:24-1595:2) " {\n " --> (997:26-998:3) " {\n\t\t" +(1595:2-1596:4) " {\n " --> (998:3-999:0) "\t{" +(1596:4-1598:4) " disabledDepth--;\n\n " --> (999:0-1000:0) "\n\t\t\t\tdisabledDepth--;" +(1598:4-1598:8) " if " --> (1000:0-1000:8) "\n\t\t\t\tif " +(1598:8-1598:26) "(disabledDepth ===" --> (1000:8-1000:26) "(disabledDepth ===" +(1598:26-1598:29) " 0)" --> (1000:26-1000:29) " 0)" +(1598:29-1600:6) " {\n /* eslint-disable react-internal/no-production-logging */\n " --> (1000:29-1001:5) " {\n\t\t\t\t" +(1600:6-1600:10) " var" --> (1001:5-1001:9) "\tvar" +(1600:10-1600:18) " props =" --> (1001:9-1001:17) " props =" +(1600:18-1601:8) " {\n " --> (1001:17-1002:6) " {\n\t\t\t\t\t" +(1601:8-1601:22) " configurable:" --> (1002:6-1002:20) "\tconfigurable:" +(1601:22-1602:8) " true,\n " --> (1002:20-1003:6) " true,\n\t\t\t\t\t" +(1602:8-1602:20) " enumerable:" --> (1003:6-1003:18) "\tenumerable:" +(1602:20-1603:8) " true,\n " --> (1003:18-1004:6) " true,\n\t\t\t\t\t" +(1603:8-1603:18) " writable:" --> (1004:6-1004:16) "\twritable:" +(1603:18-1604:7) " true\n " --> (1004:16-1005:5) " true\n\t\t\t\t" +(1604:7-1606:6) "}; // $FlowFixMe Flow thinks console is immutable.\n\n " --> (1005:5-1006:0) "\t};" +(1606:6-1606:13) " Object" --> (1006:0-1006:12) "\n\t\t\t\t\tObject" +(1606:13-1606:30) ".defineProperties" --> (1006:12-1006:29) ".defineProperties" +(1606:30-1606:39) "(console," --> (1006:29-1006:38) "(console," +(1606:39-1607:8) " {\n " --> (1006:38-1007:6) " {\n\t\t\t\t\t" +(1607:8-1607:13) " log:" --> (1007:6-1007:11) "\tlog:" +(1607:13-1607:21) " _assign" --> (1007:11-1007:19) " _assign" +(1607:21-1607:23) "({" --> (1007:19-1007:20) "(" +(1607:23-1607:25) "}," --> (1007:20-1007:23) "{}," +(1607:25-1607:32) " props," --> (1007:23-1007:30) " props," +(1607:32-1608:10) " {\n " --> (1007:30-1007:32) " {" +(1608:10-1608:17) " value:" --> (1007:32-1007:39) " value:" +(1608:17-1609:9) " prevLog\n " --> (1007:39-1007:47) " prevLog" +(1609:9-1609:10) "}" --> (1007:47-1007:49) " }" +(1609:10-1610:8) "),\n " --> (1007:49-1008:6) "),\n\t\t\t\t\t" +(1610:8-1610:14) " info:" --> (1008:6-1008:12) "\tinfo:" +(1610:14-1610:22) " _assign" --> (1008:12-1008:20) " _assign" +(1610:22-1610:24) "({" --> (1008:20-1008:21) "(" +(1610:24-1610:26) "}," --> (1008:21-1008:24) "{}," +(1610:26-1610:33) " props," --> (1008:24-1008:31) " props," +(1610:33-1611:10) " {\n " --> (1008:31-1008:33) " {" +(1611:10-1611:17) " value:" --> (1008:33-1008:40) " value:" +(1611:17-1612:9) " prevInfo\n " --> (1008:40-1008:49) " prevInfo" +(1612:9-1612:10) "}" --> (1008:49-1008:51) " }" +(1612:10-1613:8) "),\n " --> (1008:51-1009:6) "),\n\t\t\t\t\t" +(1613:8-1613:14) " warn:" --> (1009:6-1009:12) "\twarn:" +(1613:14-1613:22) " _assign" --> (1009:12-1009:20) " _assign" +(1613:22-1613:24) "({" --> (1009:20-1009:21) "(" +(1613:24-1613:26) "}," --> (1009:21-1009:24) "{}," +(1613:26-1613:33) " props," --> (1009:24-1009:31) " props," +(1613:33-1614:10) " {\n " --> (1009:31-1009:33) " {" +(1614:10-1614:17) " value:" --> (1009:33-1009:40) " value:" +(1614:17-1615:9) " prevWarn\n " --> (1009:40-1009:49) " prevWarn" +(1615:9-1615:10) "}" --> (1009:49-1009:51) " }" +(1615:10-1616:8) "),\n " --> (1009:51-1010:6) "),\n\t\t\t\t\t" +(1616:8-1616:15) " error:" --> (1010:6-1010:13) "\terror:" +(1616:15-1616:23) " _assign" --> (1010:13-1010:21) " _assign" +(1616:23-1616:25) "({" --> (1010:21-1010:22) "(" +(1616:25-1616:27) "}," --> (1010:22-1010:25) "{}," +(1616:27-1616:34) " props," --> (1010:25-1010:32) " props," +(1616:34-1617:10) " {\n " --> (1010:32-1010:34) " {" +(1617:10-1617:17) " value:" --> (1010:34-1010:41) " value:" +(1617:17-1618:9) " prevError\n " --> (1010:41-1010:51) " prevError" +(1618:9-1618:10) "}" --> (1010:51-1010:53) " }" +(1618:10-1619:8) "),\n " --> (1010:53-1011:6) "),\n\t\t\t\t\t" +(1619:8-1619:15) " group:" --> (1011:6-1011:13) "\tgroup:" +(1619:15-1619:23) " _assign" --> (1011:13-1011:21) " _assign" +(1619:23-1619:25) "({" --> (1011:21-1011:22) "(" +(1619:25-1619:27) "}," --> (1011:22-1011:25) "{}," +(1619:27-1619:34) " props," --> (1011:25-1011:32) " props," +(1619:34-1620:10) " {\n " --> (1011:32-1011:34) " {" +(1620:10-1620:17) " value:" --> (1011:34-1011:41) " value:" +(1620:17-1621:9) " prevGroup\n " --> (1011:41-1011:51) " prevGroup" +(1621:9-1621:10) "}" --> (1011:51-1011:53) " }" +(1621:10-1622:8) "),\n " --> (1011:53-1012:6) "),\n\t\t\t\t\t" +(1622:8-1622:24) " groupCollapsed:" --> (1012:6-1012:22) "\tgroupCollapsed:" +(1622:24-1622:32) " _assign" --> (1012:22-1012:30) " _assign" +(1622:32-1622:34) "({" --> (1012:30-1012:31) "(" +(1622:34-1622:36) "}," --> (1012:31-1012:34) "{}," +(1622:36-1622:43) " props," --> (1012:34-1012:41) " props," +(1622:43-1623:10) " {\n " --> (1012:41-1012:43) " {" +(1623:10-1623:17) " value:" --> (1012:43-1012:50) " value:" +(1623:17-1624:9) " prevGroupCollapsed\n " --> (1012:50-1012:69) " prevGroupCollapsed" +(1624:9-1624:10) "}" --> (1012:69-1012:71) " }" +(1624:10-1625:8) "),\n " --> (1012:71-1013:6) "),\n\t\t\t\t\t" +(1625:8-1625:18) " groupEnd:" --> (1013:6-1013:16) "\tgroupEnd:" +(1625:18-1625:26) " _assign" --> (1013:16-1013:24) " _assign" +(1625:26-1625:28) "({" --> (1013:24-1013:25) "(" +(1625:28-1625:30) "}," --> (1013:25-1013:28) "{}," +(1625:30-1625:37) " props," --> (1013:28-1013:35) " props," +(1625:37-1626:10) " {\n " --> (1013:35-1013:37) " {" +(1626:10-1626:17) " value:" --> (1013:37-1013:44) " value:" +(1626:17-1627:9) " prevGroupEnd\n " --> (1013:44-1013:57) " prevGroupEnd" +(1627:9-1627:10) "}" --> (1013:57-1013:59) " }" +(1627:10-1628:7) ")\n " --> (1013:59-1014:5) ")\n\t\t\t\t" +(1628:7-1628:8) "}" --> (1014:5-1014:7) "\t}" +(1628:8-1630:5) ");\n /* eslint-enable react-internal/no-production-logging */\n " --> (1014:7-1015:4) ");\n\t\t\t" +(1630:5-1632:4) "}\n\n " --> (1015:4-1016:0) "\t}" +(1632:4-1632:8) " if " --> (1016:0-1016:8) "\n\t\t\t\tif " +(1632:8-1632:24) "(disabledDepth <" --> (1016:8-1016:24) "(disabledDepth <" +(1632:24-1632:27) " 0)" --> (1016:24-1016:27) " 0)" +(1632:27-1633:6) " {\n " --> (1016:27-1017:0) " {" +(1633:6-1633:12) " error" --> (1017:0-1017:11) "\n\t\t\t\t\terror" +(1633:12-1633:48) "('disabledDepth fell below zero. ' +" --> (1017:11-1017:47) "(\"disabledDepth fell below zero. \" +" +(1633:48-1633:96) " 'This is a bug in React. Please file an issue.'" --> (1017:47-1017:95) " \"This is a bug in React. Please file an issue.\"" +(1633:96-1634:5) ");\n " --> (1017:95-1018:4) ");\n\t\t\t" +(1634:5-1635:3) "}\n " --> (1018:4-1019:3) "\t}\n\t\t" +(1635:3-1636:1) "}\n" --> (1019:3-1020:2) "\t}\n\t" +(1636:1-1638:0) "}\n" --> (1020:2-1021:2) "\t}\n\t" +(1638:0-1638:4) "\nvar" --> (1021:2-1021:6) "\tvar" +(1638:4-1638:31) " ReactCurrentDispatcher$1 =" --> (1021:6-1021:33) " ReactCurrentDispatcher$1 =" +(1638:31-1638:52) " ReactSharedInternals" --> (1021:33-1021:54) " ReactSharedInternals" +(1638:52-1639:0) ".ReactCurrentDispatcher;" --> (1021:54-1022:2) ".ReactCurrentDispatcher;\n\t" +(1639:0-1639:4) "\nvar" --> (1022:2-1022:6) "\tvar" +(1639:4-1640:0) " prefix;" --> (1022:6-1023:2) " prefix;\n\t" +(1640:0-1640:9) "\nfunction" --> (1023:2-1023:11) "\tfunction" +(1640:9-1640:39) " describeBuiltInComponentFrame" --> (1023:11-1023:41) " describeBuiltInComponentFrame" +(1640:39-1640:45) "(name," --> (1023:41-1023:47) "(name," +(1640:45-1640:53) " source," --> (1023:47-1023:55) " source," +(1640:53-1640:62) " ownerFn)" --> (1023:55-1023:64) " ownerFn)" +(1640:62-1641:2) " {\n " --> (1023:64-1024:3) " {\n\t\t" +(1641:2-1642:4) " {\n " --> (1024:3-1025:0) "\t{" +(1642:4-1642:8) " if " --> (1025:0-1025:8) "\n\t\t\t\tif " +(1642:8-1642:19) "(prefix ===" --> (1025:8-1025:19) "(prefix ===" +(1642:19-1642:30) " undefined)" --> (1025:19-1025:30) " undefined)" +(1642:30-1644:6) " {\n // Extract the VM specific prefix used by each line.\n " --> (1025:30-1026:0) " {" +(1644:6-1644:10) " try" --> (1026:0-1026:9) "\n\t\t\t\t\ttry" +(1644:10-1645:8) " {\n " --> (1026:9-1027:0) " {" +(1645:8-1645:14) " throw" --> (1027:0-1027:12) "\n\t\t\t\t\t\tthrow" +(1645:14-1645:21) " Error(" --> (1027:12-1027:19) " Error(" +(1645:21-1646:7) ");\n " --> (1027:19-1028:5) ");\n\t\t\t\t" +(1646:7-1646:15) "} catch " --> (1028:5-1028:14) "\t} catch " +(1646:15-1646:18) "(x)" --> (1028:14-1028:17) "(x)" +(1646:18-1647:8) " {\n " --> (1028:17-1029:6) " {\n\t\t\t\t\t" +(1647:8-1647:12) " var" --> (1029:6-1029:10) "\tvar" +(1647:12-1647:20) " match =" --> (1029:10-1029:18) " match =" +(1647:20-1647:22) " x" --> (1029:18-1029:20) " x" +(1647:22-1647:28) ".stack" --> (1029:20-1029:26) ".stack" +(1647:28-1647:34) ".trim(" --> (1029:26-1029:32) ".trim(" +(1647:34-1647:35) ")" --> (1029:32-1029:33) ")" +(1647:35-1647:41) ".match" --> (1029:33-1029:39) ".match" +(1647:41-1647:56) "(/\\n( *(at )?)/" --> (1029:39-1029:54) "(/\\n( *(at )?)/" +(1647:56-1648:8) ");\n " --> (1029:54-1030:0) ");" +(1648:8-1648:17) " prefix =" --> (1030:0-1030:15) "\n\t\t\t\t\t\tprefix =" +(1648:17-1648:26) " match &&" --> (1030:15-1030:24) " match &&" +(1648:26-1648:32) " match" --> (1030:24-1030:30) " match" +(1648:32-1648:38) "[1] ||" --> (1030:30-1030:36) "[1] ||" +(1648:38-1649:7) " '';\n " --> (1030:36-1031:5) " \"\";\n\t\t\t\t" +(1649:7-1650:5) "}\n " --> (1031:5-1032:4) "\t}\n\t\t\t" +(1650:5-1653:4) "} // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n " --> (1032:4-1033:0) "\t}" +(1653:4-1653:11) " return" --> (1033:0-1033:11) "\n\t\t\t\treturn" +(1653:11-1653:18) " '\\n' +" --> (1033:11-1033:18) " \"\\n\" +" +(1653:18-1653:27) " prefix +" --> (1033:18-1033:27) " prefix +" +(1653:27-1654:3) " name;\n " --> (1033:27-1034:3) " name;\n\t\t" +(1654:3-1655:1) "}\n" --> (1034:3-1035:2) "\t}\n\t" +(1655:1-1656:0) "}" --> (1035:2-1036:2) "\t}\n\t" +(1656:0-1656:4) "\nvar" --> (1036:2-1036:6) "\tvar" +(1656:4-1656:14) " reentry =" --> (1036:6-1036:16) " reentry =" +(1656:14-1657:0) " false;" --> (1036:16-1037:2) " false;\n\t" +(1657:0-1657:4) "\nvar" --> (1037:2-1037:6) "\tvar" +(1657:4-1659:0) " componentFrameCache;\n" --> (1037:6-1038:2) " componentFrameCache;\n\t" +(1659:0-1660:2) "\n{\n " --> (1038:2-1039:3) "\t{\n\t\t" +(1660:2-1660:6) " var" --> (1039:3-1039:7) "\tvar" +(1660:6-1660:31) " PossiblyWeakMap = typeof" --> (1039:7-1039:32) " PossiblyWeakMap = typeof" +(1660:31-1660:43) " WeakMap ===" --> (1039:32-1039:44) " WeakMap ===" +(1660:43-1660:56) " 'function' ?" --> (1039:44-1039:57) " \"function\" ?" +(1660:56-1660:66) " WeakMap :" --> (1039:57-1039:67) " WeakMap :" +(1660:66-1661:2) " Map;\n " --> (1039:67-1040:0) " Map;" +(1661:2-1661:24) " componentFrameCache =" --> (1040:0-1040:25) "\n\t\t\tcomponentFrameCache =" +(1661:24-1661:28) " new" --> (1040:25-1040:29) " new" +(1661:28-1662:1) " PossiblyWeakMap();\n" --> (1040:29-1041:2) " PossiblyWeakMap();\n\t" +(1662:1-1664:0) "}\n" --> (1041:2-1042:2) "\t}\n\t" +(1664:0-1664:9) "\nfunction" --> (1042:2-1042:11) "\tfunction" +(1664:9-1664:38) " describeNativeComponentFrame" --> (1042:11-1042:40) " describeNativeComponentFrame" +(1664:38-1664:42) "(fn," --> (1042:40-1042:44) "(fn," +(1664:42-1664:53) " construct)" --> (1042:44-1042:55) " construct)" +(1664:53-1666:2) " {\n // If something asked for a stack inside a fake render, it should get ignored.\n " --> (1042:55-1043:0) " {" +(1666:2-1666:7) " if (" --> (1043:0-1043:8) "\n\t\t\tif (" +(1666:7-1666:13) "!fn ||" --> (1043:8-1043:14) "!fn ||" +(1666:13-1666:22) " reentry)" --> (1043:14-1043:23) " reentry)" +(1666:22-1667:4) " {\n " --> (1043:23-1044:0) " {" +(1667:4-1667:11) " return" --> (1044:0-1044:11) "\n\t\t\t\treturn" +(1667:11-1668:3) " '';\n " --> (1044:11-1045:3) " \"\";\n\t\t" +(1668:3-1670:2) "}\n\n " --> (1045:3-1046:3) "\t}\n\t\t" +(1670:2-1671:4) " {\n " --> (1046:3-1047:4) "\t{\n\t\t\t" +(1671:4-1671:8) " var" --> (1047:4-1047:8) "\tvar" +(1671:8-1671:16) " frame =" --> (1047:8-1047:16) " frame =" +(1671:16-1671:36) " componentFrameCache" --> (1047:16-1047:36) " componentFrameCache" +(1671:36-1671:40) ".get" --> (1047:36-1047:40) ".get" +(1671:40-1671:43) "(fn" --> (1047:40-1047:43) "(fn" +(1671:43-1673:4) ");\n\n " --> (1047:43-1048:0) ");" +(1673:4-1673:8) " if " --> (1048:0-1048:8) "\n\t\t\t\tif " +(1673:8-1673:18) "(frame !==" --> (1048:8-1048:18) "(frame !==" +(1673:18-1673:29) " undefined)" --> (1048:18-1048:29) " undefined)" +(1673:29-1674:6) " {\n " --> (1048:29-1049:0) " {" +(1674:6-1674:13) " return" --> (1049:0-1049:12) "\n\t\t\t\t\treturn" +(1674:13-1675:5) " frame;\n " --> (1049:12-1050:4) " frame;\n\t\t\t" +(1675:5-1676:3) "}\n " --> (1050:4-1051:3) "\t}\n\t\t" +(1676:3-1678:2) "}\n\n " --> (1051:3-1052:3) "\t}\n\t\t" +(1678:2-1678:6) " var" --> (1052:3-1052:7) "\tvar" +(1678:6-1679:2) " control;\n " --> (1052:7-1053:0) " control;" +(1679:2-1679:12) " reentry =" --> (1053:0-1053:13) "\n\t\t\treentry =" +(1679:12-1680:2) " true;\n " --> (1053:13-1054:3) " true;\n\t\t" +(1680:2-1680:6) " var" --> (1054:3-1054:7) "\tvar" +(1680:6-1680:34) " previousPrepareStackTrace =" --> (1054:7-1054:35) " previousPrepareStackTrace =" +(1680:34-1680:40) " Error" --> (1054:35-1054:41) " Error" +(1680:40-1682:2) ".prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n " --> (1054:41-1055:0) ".prepareStackTrace;" +(1682:2-1682:8) " Error" --> (1055:0-1055:9) "\n\t\t\tError" +(1682:8-1682:28) ".prepareStackTrace =" --> (1055:9-1055:29) ".prepareStackTrace =" +(1682:28-1683:2) " undefined;\n " --> (1055:29-1056:3) " undefined;\n\t\t" +(1683:2-1683:6) " var" --> (1056:3-1056:7) "\tvar" +(1683:6-1685:2) " previousDispatcher;\n\n " --> (1056:7-1057:3) " previousDispatcher;\n\t\t" +(1685:2-1686:4) " {\n " --> (1057:3-1058:0) "\t{" +(1686:4-1686:25) " previousDispatcher =" --> (1058:0-1058:25) "\n\t\t\t\tpreviousDispatcher =" +(1686:25-1686:50) " ReactCurrentDispatcher$1" --> (1058:25-1058:50) " ReactCurrentDispatcher$1" +(1686:50-1689:4) ".current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n " --> (1058:50-1059:0) ".current;" +(1689:4-1689:29) " ReactCurrentDispatcher$1" --> (1059:0-1059:29) "\n\t\t\t\tReactCurrentDispatcher$1" +(1689:29-1689:39) ".current =" --> (1059:29-1059:39) ".current =" +(1689:39-1690:4) " null;\n " --> (1059:39-1060:0) " null;" +(1690:4-1690:17) " disableLogs(" --> (1060:0-1060:17) "\n\t\t\t\tdisableLogs(" +(1690:17-1691:3) ");\n " --> (1060:17-1061:3) ");\n\t\t" +(1691:3-1693:2) "}\n\n " --> (1061:3-1062:0) "\t}" +(1693:2-1693:6) " try" --> (1062:0-1062:7) "\n\t\t\ttry" +(1693:6-1695:4) " {\n // This should throw.\n " --> (1062:7-1063:0) " {" +(1695:4-1695:8) " if " --> (1063:0-1063:8) "\n\t\t\t\tif " +(1695:8-1695:19) "(construct)" --> (1063:8-1063:19) "(construct)" +(1695:19-1697:6) " {\n // Something should be setting the props in the constructor.\n " --> (1063:19-1064:5) " {\n\t\t\t\t" +(1697:6-1697:10) " var" --> (1064:5-1064:9) "\tvar" +(1697:10-1697:17) " Fake =" --> (1064:9-1064:16) " Fake =" +(1697:17-1697:29) " function ()" --> (1064:16-1064:27) " function()" +(1697:29-1698:8) " {\n " --> (1064:27-1065:0) " {" +(1698:8-1698:14) " throw" --> (1065:0-1065:12) "\n\t\t\t\t\t\tthrow" +(1698:14-1698:21) " Error(" --> (1065:12-1065:19) " Error(" +(1698:21-1699:7) ");\n " --> (1065:19-1066:5) ");\n\t\t\t\t" +(1699:7-1702:6) "}; // $FlowFixMe\n\n\n " --> (1066:5-1067:0) "\t};" +(1702:6-1702:13) " Object" --> (1067:0-1067:12) "\n\t\t\t\t\tObject" +(1702:13-1702:28) ".defineProperty" --> (1067:12-1067:27) ".defineProperty" +(1702:28-1702:33) "(Fake" --> (1067:27-1067:32) "(Fake" +(1702:33-1702:44) ".prototype," --> (1067:32-1067:43) ".prototype," +(1702:44-1702:53) " 'props'," --> (1067:43-1067:52) " \"props\"," +(1702:53-1703:8) " {\n " --> (1067:52-1067:54) " {" +(1703:8-1703:13) " set:" --> (1067:54-1067:59) " set:" +(1703:13-1703:25) " function ()" --> (1067:59-1067:70) " function()" +(1703:25-1706:10) " {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n " --> (1067:70-1068:0) " {" +(1706:10-1706:16) " throw" --> (1068:0-1068:12) "\n\t\t\t\t\t\tthrow" +(1706:16-1706:23) " Error(" --> (1068:12-1068:19) " Error(" +(1706:23-1707:9) ");\n " --> (1068:19-1069:5) ");\n\t\t\t\t" +(1707:9-1708:7) "}\n " --> (1069:5-1069:7) "\t}" +(1708:7-1708:8) "}" --> (1069:7-1069:9) " }" +(1708:8-1710:6) ");\n\n " --> (1069:9-1070:0) ");" +(1710:6-1710:17) " if (typeof" --> (1070:0-1070:16) "\n\t\t\t\t\tif (typeof" +(1710:17-1710:29) " Reflect ===" --> (1070:16-1070:28) " Reflect ===" +(1710:29-1710:41) " 'object' &&" --> (1070:28-1070:40) " \"object\" &&" +(1710:41-1710:49) " Reflect" --> (1070:40-1070:48) " Reflect" +(1710:49-1710:60) ".construct)" --> (1070:48-1070:59) ".construct)" +(1710:60-1713:8) " {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n " --> (1070:59-1071:0) " {" +(1713:8-1713:12) " try" --> (1071:0-1071:10) "\n\t\t\t\t\t\ttry" +(1713:12-1714:10) " {\n " --> (1071:10-1072:0) " {" +(1714:10-1714:18) " Reflect" --> (1072:0-1072:15) "\n\t\t\t\t\t\t\tReflect" +(1714:18-1714:28) ".construct" --> (1072:15-1072:25) ".construct" +(1714:28-1714:34) "(Fake," --> (1072:25-1072:31) "(Fake," +(1714:34-1714:36) " [" --> (1072:31-1072:33) " [" +(1714:36-1714:37) "]" --> (1072:33-1072:34) "]" +(1714:37-1715:9) ");\n " --> (1072:34-1073:6) ");\n\t\t\t\t\t" +(1715:9-1715:17) "} catch " --> (1073:6-1073:15) "\t} catch " +(1715:17-1715:20) "(x)" --> (1073:15-1073:18) "(x)" +(1715:20-1716:10) " {\n " --> (1073:18-1074:0) " {" +(1716:10-1716:20) " control =" --> (1074:0-1074:17) "\n\t\t\t\t\t\t\tcontrol =" +(1716:20-1717:9) " x;\n " --> (1074:17-1075:6) " x;\n\t\t\t\t\t" +(1717:9-1719:8) "}\n\n " --> (1075:6-1076:0) "\t}" +(1719:8-1719:16) " Reflect" --> (1076:0-1076:14) "\n\t\t\t\t\t\tReflect" +(1719:16-1719:26) ".construct" --> (1076:14-1076:24) ".construct" +(1719:26-1719:30) "(fn," --> (1076:24-1076:28) "(fn," +(1719:30-1719:32) " [" --> (1076:28-1076:30) " [" +(1719:32-1719:34) "]," --> (1076:30-1076:32) "]," +(1719:34-1719:39) " Fake" --> (1076:32-1076:37) " Fake" +(1719:39-1720:7) ");\n " --> (1076:37-1077:5) ");\n\t\t\t\t" +(1720:7-1720:13) "} else" --> (1077:5-1077:12) "\t} else" +(1720:13-1721:8) " {\n " --> (1077:12-1078:0) " {" +(1721:8-1721:12) " try" --> (1078:0-1078:10) "\n\t\t\t\t\t\ttry" +(1721:12-1722:10) " {\n " --> (1078:10-1079:0) " {" +(1722:10-1722:15) " Fake" --> (1079:0-1079:12) "\n\t\t\t\t\t\t\tFake" +(1722:15-1722:21) ".call(" --> (1079:12-1079:18) ".call(" +(1722:21-1723:9) ");\n " --> (1079:18-1080:6) ");\n\t\t\t\t\t" +(1723:9-1723:17) "} catch " --> (1080:6-1080:15) "\t} catch " +(1723:17-1723:20) "(x)" --> (1080:15-1080:18) "(x)" +(1723:20-1724:10) " {\n " --> (1080:18-1081:0) " {" +(1724:10-1724:20) " control =" --> (1081:0-1081:17) "\n\t\t\t\t\t\t\tcontrol =" +(1724:20-1725:9) " x;\n " --> (1081:17-1082:6) " x;\n\t\t\t\t\t" +(1725:9-1727:8) "}\n\n " --> (1082:6-1083:0) "\t}" +(1727:8-1727:11) " fn" --> (1083:0-1083:9) "\n\t\t\t\t\t\tfn" +(1727:11-1727:16) ".call" --> (1083:9-1083:14) ".call" +(1727:16-1727:21) "(Fake" --> (1083:14-1083:19) "(Fake" +(1727:21-1727:31) ".prototype" --> (1083:19-1083:29) ".prototype" +(1727:31-1728:7) ");\n " --> (1083:29-1084:5) ");\n\t\t\t\t" +(1728:7-1729:5) "}\n " --> (1084:5-1085:4) "\t}\n\t\t\t" +(1729:5-1729:11) "} else" --> (1085:4-1085:11) "\t} else" +(1729:11-1730:6) " {\n " --> (1085:11-1086:0) " {" +(1730:6-1730:10) " try" --> (1086:0-1086:9) "\n\t\t\t\t\ttry" +(1730:10-1731:8) " {\n " --> (1086:9-1087:0) " {" +(1731:8-1731:14) " throw" --> (1087:0-1087:12) "\n\t\t\t\t\t\tthrow" +(1731:14-1731:21) " Error(" --> (1087:12-1087:19) " Error(" +(1731:21-1732:7) ");\n " --> (1087:19-1088:5) ");\n\t\t\t\t" +(1732:7-1732:15) "} catch " --> (1088:5-1088:14) "\t} catch " +(1732:15-1732:18) "(x)" --> (1088:14-1088:17) "(x)" +(1732:18-1733:8) " {\n " --> (1088:17-1089:0) " {" +(1733:8-1733:18) " control =" --> (1089:0-1089:16) "\n\t\t\t\t\t\tcontrol =" +(1733:18-1734:7) " x;\n " --> (1089:16-1090:5) " x;\n\t\t\t\t" +(1734:7-1736:6) "}\n\n " --> (1090:5-1091:0) "\t}" +(1736:6-1736:10) " fn(" --> (1091:0-1091:9) "\n\t\t\t\t\tfn(" +(1736:10-1737:5) ");\n " --> (1091:9-1092:4) ");\n\t\t\t" +(1737:5-1738:3) "}\n " --> (1092:4-1093:3) "\t}\n\t\t" +(1738:3-1738:11) "} catch " --> (1093:3-1093:12) "\t} catch " +(1738:11-1738:19) "(sample)" --> (1093:12-1093:20) "(sample)" +(1738:19-1740:4) " {\n // This is inlined manually because closure doesn't do it for us.\n " --> (1093:20-1094:0) " {" +(1740:4-1740:8) " if " --> (1094:0-1094:8) "\n\t\t\t\tif " +(1740:8-1740:18) "(sample &&" --> (1094:8-1094:18) "(sample &&" +(1740:18-1740:36) " control && typeof" --> (1094:18-1094:36) " control && typeof" +(1740:36-1740:43) " sample" --> (1094:36-1094:43) " sample" +(1740:43-1740:53) ".stack ===" --> (1094:43-1094:53) ".stack ===" +(1740:53-1740:63) " 'string')" --> (1094:53-1094:63) " \"string\")" +(1740:63-1743:6) " {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n " --> (1094:63-1095:5) " {\n\t\t\t\t" +(1743:6-1743:10) " var" --> (1095:5-1095:9) "\tvar" +(1743:10-1743:24) " sampleLines =" --> (1095:9-1095:23) " sampleLines =" +(1743:24-1743:31) " sample" --> (1095:23-1095:30) " sample" +(1743:31-1743:37) ".stack" --> (1095:30-1095:36) ".stack" +(1743:37-1743:43) ".split" --> (1095:36-1095:42) ".split" +(1743:43-1743:48) "('\\n'" --> (1095:42-1095:47) "(\"\\n\"" +(1743:48-1744:6) ");\n " --> (1095:47-1096:5) ");\n\t\t\t\t" +(1744:6-1744:10) " var" --> (1096:5-1096:9) "\tvar" +(1744:10-1744:25) " controlLines =" --> (1096:9-1096:24) " controlLines =" +(1744:25-1744:33) " control" --> (1096:24-1096:32) " control" +(1744:33-1744:39) ".stack" --> (1096:32-1096:38) ".stack" +(1744:39-1744:45) ".split" --> (1096:38-1096:44) ".split" +(1744:45-1744:50) "('\\n'" --> (1096:44-1096:49) "(\"\\n\"" +(1744:50-1745:6) ");\n " --> (1096:49-1097:5) ");\n\t\t\t\t" +(1745:6-1745:10) " var" --> (1097:5-1097:9) "\tvar" +(1745:10-1745:14) " s =" --> (1097:9-1097:13) " s =" +(1745:14-1745:26) " sampleLines" --> (1097:13-1097:25) " sampleLines" +(1745:26-1745:35) ".length -" --> (1097:25-1097:34) ".length -" +(1745:35-1746:6) " 1;\n " --> (1097:34-1098:5) " 1;\n\t\t\t\t" +(1746:6-1746:10) " var" --> (1098:5-1098:9) "\tvar" +(1746:10-1746:14) " c =" --> (1098:9-1098:13) " c =" +(1746:14-1746:27) " controlLines" --> (1098:13-1098:26) " controlLines" +(1746:27-1746:36) ".length -" --> (1098:26-1098:35) ".length -" +(1746:36-1748:6) " 1;\n\n " --> (1098:35-1099:0) " 1;" +(1748:6-1748:13) " while " --> (1099:0-1099:12) "\n\t\t\t\t\twhile " +(1748:13-1748:18) "(s >=" --> (1099:12-1099:17) "(s >=" +(1748:18-1748:23) " 1 &&" --> (1099:17-1099:22) " 1 &&" +(1748:23-1748:28) " c >=" --> (1099:22-1099:27) " c >=" +(1748:28-1748:33) " 0 &&" --> (1099:27-1099:32) " 0 &&" +(1748:33-1748:45) " sampleLines" --> (1099:32-1099:44) " sampleLines" +(1748:45-1748:52) "[s] !==" --> (1099:44-1099:51) "[s] !==" +(1748:52-1748:65) " controlLines" --> (1099:51-1099:64) " controlLines" +(1748:65-1748:69) "[c])" --> (1099:64-1099:68) "[c])" +(1748:69-1755:8) " {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n " --> (1099:68-1100:0) " {" +(1755:8-1756:7) " c--;\n " --> (1100:0-1101:5) "\n\t\t\t\t\t\tc--;\n\t\t\t\t" +(1756:7-1758:6) "}\n\n " --> (1101:5-1102:0) "\t}" +(1758:6-1758:13) " for (;" --> (1102:0-1102:12) "\n\t\t\t\t\tfor (;" +(1758:13-1758:18) " s >=" --> (1102:12-1102:17) " s >=" +(1758:18-1758:23) " 1 &&" --> (1102:17-1102:22) " 1 &&" +(1758:23-1758:28) " c >=" --> (1102:22-1102:27) " c >=" +(1758:28-1758:31) " 0;" --> (1102:27-1102:30) " 0;" +(1758:31-1758:36) " s--," --> (1102:30-1102:35) " s--," +(1758:36-1758:41) " c--)" --> (1102:35-1102:40) " c--)" +(1758:41-1761:8) " {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n " --> (1102:40-1103:0) " {" +(1761:8-1761:12) " if " --> (1103:0-1103:10) "\n\t\t\t\t\t\tif " +(1761:12-1761:24) "(sampleLines" --> (1103:10-1103:22) "(sampleLines" +(1761:24-1761:31) "[s] !==" --> (1103:22-1103:29) "[s] !==" +(1761:31-1761:44) " controlLines" --> (1103:29-1103:42) " controlLines" +(1761:44-1761:48) "[c])" --> (1103:42-1103:46) "[c])" +(1761:48-1767:10) " {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n " --> (1103:46-1104:0) " {" +(1767:10-1767:14) " if " --> (1104:0-1104:11) "\n\t\t\t\t\t\t\tif " +(1767:14-1767:20) "(s !==" --> (1104:11-1104:17) "(s !==" +(1767:20-1767:25) " 1 ||" --> (1104:17-1104:22) " 1 ||" +(1767:25-1767:31) " c !==" --> (1104:22-1104:28) " c !==" +(1767:31-1767:34) " 1)" --> (1104:28-1104:31) " 1)" +(1767:34-1768:12) " {\n " --> (1104:31-1105:0) " {" +(1768:12-1768:15) " do" --> (1105:0-1105:11) "\n\t\t\t\t\t\t\t\tdo" +(1768:15-1769:14) " {\n " --> (1105:11-1106:0) " {" +(1769:14-1770:14) " s--;\n " --> (1106:0-1107:0) "\n\t\t\t\t\t\t\t\t\ts--;" +(1770:14-1773:14) " c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n " --> (1107:0-1108:0) "\n\t\t\t\t\t\t\t\t\tc--;" +(1773:14-1773:18) " if " --> (1108:0-1108:13) "\n\t\t\t\t\t\t\t\t\tif " +(1773:18-1773:22) "(c <" --> (1108:13-1108:17) "(c <" +(1773:22-1773:27) " 0 ||" --> (1108:17-1108:22) " 0 ||" +(1773:27-1773:39) " sampleLines" --> (1108:22-1108:34) " sampleLines" +(1773:39-1773:46) "[s] !==" --> (1108:34-1108:41) "[s] !==" +(1773:46-1773:59) " controlLines" --> (1108:41-1108:54) " controlLines" +(1773:59-1773:63) "[c])" --> (1108:54-1108:58) "[c])" +(1773:63-1775:16) " {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n " --> (1108:58-1109:10) " {\n\t\t\t\t\t\t\t\t\t" +(1775:16-1775:20) " var" --> (1109:10-1109:14) "\tvar" +(1775:20-1775:29) " _frame =" --> (1109:14-1109:23) " _frame =" +(1775:29-1775:36) " '\\n' +" --> (1109:23-1109:30) " \"\\n\" +" +(1775:36-1775:48) " sampleLines" --> (1109:30-1109:42) " sampleLines" +(1775:48-1775:51) "[s]" --> (1109:42-1109:45) "[s]" +(1775:51-1775:59) ".replace" --> (1109:45-1109:53) ".replace" +(1775:59-1775:71) "(' at new '," --> (1109:53-1109:65) "(\" at new \"," +(1775:71-1775:78) " ' at '" --> (1109:65-1109:72) " \" at \"" +(1775:78-1777:16) ");\n\n " --> (1109:72-1110:10) ");\n\t\t\t\t\t\t\t\t\t" +(1777:16-1778:18) " {\n " --> (1110:10-1111:0) "\t{" +(1778:18-1778:29) " if (typeof" --> (1111:0-1111:22) "\n\t\t\t\t\t\t\t\t\t\t\tif (typeof" +(1778:29-1778:36) " fn ===" --> (1111:22-1111:29) " fn ===" +(1778:36-1778:48) " 'function')" --> (1111:29-1111:41) " \"function\")" +(1778:48-1779:20) " {\n " --> (1111:41-1112:0) " {" +(1779:20-1779:40) " componentFrameCache" --> (1112:0-1112:32) "\n\t\t\t\t\t\t\t\t\t\t\t\tcomponentFrameCache" +(1779:40-1779:44) ".set" --> (1112:32-1112:36) ".set" +(1779:44-1779:48) "(fn," --> (1112:36-1112:40) "(fn," +(1779:48-1779:55) " _frame" --> (1112:40-1112:47) " _frame" +(1779:55-1780:19) ");\n " --> (1112:47-1113:11) ");\n\t\t\t\t\t\t\t\t\t\t" +(1780:19-1781:17) "}\n " --> (1113:11-1114:10) "\t}\n\t\t\t\t\t\t\t\t\t" +(1781:17-1784:16) "} // Return the line we found.\n\n\n " --> (1114:10-1115:0) "\t}" +(1784:16-1784:23) " return" --> (1115:0-1115:17) "\n\t\t\t\t\t\t\t\t\t\treturn" +(1784:23-1785:15) " _frame;\n " --> (1115:17-1116:9) " _frame;\n\t\t\t\t\t\t\t\t" +(1785:15-1786:13) "}\n " --> (1116:9-1117:8) "\t}\n\t\t\t\t\t\t\t" +(1786:13-1786:21) "} while " --> (1117:8-1117:17) "\t} while " +(1786:21-1786:26) "(s >=" --> (1117:17-1117:22) "(s >=" +(1786:26-1786:31) " 1 &&" --> (1117:22-1117:27) " 1 &&" +(1786:31-1786:36) " c >=" --> (1117:27-1117:32) " c >=" +(1786:36-1787:11) " 0);\n " --> (1117:32-1118:7) " 0);\n\t\t\t\t\t\t" +(1787:11-1789:10) "}\n\n " --> (1118:7-1119:0) "\t}" +(1789:10-1790:9) " break;\n " --> (1119:0-1120:6) "\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t" +(1790:9-1791:7) "}\n " --> (1120:6-1121:5) "\t}\n\t\t\t\t" +(1791:7-1792:5) "}\n " --> (1121:5-1122:4) "\t}\n\t\t\t" +(1792:5-1793:3) "}\n " --> (1122:4-1123:3) "\t}\n\t\t" +(1793:3-1793:12) "} finally" --> (1123:3-1124:9) "\t}\n finally" +(1793:12-1794:4) " {\n " --> (1124:9-1125:0) " {" +(1794:4-1794:14) " reentry =" --> (1125:0-1125:14) "\n\t\t\t\treentry =" +(1794:14-1796:4) " false;\n\n " --> (1125:14-1126:4) " false;\n\t\t\t" +(1796:4-1797:6) " {\n " --> (1126:4-1127:0) "\t{" +(1797:6-1797:31) " ReactCurrentDispatcher$1" --> (1127:0-1127:30) "\n\t\t\t\t\tReactCurrentDispatcher$1" +(1797:31-1797:41) ".current =" --> (1127:30-1127:40) ".current =" +(1797:41-1798:6) " previousDispatcher;\n " --> (1127:40-1128:0) " previousDispatcher;" +(1798:6-1798:20) " reenableLogs(" --> (1128:0-1128:19) "\n\t\t\t\t\treenableLogs(" +(1798:20-1799:5) ");\n " --> (1128:19-1129:4) ");\n\t\t\t" +(1799:5-1801:4) "}\n\n " --> (1129:4-1130:0) "\t}" +(1801:4-1801:10) " Error" --> (1130:0-1130:10) "\n\t\t\t\tError" +(1801:10-1801:30) ".prepareStackTrace =" --> (1130:10-1130:30) ".prepareStackTrace =" +(1801:30-1802:3) " previousPrepareStackTrace;\n " --> (1130:30-1131:3) " previousPrepareStackTrace;\n\t\t" +(1802:3-1805:2) "} // Fallback to just using the name if we couldn't make it throw.\n\n\n " --> (1131:3-1132:3) "\t}\n\t\t" +(1805:2-1805:6) " var" --> (1132:3-1132:7) "\tvar" +(1805:6-1805:13) " name =" --> (1132:7-1132:14) " name =" +(1805:13-1805:18) " fn ?" --> (1132:14-1132:19) " fn ?" +(1805:18-1805:21) " fn" --> (1132:19-1132:22) " fn" +(1805:21-1805:36) ".displayName ||" --> (1132:22-1132:37) ".displayName ||" +(1805:36-1805:39) " fn" --> (1132:37-1132:40) " fn" +(1805:39-1805:46) ".name :" --> (1132:40-1132:47) ".name :" +(1805:46-1806:2) " '';\n " --> (1132:47-1133:3) " \"\";\n\t\t" +(1806:2-1806:6) " var" --> (1133:3-1133:7) "\tvar" +(1806:6-1806:23) " syntheticFrame =" --> (1133:7-1133:24) " syntheticFrame =" +(1806:23-1806:30) " name ?" --> (1133:24-1133:31) " name ?" +(1806:30-1806:60) " describeBuiltInComponentFrame" --> (1133:31-1133:61) " describeBuiltInComponentFrame" +(1806:60-1806:65) "(name" --> (1133:61-1133:66) "(name" +(1806:65-1806:68) ") :" --> (1133:66-1133:69) ") :" +(1806:68-1808:2) " '';\n\n " --> (1133:69-1134:3) " \"\";\n\t\t" +(1808:2-1809:4) " {\n " --> (1134:3-1135:0) "\t{" +(1809:4-1809:15) " if (typeof" --> (1135:0-1135:15) "\n\t\t\t\tif (typeof" +(1809:15-1809:22) " fn ===" --> (1135:15-1135:22) " fn ===" +(1809:22-1809:34) " 'function')" --> (1135:22-1135:34) " \"function\")" +(1809:34-1810:6) " {\n " --> (1135:34-1136:0) " {" +(1810:6-1810:26) " componentFrameCache" --> (1136:0-1136:25) "\n\t\t\t\t\tcomponentFrameCache" +(1810:26-1810:30) ".set" --> (1136:25-1136:29) ".set" +(1810:30-1810:34) "(fn," --> (1136:29-1136:33) "(fn," +(1810:34-1810:49) " syntheticFrame" --> (1136:33-1136:48) " syntheticFrame" +(1810:49-1811:5) ");\n " --> (1136:48-1137:4) ");\n\t\t\t" +(1811:5-1812:3) "}\n " --> (1137:4-1138:3) "\t}\n\t\t" +(1812:3-1814:2) "}\n\n " --> (1138:3-1139:0) "\t}" +(1814:2-1814:9) " return" --> (1139:0-1139:10) "\n\t\t\treturn" +(1814:9-1815:1) " syntheticFrame;\n" --> (1139:10-1140:2) " syntheticFrame;\n\t" +(1815:1-1816:0) "}" --> (1140:2-1141:2) "\t}\n\t" +(1816:0-1816:9) "\nfunction" --> (1141:2-1141:11) "\tfunction" +(1816:9-1816:40) " describeFunctionComponentFrame" --> (1141:11-1141:42) " describeFunctionComponentFrame" +(1816:40-1816:44) "(fn," --> (1141:42-1141:46) "(fn," +(1816:44-1816:52) " source," --> (1141:46-1141:54) " source," +(1816:52-1816:61) " ownerFn)" --> (1141:54-1141:63) " ownerFn)" +(1816:61-1817:2) " {\n " --> (1141:63-1142:3) " {\n\t\t" +(1817:2-1818:4) " {\n " --> (1142:3-1143:0) "\t{" +(1818:4-1818:11) " return" --> (1143:0-1143:11) "\n\t\t\t\treturn" +(1818:11-1818:40) " describeNativeComponentFrame" --> (1143:11-1143:40) " describeNativeComponentFrame" +(1818:40-1818:44) "(fn," --> (1143:40-1143:44) "(fn," +(1818:44-1818:50) " false" --> (1143:44-1143:50) " false" +(1818:50-1819:3) ");\n " --> (1143:50-1144:3) ");\n\t\t" +(1819:3-1820:1) "}\n" --> (1144:3-1145:2) "\t}\n\t" +(1820:1-1822:0) "}\n" --> (1145:2-1146:2) "\t}\n\t" +(1822:0-1822:9) "\nfunction" --> (1146:2-1146:11) "\tfunction" +(1822:9-1822:25) " shouldConstruct" --> (1146:11-1146:27) " shouldConstruct" +(1822:25-1822:36) "(Component)" --> (1146:27-1146:38) "(Component)" +(1822:36-1823:2) " {\n " --> (1146:38-1147:3) " {\n\t\t" +(1823:2-1823:6) " var" --> (1147:3-1147:7) "\tvar" +(1823:6-1823:18) " prototype =" --> (1147:7-1147:19) " prototype =" +(1823:18-1823:28) " Component" --> (1147:19-1147:29) " Component" +(1823:28-1824:2) ".prototype;\n " --> (1147:29-1148:0) ".prototype;" +(1824:2-1824:12) " return !!" --> (1148:0-1148:13) "\n\t\t\treturn !!" +(1824:12-1824:25) "(prototype &&" --> (1148:13-1148:26) "(prototype &&" +(1824:25-1824:35) " prototype" --> (1148:26-1148:36) " prototype" +(1824:35-1825:1) ".isReactComponent);\n" --> (1148:36-1149:2) ".isReactComponent);\n\t" +(1825:1-1827:0) "}\n" --> (1149:2-1150:2) "\t}\n\t" +(1827:0-1827:9) "\nfunction" --> (1150:2-1150:11) "\tfunction" +(1827:9-1827:46) " describeUnknownElementTypeFrameInDEV" --> (1150:11-1150:48) " describeUnknownElementTypeFrameInDEV" +(1827:46-1827:52) "(type," --> (1150:48-1150:54) "(type," +(1827:52-1827:60) " source," --> (1150:54-1150:62) " source," +(1827:60-1827:69) " ownerFn)" --> (1150:62-1150:71) " ownerFn)" +(1827:69-1829:2) " {\n\n " --> (1150:71-1151:0) " {" +(1829:2-1829:6) " if " --> (1151:0-1151:7) "\n\t\t\tif " +(1829:6-1829:14) "(type ==" --> (1151:7-1151:15) "(type ==" +(1829:14-1829:20) " null)" --> (1151:15-1151:21) " null)" +(1829:20-1830:4) " {\n " --> (1151:21-1152:0) " {" +(1830:4-1830:11) " return" --> (1152:0-1152:11) "\n\t\t\t\treturn" +(1830:11-1831:3) " '';\n " --> (1152:11-1153:3) " \"\";\n\t\t" +(1831:3-1833:2) "}\n\n " --> (1153:3-1154:0) "\t}" +(1833:2-1833:13) " if (typeof" --> (1154:0-1154:14) "\n\t\t\tif (typeof" +(1833:13-1833:22) " type ===" --> (1154:14-1154:23) " type ===" +(1833:22-1833:34) " 'function')" --> (1154:23-1154:35) " \"function\")" +(1833:34-1834:4) " {\n " --> (1154:35-1155:4) " {\n\t\t\t" +(1834:4-1835:6) " {\n " --> (1155:4-1156:0) "\t{" +(1835:6-1835:13) " return" --> (1156:0-1156:12) "\n\t\t\t\t\treturn" +(1835:13-1835:42) " describeNativeComponentFrame" --> (1156:12-1156:41) " describeNativeComponentFrame" +(1835:42-1835:48) "(type," --> (1156:41-1156:47) "(type," +(1835:48-1835:64) " shouldConstruct" --> (1156:47-1156:63) " shouldConstruct" +(1835:64-1835:69) "(type" --> (1156:63-1156:68) "(type" +(1835:69-1835:70) ")" --> (1156:68-1156:69) ")" +(1835:70-1836:5) ");\n " --> (1156:69-1157:4) ");\n\t\t\t" +(1836:5-1837:3) "}\n " --> (1157:4-1158:3) "\t}\n\t\t" +(1837:3-1839:2) "}\n\n " --> (1158:3-1159:0) "\t}" +(1839:2-1839:13) " if (typeof" --> (1159:0-1159:14) "\n\t\t\tif (typeof" +(1839:13-1839:22) " type ===" --> (1159:14-1159:23) " type ===" +(1839:22-1839:32) " 'string')" --> (1159:23-1159:33) " \"string\")" +(1839:32-1840:4) " {\n " --> (1159:33-1160:0) " {" +(1840:4-1840:11) " return" --> (1160:0-1160:11) "\n\t\t\t\treturn" +(1840:11-1840:41) " describeBuiltInComponentFrame" --> (1160:11-1160:41) " describeBuiltInComponentFrame" +(1840:41-1840:46) "(type" --> (1160:41-1160:46) "(type" +(1840:46-1841:3) ");\n " --> (1160:46-1161:3) ");\n\t\t" +(1841:3-1843:2) "}\n\n " --> (1161:3-1162:0) "\t}" +(1843:2-1843:10) " switch " --> (1162:0-1162:11) "\n\t\t\tswitch " +(1843:10-1843:2) " switch " --> (1162:11-1162:17) "(type)" +(1843:2-1844:4) " switch (type) {\n " --> (1162:17-1163:0) " {" +(1844:4-1844:9) " case" --> (1163:0-1163:9) "\n\t\t\t\tcase" +(1844:9-1844:17) " exports" --> (1163:9-1163:17) " exports" +(1844:17-1845:6) ".Suspense:\n " --> (1163:17-1163:26) ".Suspense" +(1845:6-1845:13) " return" --> (1163:26-1163:34) ": return" +(1845:13-1845:43) " describeBuiltInComponentFrame" --> (1163:34-1163:64) " describeBuiltInComponentFrame" +(1845:43-1845:54) "('Suspense'" --> (1163:64-1163:75) "(\"Suspense\"" +(1845:54-1847:4) ");\n\n " --> (1163:75-1164:0) ");" +(1847:4-1847:9) " case" --> (1164:0-1164:9) "\n\t\t\t\tcase" +(1847:9-1848:6) " REACT_SUSPENSE_LIST_TYPE:\n " --> (1164:9-1164:34) " REACT_SUSPENSE_LIST_TYPE" +(1848:6-1848:13) " return" --> (1164:34-1164:42) ": return" +(1848:13-1848:43) " describeBuiltInComponentFrame" --> (1164:42-1164:72) " describeBuiltInComponentFrame" +(1848:43-1848:58) "('SuspenseList'" --> (1164:72-1164:87) "(\"SuspenseList\"" +(1848:58-1849:3) ");\n " --> (1164:87-1165:3) ");\n\t\t" +(1849:3-1851:2) "}\n\n " --> (1165:3-1166:0) "\t}" +(1851:2-1851:13) " if (typeof" --> (1166:0-1166:14) "\n\t\t\tif (typeof" +(1851:13-1851:22) " type ===" --> (1166:14-1166:23) " type ===" +(1851:22-1851:32) " 'object')" --> (1166:23-1166:33) " \"object\")" +(1851:32-1852:4) " {\n " --> (1166:33-1167:0) " {" +(1852:4-1852:12) " switch " --> (1167:0-1167:12) "\n\t\t\t\tswitch " +(1852:12-1852:17) "(type" --> (1167:12-1167:17) "(type" +(1852:17-1852:4) " switch (type" --> (1167:17-1167:27) ".$$typeof)" +(1852:4-1853:6) " switch (type.$$typeof) {\n " --> (1167:27-1168:0) " {" +(1853:6-1853:11) " case" --> (1168:0-1168:10) "\n\t\t\t\t\tcase" +(1853:11-1854:8) " REACT_FORWARD_REF_TYPE:\n " --> (1168:10-1168:33) " REACT_FORWARD_REF_TYPE" +(1854:8-1854:15) " return" --> (1168:33-1168:41) ": return" +(1854:15-1854:46) " describeFunctionComponentFrame" --> (1168:41-1168:72) " describeFunctionComponentFrame" +(1854:46-1854:51) "(type" --> (1168:72-1168:77) "(type" +(1854:51-1854:58) ".render" --> (1168:77-1168:84) ".render" +(1854:58-1856:6) ");\n\n " --> (1168:84-1169:0) ");" +(1856:6-1856:11) " case" --> (1169:0-1169:10) "\n\t\t\t\t\tcase" +(1856:11-1858:8) " REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n " --> (1169:10-1169:26) " REACT_MEMO_TYPE" +(1858:8-1858:15) " return" --> (1169:26-1169:34) ": return" +(1858:15-1858:52) " describeUnknownElementTypeFrameInDEV" --> (1169:34-1169:71) " describeUnknownElementTypeFrameInDEV" +(1858:52-1858:57) "(type" --> (1169:71-1169:76) "(type" +(1858:57-1858:63) ".type," --> (1169:76-1169:82) ".type," +(1858:63-1858:71) " source," --> (1169:82-1169:90) " source," +(1858:71-1858:79) " ownerFn" --> (1169:90-1169:98) " ownerFn" +(1858:79-1860:6) ");\n\n " --> (1169:98-1170:0) ");" +(1860:6-1860:11) " case" --> (1170:0-1170:10) "\n\t\t\t\t\tcase" +(1860:11-1861:8) " REACT_BLOCK_TYPE:\n " --> (1170:10-1170:27) " REACT_BLOCK_TYPE" +(1861:8-1861:15) " return" --> (1170:27-1170:35) ": return" +(1861:15-1861:46) " describeFunctionComponentFrame" --> (1170:35-1170:66) " describeFunctionComponentFrame" +(1861:46-1861:51) "(type" --> (1170:66-1170:71) "(type" +(1861:51-1861:59) "._render" --> (1170:71-1170:79) "._render" +(1861:59-1863:6) ");\n\n " --> (1170:79-1171:0) ");" +(1863:6-1863:11) " case" --> (1171:0-1171:10) "\n\t\t\t\t\tcase" +(1863:11-1864:8) " REACT_LAZY_TYPE:\n " --> (1171:10-1171:27) " REACT_LAZY_TYPE:" +(1864:8-1865:10) " {\n " --> (1171:27-1172:6) " {\n\t\t\t\t\t" +(1865:10-1865:14) " var" --> (1172:6-1172:10) "\tvar" +(1865:14-1865:30) " lazyComponent =" --> (1172:10-1172:26) " lazyComponent =" +(1865:30-1866:10) " type;\n " --> (1172:26-1173:6) " type;\n\t\t\t\t\t" +(1866:10-1866:14) " var" --> (1173:6-1173:10) "\tvar" +(1866:14-1866:24) " payload =" --> (1173:10-1173:20) " payload =" +(1866:24-1866:38) " lazyComponent" --> (1173:20-1173:34) " lazyComponent" +(1866:38-1867:10) "._payload;\n " --> (1173:34-1174:6) "._payload;\n\t\t\t\t\t" +(1867:10-1867:14) " var" --> (1174:6-1174:10) "\tvar" +(1867:14-1867:21) " init =" --> (1174:10-1174:17) " init =" +(1867:21-1867:35) " lazyComponent" --> (1174:17-1174:31) " lazyComponent" +(1867:35-1869:10) "._init;\n\n " --> (1174:31-1175:0) "._init;" +(1869:10-1869:14) " try" --> (1175:0-1175:10) "\n\t\t\t\t\t\ttry" +(1869:14-1871:12) " {\n // Lazy may contain any component type so we recursively resolve it.\n " --> (1175:10-1176:0) " {" +(1871:12-1871:19) " return" --> (1176:0-1176:14) "\n\t\t\t\t\t\t\treturn" +(1871:19-1871:56) " describeUnknownElementTypeFrameInDEV" --> (1176:14-1176:51) " describeUnknownElementTypeFrameInDEV" +(1871:56-1871:61) "(init" --> (1176:51-1176:56) "(init" +(1871:61-1871:69) "(payload" --> (1176:56-1176:64) "(payload" +(1871:69-1871:71) ")," --> (1176:64-1176:66) ")," +(1871:71-1871:79) " source," --> (1176:66-1176:74) " source," +(1871:79-1871:87) " ownerFn" --> (1176:74-1176:82) " ownerFn" +(1871:87-1872:11) ");\n " --> (1176:82-1177:6) ");\n\t\t\t\t\t" +(1872:11-1872:19) "} catch " --> (1177:6-1177:15) "\t} catch " +(1872:19-1872:22) "(x)" --> (1177:15-1177:18) "(x)" +(1872:22-1872:24) " {" --> (1177:18-1177:19) " " +(1872:24-1873:9) "}\n " --> (1177:19-1178:5) "{}\n\t\t\t\t" +(1873:9-1874:5) "}\n " --> (1178:5-1179:4) "\t}\n\t\t\t" +(1874:5-1875:3) "}\n " --> (1179:4-1180:3) "\t}\n\t\t" +(1875:3-1877:2) "}\n\n " --> (1180:3-1181:0) "\t}" +(1877:2-1877:9) " return" --> (1181:0-1181:10) "\n\t\t\treturn" +(1877:9-1878:1) " '';\n" --> (1181:10-1182:2) " \"\";\n\t" +(1878:1-1880:0) "}\n" --> (1182:2-1183:2) "\t}\n\t" +(1880:0-1880:4) "\nvar" --> (1183:2-1183:6) "\tvar" +(1880:4-1880:25) " loggedTypeFailures =" --> (1183:6-1183:27) " loggedTypeFailures =" +(1880:25-1880:27) " {" --> (1183:27-1183:28) " " +(1880:27-1881:0) "};" --> (1183:28-1184:2) "{};\n\t" +(1881:0-1881:4) "\nvar" --> (1184:2-1184:6) "\tvar" +(1881:4-1881:31) " ReactDebugCurrentFrame$1 =" --> (1184:6-1184:33) " ReactDebugCurrentFrame$1 =" +(1881:31-1881:52) " ReactSharedInternals" --> (1184:33-1184:54) " ReactSharedInternals" +(1881:52-1883:0) ".ReactDebugCurrentFrame;\n" --> (1184:54-1185:2) ".ReactDebugCurrentFrame;\n\t" +(1883:0-1883:9) "\nfunction" --> (1185:2-1185:11) "\tfunction" +(1883:9-1883:39) " setCurrentlyValidatingElement" --> (1185:11-1185:41) " setCurrentlyValidatingElement" +(1883:39-1883:48) "(element)" --> (1185:41-1185:50) "(element)" +(1883:48-1884:2) " {\n " --> (1185:50-1186:3) " {\n\t\t" +(1884:2-1885:4) " {\n " --> (1186:3-1187:0) "\t{" +(1885:4-1885:8) " if " --> (1187:0-1187:8) "\n\t\t\t\tif " +(1885:8-1885:17) "(element)" --> (1187:8-1187:17) "(element)" +(1885:17-1886:6) " {\n " --> (1187:17-1188:5) " {\n\t\t\t\t" +(1886:6-1886:10) " var" --> (1188:5-1188:9) "\tvar" +(1886:10-1886:18) " owner =" --> (1188:9-1188:17) " owner =" +(1886:18-1886:26) " element" --> (1188:17-1188:25) " element" +(1886:26-1887:6) "._owner;\n " --> (1188:25-1189:5) "._owner;\n\t\t\t\t" +(1887:6-1887:10) " var" --> (1189:5-1189:9) "\tvar" +(1887:10-1887:18) " stack =" --> (1189:9-1189:17) " stack =" +(1887:18-1887:55) " describeUnknownElementTypeFrameInDEV" --> (1189:17-1189:54) " describeUnknownElementTypeFrameInDEV" +(1887:55-1887:63) "(element" --> (1189:54-1189:62) "(element" +(1887:63-1887:69) ".type," --> (1189:62-1189:68) ".type," +(1887:69-1887:77) " element" --> (1189:68-1189:76) " element" +(1887:77-1887:86) "._source," --> (1189:76-1189:85) "._source," +(1887:86-1887:94) " owner ?" --> (1189:85-1189:93) " owner ?" +(1887:94-1887:100) " owner" --> (1189:93-1189:99) " owner" +(1887:100-1887:107) ".type :" --> (1189:99-1189:106) ".type :" +(1887:107-1887:112) " null" --> (1189:106-1189:111) " null" +(1887:112-1888:6) ");\n " --> (1189:111-1190:0) ");" +(1888:6-1888:31) " ReactDebugCurrentFrame$1" --> (1190:0-1190:30) "\n\t\t\t\t\tReactDebugCurrentFrame$1" +(1888:31-1888:50) ".setExtraStackFrame" --> (1190:30-1190:49) ".setExtraStackFrame" +(1888:50-1888:56) "(stack" --> (1190:49-1190:55) "(stack" +(1888:56-1889:5) ");\n " --> (1190:55-1191:4) ");\n\t\t\t" +(1889:5-1889:11) "} else" --> (1191:4-1191:11) "\t} else" +(1889:11-1890:6) " {\n " --> (1191:11-1192:0) " {" +(1890:6-1890:31) " ReactDebugCurrentFrame$1" --> (1192:0-1192:30) "\n\t\t\t\t\tReactDebugCurrentFrame$1" +(1890:31-1890:50) ".setExtraStackFrame" --> (1192:30-1192:49) ".setExtraStackFrame" +(1890:50-1890:55) "(null" --> (1192:49-1192:54) "(null" +(1890:55-1891:5) ");\n " --> (1192:54-1193:4) ");\n\t\t\t" +(1891:5-1892:3) "}\n " --> (1193:4-1194:3) "\t}\n\t\t" +(1892:3-1893:1) "}\n" --> (1194:3-1195:2) "\t}\n\t" +(1893:1-1895:0) "}\n" --> (1195:2-1196:2) "\t}\n\t" +(1895:0-1895:9) "\nfunction" --> (1196:2-1196:11) "\tfunction" +(1895:9-1895:24) " checkPropTypes" --> (1196:11-1196:26) " checkPropTypes" +(1895:24-1895:35) "(typeSpecs," --> (1196:26-1196:37) "(typeSpecs," +(1895:35-1895:43) " values," --> (1196:37-1196:45) " values," +(1895:43-1895:53) " location," --> (1196:45-1196:55) " location," +(1895:53-1895:68) " componentName," --> (1196:55-1196:70) " componentName," +(1895:68-1895:77) " element)" --> (1196:70-1196:79) " element)" +(1895:77-1896:2) " {\n " --> (1196:79-1197:3) " {\n\t\t" +(1896:2-1898:4) " {\n // $FlowFixMe This is okay but Flow doesn't know it.\n " --> (1197:3-1198:4) "\t{\n\t\t\t" +(1898:4-1898:8) " var" --> (1198:4-1198:8) "\tvar" +(1898:8-1898:14) " has =" --> (1198:8-1198:14) " has =" +(1898:14-1898:23) " Function" --> (1198:14-1198:23) " Function" +(1898:23-1898:28) ".call" --> (1198:23-1198:28) ".call" +(1898:28-1898:33) ".bind" --> (1198:28-1198:33) ".bind" +(1898:33-1898:40) "(Object" --> (1198:33-1198:40) "(Object" +(1898:40-1898:50) ".prototype" --> (1198:40-1198:50) ".prototype" +(1898:50-1898:65) ".hasOwnProperty" --> (1198:50-1198:65) ".hasOwnProperty" +(1898:65-1900:4) ");\n\n " --> (1198:65-1199:0) ");" +(1900:4-1900:9) " for " --> (1199:0-1199:9) "\n\t\t\t\tfor " +(1900:9-1900:13) "(var" --> (1199:9-1199:13) "(var" +(1900:13-1900:29) " typeSpecName in" --> (1199:13-1199:29) " typeSpecName in" +(1900:29-1900:40) " typeSpecs)" --> (1199:29-1199:40) " typeSpecs)" +(1900:40-1901:6) " {\n " --> (1199:40-1200:0) " {" +(1901:6-1901:10) " if " --> (1200:0-1200:9) "\n\t\t\t\t\tif " +(1901:10-1901:14) "(has" --> (1200:9-1200:13) "(has" +(1901:14-1901:25) "(typeSpecs," --> (1200:13-1200:24) "(typeSpecs," +(1901:25-1901:38) " typeSpecName" --> (1200:24-1200:37) " typeSpecName" +(1901:38-1901:40) "))" --> (1200:37-1200:39) "))" +(1901:40-1902:8) " {\n " --> (1200:39-1201:6) " {\n\t\t\t\t\t" +(1902:8-1902:12) " var" --> (1201:6-1201:10) "\tvar" +(1902:12-1902:27) " error$1 = void" --> (1201:10-1201:25) " error$1 = void" +(1902:27-1906:8) " 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n " --> (1201:25-1202:0) " 0;" +(1906:8-1906:12) " try" --> (1202:0-1202:10) "\n\t\t\t\t\t\ttry" +(1906:12-1909:10) " {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n " --> (1202:10-1203:0) " {" +(1909:10-1909:21) " if (typeof" --> (1203:0-1203:18) "\n\t\t\t\t\t\t\tif (typeof" +(1909:21-1909:31) " typeSpecs" --> (1203:18-1203:28) " typeSpecs" +(1909:31-1909:49) "[typeSpecName] !==" --> (1203:28-1203:46) "[typeSpecName] !==" +(1909:49-1909:61) " 'function')" --> (1203:46-1203:58) " \"function\")" +(1909:61-1910:12) " {\n " --> (1203:58-1204:8) " {\n\t\t\t\t\t\t\t" +(1910:12-1910:16) " var" --> (1204:8-1204:12) "\tvar" +(1910:16-1910:22) " err =" --> (1204:12-1204:18) " err =" +(1910:22-1910:29) " Error(" --> (1204:18-1204:25) " Error(" +(1910:29-1910:46) "(componentName ||" --> (1204:25-1204:42) "(componentName ||" +(1910:46-1910:63) " 'React class') +" --> (1204:42-1204:59) " \"React class\") +" +(1910:63-1910:70) " ': ' +" --> (1204:59-1204:66) " \": \" +" +(1910:70-1910:81) " location +" --> (1204:66-1204:77) " location +" +(1910:81-1910:93) " ' type `' +" --> (1204:77-1204:89) " \" type `\" +" +(1910:93-1910:108) " typeSpecName +" --> (1204:89-1204:104) " typeSpecName +" +(1910:108-1910:127) " '` is invalid; ' +" --> (1204:104-1204:123) " \"` is invalid; \" +" +(1910:127-1910:215) " 'it must be a function, usually from the `prop-types` package, but received `' + typeof" --> (1204:123-1204:211) " \"it must be a function, usually from the `prop-types` package, but received `\" + typeof" +(1910:215-1910:225) " typeSpecs" --> (1204:211-1204:221) " typeSpecs" +(1910:225-1910:241) "[typeSpecName] +" --> (1204:221-1204:237) "[typeSpecName] +" +(1910:241-1910:248) " '`.' +" --> (1204:237-1204:244) " \"`.\" +" +(1910:248-1910:344) " 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'" --> (1204:244-1204:340) " \"This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.\"" +(1910:344-1911:12) ");\n " --> (1204:340-1205:0) ");" +(1911:12-1911:16) " err" --> (1205:0-1205:12) "\n\t\t\t\t\t\t\t\terr" +(1911:16-1911:23) ".name =" --> (1205:12-1205:19) ".name =" +(1911:23-1912:12) " 'Invariant Violation';\n " --> (1205:19-1206:0) " \"Invariant Violation\";" +(1912:12-1912:18) " throw" --> (1206:0-1206:14) "\n\t\t\t\t\t\t\t\tthrow" +(1912:18-1913:11) " err;\n " --> (1206:14-1207:7) " err;\n\t\t\t\t\t\t" +(1913:11-1915:10) "}\n\n " --> (1207:7-1208:0) "\t}" +(1915:10-1915:20) " error$1 =" --> (1208:0-1208:17) "\n\t\t\t\t\t\t\terror$1 =" +(1915:20-1915:30) " typeSpecs" --> (1208:17-1208:27) " typeSpecs" +(1915:30-1915:44) "[typeSpecName]" --> (1208:27-1208:41) "[typeSpecName]" +(1915:44-1915:52) "(values," --> (1208:41-1208:49) "(values," +(1915:52-1915:66) " typeSpecName," --> (1208:49-1208:63) " typeSpecName," +(1915:66-1915:81) " componentName," --> (1208:63-1208:78) " componentName," +(1915:81-1915:91) " location," --> (1208:78-1208:88) " location," +(1915:91-1915:97) " null," --> (1208:88-1208:94) " null," +(1915:97-1915:144) " 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'" --> (1208:94-1208:141) " \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"" +(1915:144-1916:9) ");\n " --> (1208:141-1209:6) ");\n\t\t\t\t\t" +(1916:9-1916:17) "} catch " --> (1209:6-1209:15) "\t} catch " +(1916:17-1916:21) "(ex)" --> (1209:15-1209:19) "(ex)" +(1916:21-1917:10) " {\n " --> (1209:19-1210:0) " {" +(1917:10-1917:20) " error$1 =" --> (1210:0-1210:17) "\n\t\t\t\t\t\t\terror$1 =" +(1917:20-1918:9) " ex;\n " --> (1210:17-1211:6) " ex;\n\t\t\t\t\t" +(1918:9-1920:8) "}\n\n " --> (1211:6-1212:0) "\t}" +(1920:8-1920:12) " if " --> (1212:0-1212:10) "\n\t\t\t\t\t\tif " +(1920:12-1920:25) "(error$1 && !" --> (1212:10-1212:23) "(error$1 && !" +(1920:25-1920:44) "(error$1 instanceof" --> (1212:23-1212:42) "(error$1 instanceof" +(1920:44-1920:52) " Error))" --> (1212:42-1212:50) " Error))" +(1920:52-1921:10) " {\n " --> (1212:50-1213:0) " {" +(1921:10-1921:40) " setCurrentlyValidatingElement" --> (1213:0-1213:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" +(1921:40-1921:48) "(element" --> (1213:37-1213:45) "(element" +(1921:48-1923:10) ");\n\n " --> (1213:45-1214:0) ");" +(1923:10-1923:16) " error" --> (1214:0-1214:13) "\n\t\t\t\t\t\t\terror" +(1923:16-1923:49) "('%s: type specification of %s' +" --> (1214:13-1214:46) "(\"%s: type specification of %s\" +" +(1923:49-1923:89) " ' `%s` is invalid; the type checker ' +" --> (1214:46-1214:86) " \" `%s` is invalid; the type checker \" +" +(1923:89-1923:155) " 'function must return `null` or an `Error` but returned a %s. ' +" --> (1214:86-1214:152) " \"function must return `null` or an `Error` but returned a %s. \" +" +(1923:155-1923:223) " 'You may have forgotten to pass an argument to the type checker ' +" --> (1214:152-1214:220) " \"You may have forgotten to pass an argument to the type checker \" +" +(1923:223-1923:290) " 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +" --> (1214:220-1214:287) " \"creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and \" +" +(1923:290-1923:325) " 'shape all require an argument).'," --> (1214:287-1214:322) " \"shape all require an argument).\"," +(1923:325-1923:342) " componentName ||" --> (1214:322-1214:339) " componentName ||" +(1923:342-1923:357) " 'React class'," --> (1214:339-1214:354) " \"React class\"," +(1923:357-1923:367) " location," --> (1214:354-1214:364) " location," +(1923:367-1923:388) " typeSpecName, typeof" --> (1214:364-1214:385) " typeSpecName, typeof" +(1923:388-1923:396) " error$1" --> (1214:385-1214:393) " error$1" +(1923:396-1925:10) ");\n\n " --> (1214:393-1215:0) ");" +(1925:10-1925:40) " setCurrentlyValidatingElement" --> (1215:0-1215:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" +(1925:40-1925:45) "(null" --> (1215:37-1215:42) "(null" +(1925:45-1926:9) ");\n " --> (1215:42-1216:6) ");\n\t\t\t\t\t" +(1926:9-1928:8) "}\n\n " --> (1216:6-1217:0) "\t}" +(1928:8-1928:12) " if " --> (1217:0-1217:10) "\n\t\t\t\t\t\tif " +(1928:12-1928:31) "(error$1 instanceof" --> (1217:10-1217:29) "(error$1 instanceof" +(1928:31-1928:42) " Error && !" --> (1217:29-1217:40) " Error && !" +(1928:42-1928:50) "(error$1" --> (1217:40-1217:48) "(error$1" +(1928:50-1928:61) ".message in" --> (1217:48-1217:59) ".message in" +(1928:61-1928:82) " loggedTypeFailures))" --> (1217:59-1217:80) " loggedTypeFailures))" +(1928:82-1931:10) " {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n " --> (1217:80-1218:0) " {" +(1931:10-1931:29) " loggedTypeFailures" --> (1218:0-1218:26) "\n\t\t\t\t\t\t\tloggedTypeFailures" +(1931:29-1931:37) "[error$1" --> (1218:26-1218:34) "[error$1" +(1931:37-1931:48) ".message] =" --> (1218:34-1218:45) ".message] =" +(1931:48-1932:10) " true;\n " --> (1218:45-1219:0) " true;" +(1932:10-1932:40) " setCurrentlyValidatingElement" --> (1219:0-1219:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" +(1932:40-1932:48) "(element" --> (1219:37-1219:45) "(element" +(1932:48-1934:10) ");\n\n " --> (1219:45-1220:0) ");" +(1934:10-1934:16) " error" --> (1220:0-1220:13) "\n\t\t\t\t\t\t\terror" +(1934:16-1934:38) "('Failed %s type: %s'," --> (1220:13-1220:35) "(\"Failed %s type: %s\"," +(1934:38-1934:48) " location," --> (1220:35-1220:45) " location," +(1934:48-1934:56) " error$1" --> (1220:45-1220:53) " error$1" +(1934:56-1934:64) ".message" --> (1220:53-1220:61) ".message" +(1934:64-1936:10) ");\n\n " --> (1220:61-1221:0) ");" +(1936:10-1936:40) " setCurrentlyValidatingElement" --> (1221:0-1221:37) "\n\t\t\t\t\t\t\tsetCurrentlyValidatingElement" +(1936:40-1936:45) "(null" --> (1221:37-1221:42) "(null" +(1936:45-1937:9) ");\n " --> (1221:42-1222:6) ");\n\t\t\t\t\t" +(1937:9-1938:7) "}\n " --> (1222:6-1223:5) "\t}\n\t\t\t\t" +(1938:7-1939:5) "}\n " --> (1223:5-1224:4) "\t}\n\t\t\t" +(1939:5-1940:3) "}\n " --> (1224:4-1225:3) "\t}\n\t\t" +(1940:3-1941:1) "}\n" --> (1225:3-1226:2) "\t}\n\t" +(1941:1-1943:0) "}\n" --> (1226:2-1227:2) "\t}\n\t" +(1943:0-1943:9) "\nfunction" --> (1227:2-1227:11) "\tfunction" +(1943:9-1943:41) " setCurrentlyValidatingElement$1" --> (1227:11-1227:43) " setCurrentlyValidatingElement$1" +(1943:41-1943:50) "(element)" --> (1227:43-1227:52) "(element)" +(1943:50-1944:2) " {\n " --> (1227:52-1228:3) " {\n\t\t" +(1944:2-1945:4) " {\n " --> (1228:3-1229:0) "\t{" +(1945:4-1945:8) " if " --> (1229:0-1229:8) "\n\t\t\t\tif " +(1945:8-1945:17) "(element)" --> (1229:8-1229:17) "(element)" +(1945:17-1946:6) " {\n " --> (1229:17-1230:5) " {\n\t\t\t\t" +(1946:6-1946:10) " var" --> (1230:5-1230:9) "\tvar" +(1946:10-1946:18) " owner =" --> (1230:9-1230:17) " owner =" +(1946:18-1946:26) " element" --> (1230:17-1230:25) " element" +(1946:26-1947:6) "._owner;\n " --> (1230:25-1231:5) "._owner;\n\t\t\t\t" +(1947:6-1947:10) " var" --> (1231:5-1231:9) "\tvar" +(1947:10-1947:18) " stack =" --> (1231:9-1231:17) " stack =" +(1947:18-1947:55) " describeUnknownElementTypeFrameInDEV" --> (1231:17-1231:54) " describeUnknownElementTypeFrameInDEV" +(1947:55-1947:63) "(element" --> (1231:54-1231:62) "(element" +(1947:63-1947:69) ".type," --> (1231:62-1231:68) ".type," +(1947:69-1947:77) " element" --> (1231:68-1231:76) " element" +(1947:77-1947:86) "._source," --> (1231:76-1231:85) "._source," +(1947:86-1947:94) " owner ?" --> (1231:85-1231:93) " owner ?" +(1947:94-1947:100) " owner" --> (1231:93-1231:99) " owner" +(1947:100-1947:107) ".type :" --> (1231:99-1231:106) ".type :" +(1947:107-1947:112) " null" --> (1231:106-1231:111) " null" +(1947:112-1948:6) ");\n " --> (1231:111-1232:0) ");" +(1948:6-1948:25) " setExtraStackFrame" --> (1232:0-1232:24) "\n\t\t\t\t\tsetExtraStackFrame" +(1948:25-1948:31) "(stack" --> (1232:24-1232:30) "(stack" +(1948:31-1949:5) ");\n " --> (1232:30-1233:4) ");\n\t\t\t" +(1949:5-1949:11) "} else" --> (1233:4-1233:11) "\t} else" +(1949:11-1950:6) " {\n " --> (1233:11-1234:0) " {" +(1950:6-1950:25) " setExtraStackFrame" --> (1234:0-1234:24) "\n\t\t\t\t\tsetExtraStackFrame" +(1950:25-1950:30) "(null" --> (1234:24-1234:29) "(null" +(1950:30-1951:5) ");\n " --> (1234:29-1235:4) ");\n\t\t\t" +(1951:5-1952:3) "}\n " --> (1235:4-1236:3) "\t}\n\t\t" +(1952:3-1953:1) "}\n" --> (1236:3-1237:2) "\t}\n\t" +(1953:1-1955:0) "}\n" --> (1237:2-1238:2) "\t}\n\t" +(1955:0-1955:4) "\nvar" --> (1238:2-1238:6) "\tvar" +(1955:4-1957:0) " propTypesMisspellWarningShown;\n" --> (1238:6-1239:2) " propTypesMisspellWarningShown;\n\t" +(1957:0-1958:2) "\n{\n " --> (1239:2-1240:0) "\t{" +(1958:2-1958:34) " propTypesMisspellWarningShown =" --> (1240:0-1240:35) "\n\t\t\tpropTypesMisspellWarningShown =" +(1958:34-1959:1) " false;\n" --> (1240:35-1241:2) " false;\n\t" +(1959:1-1961:0) "}\n" --> (1241:2-1242:2) "\t}\n\t" +(1961:0-1961:9) "\nfunction" --> (1242:2-1242:11) "\tfunction" +(1961:9-1961:39) " getDeclarationErrorAddendum()" --> (1242:11-1242:41) " getDeclarationErrorAddendum()" +(1961:39-1962:2) " {\n " --> (1242:41-1243:0) " {" +(1962:2-1962:6) " if " --> (1243:0-1243:7) "\n\t\t\tif " +(1962:6-1962:24) "(ReactCurrentOwner" --> (1243:7-1243:25) "(ReactCurrentOwner" +(1962:24-1962:33) ".current)" --> (1243:25-1243:34) ".current)" +(1962:33-1963:4) " {\n " --> (1243:34-1244:4) " {\n\t\t\t" +(1963:4-1963:8) " var" --> (1244:4-1244:8) "\tvar" +(1963:8-1963:15) " name =" --> (1244:8-1244:15) " name =" +(1963:15-1963:32) " getComponentName" --> (1244:15-1244:32) " getComponentName" +(1963:32-1963:50) "(ReactCurrentOwner" --> (1244:32-1244:50) "(ReactCurrentOwner" +(1963:50-1963:58) ".current" --> (1244:50-1244:58) ".current" +(1963:58-1963:63) ".type" --> (1244:58-1244:63) ".type" +(1963:63-1965:4) ");\n\n " --> (1244:63-1245:0) ");" +(1965:4-1965:8) " if " --> (1245:0-1245:8) "\n\t\t\t\tif " +(1965:8-1965:14) "(name)" --> (1245:8-1245:14) "(name)" +(1965:14-1966:6) " {\n " --> (1245:14-1246:0) " {" +(1966:6-1966:13) " return" --> (1246:0-1246:12) "\n\t\t\t\t\treturn" +(1966:13-1966:50) " '\\n\\nCheck the render method of `' +" --> (1246:12-1246:49) " \"\\n\\nCheck the render method of `\" +" +(1966:50-1966:57) " name +" --> (1246:49-1246:56) " name +" +(1966:57-1967:5) " '`.';\n " --> (1246:56-1247:4) " \"`.\";\n\t\t\t" +(1967:5-1968:3) "}\n " --> (1247:4-1248:3) "\t}\n\t\t" +(1968:3-1970:2) "}\n\n " --> (1248:3-1249:0) "\t}" +(1970:2-1970:9) " return" --> (1249:0-1249:10) "\n\t\t\treturn" +(1970:9-1971:1) " '';\n" --> (1249:10-1250:2) " \"\";\n\t" +(1971:1-1973:0) "}\n" --> (1250:2-1251:2) "\t}\n\t" +(1973:0-1973:9) "\nfunction" --> (1251:2-1251:11) "\tfunction" +(1973:9-1973:36) " getSourceInfoErrorAddendum" --> (1251:11-1251:38) " getSourceInfoErrorAddendum" +(1973:36-1973:44) "(source)" --> (1251:38-1251:46) "(source)" +(1973:44-1974:2) " {\n " --> (1251:46-1252:0) " {" +(1974:2-1974:6) " if " --> (1252:0-1252:7) "\n\t\t\tif " +(1974:6-1974:17) "(source !==" --> (1252:7-1252:18) "(source !==" +(1974:17-1974:28) " undefined)" --> (1252:18-1252:29) " undefined)" +(1974:28-1975:4) " {\n " --> (1252:29-1253:4) " {\n\t\t\t" +(1975:4-1975:8) " var" --> (1253:4-1253:8) "\tvar" +(1975:8-1975:19) " fileName =" --> (1253:8-1253:19) " fileName =" +(1975:19-1975:26) " source" --> (1253:19-1253:26) " source" +(1975:26-1975:35) ".fileName" --> (1253:26-1253:35) ".fileName" +(1975:35-1975:43) ".replace" --> (1253:35-1253:43) ".replace" +(1975:43-1975:56) "(/^.*[\\\\\\/]/," --> (1253:43-1253:56) "(/^.*[\\\\\\/]/," +(1975:56-1975:59) " ''" --> (1253:56-1253:59) " \"\"" +(1975:59-1976:4) ");\n " --> (1253:59-1254:4) ");\n\t\t\t" +(1976:4-1976:8) " var" --> (1254:4-1254:8) "\tvar" +(1976:8-1976:21) " lineNumber =" --> (1254:8-1254:21) " lineNumber =" +(1976:21-1976:28) " source" --> (1254:21-1254:28) " source" +(1976:28-1977:4) ".lineNumber;\n " --> (1254:28-1255:0) ".lineNumber;" +(1977:4-1977:11) " return" --> (1255:0-1255:11) "\n\t\t\t\treturn" +(1977:11-1977:39) " '\\n\\nCheck your code at ' +" --> (1255:11-1255:39) " \"\\n\\nCheck your code at \" +" +(1977:39-1977:50) " fileName +" --> (1255:39-1255:50) " fileName +" +(1977:50-1977:56) " ':' +" --> (1255:50-1255:56) " \":\" +" +(1977:56-1977:69) " lineNumber +" --> (1255:56-1255:69) " lineNumber +" +(1977:69-1978:3) " '.';\n " --> (1255:69-1256:3) " \".\";\n\t\t" +(1978:3-1980:2) "}\n\n " --> (1256:3-1257:0) "\t}" +(1980:2-1980:9) " return" --> (1257:0-1257:10) "\n\t\t\treturn" +(1980:9-1981:1) " '';\n" --> (1257:10-1258:2) " \"\";\n\t" +(1981:1-1983:0) "}\n" --> (1258:2-1259:2) "\t}\n\t" +(1983:0-1983:9) "\nfunction" --> (1259:2-1259:11) "\tfunction" +(1983:9-1983:44) " getSourceInfoErrorAddendumForProps" --> (1259:11-1259:46) " getSourceInfoErrorAddendumForProps" +(1983:44-1983:58) "(elementProps)" --> (1259:46-1259:60) "(elementProps)" +(1983:58-1984:2) " {\n " --> (1259:60-1260:0) " {" +(1984:2-1984:6) " if " --> (1260:0-1260:7) "\n\t\t\tif " +(1984:6-1984:23) "(elementProps !==" --> (1260:7-1260:24) "(elementProps !==" +(1984:23-1984:31) " null &&" --> (1260:24-1260:32) " null &&" +(1984:31-1984:48) " elementProps !==" --> (1260:32-1260:49) " elementProps !==" +(1984:48-1984:59) " undefined)" --> (1260:49-1260:60) " undefined)" +(1984:59-1985:4) " {\n " --> (1260:60-1261:0) " {" +(1985:4-1985:11) " return" --> (1261:0-1261:11) "\n\t\t\t\treturn" +(1985:11-1985:38) " getSourceInfoErrorAddendum" --> (1261:11-1261:38) " getSourceInfoErrorAddendum" +(1985:38-1985:51) "(elementProps" --> (1261:38-1261:51) "(elementProps" +(1985:51-1985:60) ".__source" --> (1261:51-1261:60) ".__source" +(1985:60-1986:3) ");\n " --> (1261:60-1262:3) ");\n\t\t" +(1986:3-1988:2) "}\n\n " --> (1262:3-1263:0) "\t}" +(1988:2-1988:9) " return" --> (1263:0-1263:10) "\n\t\t\treturn" +(1988:9-1989:1) " '';\n" --> (1263:10-1264:2) " \"\";\n\t" +(1989:1-1997:0) "}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n" --> (1264:2-1265:2) "\t}\n\t" +(1997:0-1997:4) "\nvar" --> (1265:2-1265:6) "\tvar" +(1997:4-1997:28) " ownerHasKeyUseWarning =" --> (1265:6-1265:30) " ownerHasKeyUseWarning =" +(1997:28-1997:30) " {" --> (1265:30-1265:31) " " +(1997:30-1999:0) "};\n" --> (1265:31-1266:2) "{};\n\t" +(1999:0-1999:9) "\nfunction" --> (1266:2-1266:11) "\tfunction" +(1999:9-1999:38) " getCurrentComponentErrorInfo" --> (1266:11-1266:40) " getCurrentComponentErrorInfo" +(1999:38-1999:50) "(parentType)" --> (1266:40-1266:52) "(parentType)" +(1999:50-2000:2) " {\n " --> (1266:52-1267:3) " {\n\t\t" +(2000:2-2000:6) " var" --> (1267:3-1267:7) "\tvar" +(2000:6-2000:13) " info =" --> (1267:7-1267:14) " info =" +(2000:13-2000:42) " getDeclarationErrorAddendum(" --> (1267:14-1267:43) " getDeclarationErrorAddendum(" +(2000:42-2002:2) ");\n\n " --> (1267:43-1268:0) ");" +(2002:2-2002:7) " if (" --> (1268:0-1268:8) "\n\t\t\tif (" +(2002:7-2002:13) "!info)" --> (1268:8-1268:14) "!info)" +(2002:13-2003:4) " {\n " --> (1268:14-1269:4) " {\n\t\t\t" +(2003:4-2003:8) " var" --> (1269:4-1269:8) "\tvar" +(2003:8-2003:28) " parentName = typeof" --> (1269:8-1269:28) " parentName = typeof" +(2003:28-2003:43) " parentType ===" --> (1269:28-1269:43) " parentType ===" +(2003:43-2003:54) " 'string' ?" --> (1269:43-1269:54) " \"string\" ?" +(2003:54-2003:67) " parentType :" --> (1269:54-1269:67) " parentType :" +(2003:67-2003:78) " parentType" --> (1269:67-1269:78) " parentType" +(2003:78-2003:93) ".displayName ||" --> (1269:78-1269:93) ".displayName ||" +(2003:93-2003:104) " parentType" --> (1269:93-1269:104) " parentType" +(2003:104-2005:4) ".name;\n\n " --> (1269:104-1270:0) ".name;" +(2005:4-2005:8) " if " --> (1270:0-1270:8) "\n\t\t\t\tif " +(2005:8-2005:20) "(parentName)" --> (1270:8-1270:20) "(parentName)" +(2005:20-2006:6) " {\n " --> (1270:20-1271:0) " {" +(2006:6-2006:13) " info =" --> (1271:0-1271:12) "\n\t\t\t\t\tinfo =" +(2006:13-2006:61) " \"\\n\\nCheck the top-level render call using <\" +" --> (1271:12-1271:60) " \"\\n\\nCheck the top-level render call using <\" +" +(2006:61-2006:74) " parentName +" --> (1271:60-1271:73) " parentName +" +(2006:74-2007:5) " \">.\";\n " --> (1271:73-1272:4) " \">.\";\n\t\t\t" +(2007:5-2008:3) "}\n " --> (1272:4-1273:3) "\t}\n\t\t" +(2008:3-2010:2) "}\n\n " --> (1273:3-1274:0) "\t}" +(2010:2-2010:9) " return" --> (1274:0-1274:10) "\n\t\t\treturn" +(2010:9-2011:1) " info;\n" --> (1274:10-1275:2) " info;\n\t" +(2011:1-2025:0) "}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n" --> (1275:2-1276:2) "\t}\n\t" +(2025:0-2025:9) "\nfunction" --> (1276:2-1276:11) "\tfunction" +(2025:9-2025:29) " validateExplicitKey" --> (1276:11-1276:31) " validateExplicitKey" +(2025:29-2025:38) "(element," --> (1276:31-1276:40) "(element," +(2025:38-2025:50) " parentType)" --> (1276:40-1276:52) " parentType)" +(2025:50-2026:2) " {\n " --> (1276:52-1277:0) " {" +(2026:2-2026:7) " if (" --> (1277:0-1277:8) "\n\t\t\tif (" +(2026:7-2026:15) "!element" --> (1277:8-1277:16) "!element" +(2026:15-2026:25) "._store ||" --> (1277:16-1277:26) "._store ||" +(2026:25-2026:33) " element" --> (1277:26-1277:34) " element" +(2026:33-2026:40) "._store" --> (1277:34-1277:41) "._store" +(2026:40-2026:53) ".validated ||" --> (1277:41-1277:54) ".validated ||" +(2026:53-2026:61) " element" --> (1277:54-1277:62) " element" +(2026:61-2026:68) ".key !=" --> (1277:62-1277:69) ".key !=" +(2026:68-2026:74) " null)" --> (1277:69-1277:75) " null)" +(2026:74-2027:4) " {\n " --> (1277:75-1278:0) " {" +(2027:4-2028:3) " return;\n " --> (1278:0-1279:3) "\n\t\t\t\treturn;\n\t\t" +(2028:3-2030:2) "}\n\n " --> (1279:3-1280:0) "\t}" +(2030:2-2030:10) " element" --> (1280:0-1280:11) "\n\t\t\telement" +(2030:10-2030:17) "._store" --> (1280:11-1280:18) "._store" +(2030:17-2030:29) ".validated =" --> (1280:18-1280:30) ".validated =" +(2030:29-2031:2) " true;\n " --> (1280:30-1281:3) " true;\n\t\t" +(2031:2-2031:6) " var" --> (1281:3-1281:7) "\tvar" +(2031:6-2031:34) " currentComponentErrorInfo =" --> (1281:7-1281:35) " currentComponentErrorInfo =" +(2031:34-2031:63) " getCurrentComponentErrorInfo" --> (1281:35-1281:64) " getCurrentComponentErrorInfo" +(2031:63-2031:74) "(parentType" --> (1281:64-1281:75) "(parentType" +(2031:74-2033:2) ");\n\n " --> (1281:75-1282:0) ");" +(2033:2-2033:6) " if " --> (1282:0-1282:7) "\n\t\t\tif " +(2033:6-2033:28) "(ownerHasKeyUseWarning" --> (1282:7-1282:29) "(ownerHasKeyUseWarning" +(2033:28-2033:56) "[currentComponentErrorInfo])" --> (1282:29-1282:57) "[currentComponentErrorInfo])" +(2033:56-2034:4) " {\n " --> (1282:57-1283:0) " {" +(2034:4-2035:3) " return;\n " --> (1283:0-1284:3) "\n\t\t\t\treturn;\n\t\t" +(2035:3-2037:2) "}\n\n " --> (1284:3-1285:0) "\t}" +(2037:2-2037:24) " ownerHasKeyUseWarning" --> (1285:0-1285:25) "\n\t\t\townerHasKeyUseWarning" +(2037:24-2037:53) "[currentComponentErrorInfo] =" --> (1285:25-1285:54) "[currentComponentErrorInfo] =" +(2037:53-2041:2) " true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n " --> (1285:54-1286:3) " true;\n\t\t" +(2041:2-2041:6) " var" --> (1286:3-1286:7) "\tvar" +(2041:6-2041:19) " childOwner =" --> (1286:7-1286:20) " childOwner =" +(2041:19-2043:2) " '';\n\n " --> (1286:20-1287:0) " \"\";" +(2043:2-2043:6) " if " --> (1287:0-1287:7) "\n\t\t\tif " +(2043:6-2043:17) "(element &&" --> (1287:7-1287:18) "(element &&" +(2043:17-2043:25) " element" --> (1287:18-1287:26) " element" +(2043:25-2043:35) "._owner &&" --> (1287:26-1287:36) "._owner &&" +(2043:35-2043:43) " element" --> (1287:36-1287:44) " element" +(2043:43-2043:54) "._owner !==" --> (1287:44-1287:55) "._owner !==" +(2043:54-2043:72) " ReactCurrentOwner" --> (1287:55-1287:73) " ReactCurrentOwner" +(2043:72-2043:81) ".current)" --> (1287:73-1287:82) ".current)" +(2043:81-2045:4) " {\n // Give the component that originally created this child.\n " --> (1287:82-1288:0) " {" +(2045:4-2045:17) " childOwner =" --> (1288:0-1288:17) "\n\t\t\t\tchildOwner =" +(2045:17-2045:50) " \" It was passed a child from \" +" --> (1288:17-1288:50) " \" It was passed a child from \" +" +(2045:50-2045:67) " getComponentName" --> (1288:50-1288:67) " getComponentName" +(2045:67-2045:75) "(element" --> (1288:67-1288:75) "(element" +(2045:75-2045:82) "._owner" --> (1288:75-1288:82) "._owner" +(2045:82-2045:87) ".type" --> (1288:82-1288:87) ".type" +(2045:87-2045:90) ") +" --> (1288:87-1288:90) ") +" +(2045:90-2046:3) " \".\";\n " --> (1288:90-1289:3) " \".\";\n\t\t" +(2046:3-2048:2) "}\n\n " --> (1289:3-1290:3) "\t}\n\t\t" +(2048:2-2049:4) " {\n " --> (1290:3-1291:0) "\t{" +(2049:4-2049:36) " setCurrentlyValidatingElement$1" --> (1291:0-1291:36) "\n\t\t\t\tsetCurrentlyValidatingElement$1" +(2049:36-2049:44) "(element" --> (1291:36-1291:44) "(element" +(2049:44-2051:4) ");\n\n " --> (1291:44-1292:0) ");" +(2051:4-2051:10) " error" --> (1292:0-1292:10) "\n\t\t\t\terror" +(2051:10-2051:68) "('Each child in a list should have a unique \"key\" prop.' +" --> (1292:10-1292:70) "(\"Each child in a list should have a unique \\\"key\\\" prop.\" +" +(2051:68-2051:140) " '%s%s See https://reactjs.org/link/warning-keys for more information.'," --> (1292:70-1292:142) " \"%s%s See https://reactjs.org/link/warning-keys for more information.\"," +(2051:140-2051:167) " currentComponentErrorInfo," --> (1292:142-1292:169) " currentComponentErrorInfo," +(2051:167-2051:178) " childOwner" --> (1292:169-1292:180) " childOwner" +(2051:178-2053:4) ");\n\n " --> (1292:180-1293:0) ");" +(2053:4-2053:36) " setCurrentlyValidatingElement$1" --> (1293:0-1293:36) "\n\t\t\t\tsetCurrentlyValidatingElement$1" +(2053:36-2053:41) "(null" --> (1293:36-1293:41) "(null" +(2053:41-2054:3) ");\n " --> (1293:41-1294:3) ");\n\t\t" +(2054:3-2055:1) "}\n" --> (1294:3-1295:2) "\t}\n\t" +(2055:1-2067:0) "}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n" --> (1295:2-1296:2) "\t}\n\t" +(2067:0-2067:9) "\nfunction" --> (1296:2-1296:11) "\tfunction" +(2067:9-2067:27) " validateChildKeys" --> (1296:11-1296:29) " validateChildKeys" +(2067:27-2067:33) "(node," --> (1296:29-1296:35) "(node," +(2067:33-2067:45) " parentType)" --> (1296:35-1296:47) " parentType)" +(2067:45-2068:2) " {\n " --> (1296:47-1297:0) " {" +(2068:2-2068:13) " if (typeof" --> (1297:0-1297:14) "\n\t\t\tif (typeof" +(2068:13-2068:22) " node !==" --> (1297:14-1297:23) " node !==" +(2068:22-2068:32) " 'object')" --> (1297:23-1297:33) " \"object\")" +(2068:32-2069:4) " {\n " --> (1297:33-1298:0) " {" +(2069:4-2070:3) " return;\n " --> (1298:0-1299:3) "\n\t\t\t\treturn;\n\t\t" +(2070:3-2072:2) "}\n\n " --> (1299:3-1300:0) "\t}" +(2072:2-2072:6) " if " --> (1300:0-1300:7) "\n\t\t\tif " +(2072:6-2072:12) "(Array" --> (1300:7-1300:13) "(Array" +(2072:12-2072:20) ".isArray" --> (1300:13-1300:21) ".isArray" +(2072:20-2072:25) "(node" --> (1300:21-1300:26) "(node" +(2072:25-2072:27) "))" --> (1300:26-1300:28) "))" +(2072:27-2073:4) " {\n " --> (1300:28-1301:0) " {" +(2073:4-2073:9) " for " --> (1301:0-1301:9) "\n\t\t\t\tfor " +(2073:9-2073:13) "(var" --> (1301:9-1301:13) "(var" +(2073:13-2073:17) " i =" --> (1301:13-1301:17) " i =" +(2073:17-2073:20) " 0;" --> (1301:17-1301:20) " 0;" +(2073:20-2073:24) " i <" --> (1301:20-1301:24) " i <" +(2073:24-2073:29) " node" --> (1301:24-1301:29) " node" +(2073:29-2073:37) ".length;" --> (1301:29-1301:37) ".length;" +(2073:37-2073:42) " i++)" --> (1301:37-1301:42) " i++)" +(2073:42-2074:6) " {\n " --> (1301:42-1302:5) " {\n\t\t\t\t" +(2074:6-2074:10) " var" --> (1302:5-1302:9) "\tvar" +(2074:10-2074:18) " child =" --> (1302:9-1302:17) " child =" +(2074:18-2074:23) " node" --> (1302:17-1302:22) " node" +(2074:23-2076:6) "[i];\n\n " --> (1302:22-1303:0) "[i];" +(2076:6-2076:10) " if " --> (1303:0-1303:9) "\n\t\t\t\t\tif " +(2076:10-2076:25) "(isValidElement" --> (1303:9-1303:24) "(isValidElement" +(2076:25-2076:31) "(child" --> (1303:24-1303:30) "(child" +(2076:31-2076:33) "))" --> (1303:30-1303:32) "))" +(2076:33-2077:8) " {\n " --> (1303:32-1304:0) " {" +(2077:8-2077:28) " validateExplicitKey" --> (1304:0-1304:26) "\n\t\t\t\t\t\tvalidateExplicitKey" +(2077:28-2077:35) "(child," --> (1304:26-1304:33) "(child," +(2077:35-2077:46) " parentType" --> (1304:33-1304:44) " parentType" +(2077:46-2078:7) ");\n " --> (1304:44-1305:5) ");\n\t\t\t\t" +(2078:7-2079:5) "}\n " --> (1305:5-1306:4) "\t}\n\t\t\t" +(2079:5-2080:3) "}\n " --> (1306:4-1307:3) "\t}\n\t\t" +(2080:3-2080:13) "} else if " --> (1307:3-1307:14) "\t} else if " +(2080:13-2080:28) "(isValidElement" --> (1307:14-1307:29) "(isValidElement" +(2080:28-2080:33) "(node" --> (1307:29-1307:34) "(node" +(2080:33-2080:35) "))" --> (1307:34-1307:36) "))" +(2080:35-2082:4) " {\n // This element was passed in a valid location.\n " --> (1307:36-1308:0) " {" +(2082:4-2082:8) " if " --> (1308:0-1308:8) "\n\t\t\t\tif " +(2082:8-2082:13) "(node" --> (1308:8-1308:13) "(node" +(2082:13-2082:21) "._store)" --> (1308:13-1308:21) "._store)" +(2082:21-2083:6) " {\n " --> (1308:21-1309:0) " {" +(2083:6-2083:11) " node" --> (1309:0-1309:10) "\n\t\t\t\t\tnode" +(2083:11-2083:18) "._store" --> (1309:10-1309:17) "._store" +(2083:18-2083:30) ".validated =" --> (1309:17-1309:29) ".validated =" +(2083:30-2084:5) " true;\n " --> (1309:29-1310:4) " true;\n\t\t\t" +(2084:5-2085:3) "}\n " --> (1310:4-1311:3) "\t}\n\t\t" +(2085:3-2085:13) "} else if " --> (1311:3-1311:14) "\t} else if " +(2085:13-2085:19) "(node)" --> (1311:14-1311:20) "(node)" +(2085:19-2086:4) " {\n " --> (1311:20-1312:4) " {\n\t\t\t" +(2086:4-2086:8) " var" --> (1312:4-1312:8) "\tvar" +(2086:8-2086:21) " iteratorFn =" --> (1312:8-1312:21) " iteratorFn =" +(2086:21-2086:35) " getIteratorFn" --> (1312:21-1312:35) " getIteratorFn" +(2086:35-2086:40) "(node" --> (1312:35-1312:40) "(node" +(2086:40-2088:4) ");\n\n " --> (1312:40-1313:0) ");" +(2088:4-2088:15) " if (typeof" --> (1313:0-1313:15) "\n\t\t\t\tif (typeof" +(2088:15-2088:30) " iteratorFn ===" --> (1313:15-1313:30) " iteratorFn ===" +(2088:30-2088:42) " 'function')" --> (1313:30-1313:42) " \"function\")" +(2088:42-2091:6) " {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n " --> (1313:42-1314:0) " {" +(2091:6-2091:10) " if " --> (1314:0-1314:9) "\n\t\t\t\t\tif " +(2091:10-2091:25) "(iteratorFn !==" --> (1314:9-1314:24) "(iteratorFn !==" +(2091:25-2091:30) " node" --> (1314:24-1314:29) " node" +(2091:30-2091:39) ".entries)" --> (1314:29-1314:38) ".entries)" +(2091:39-2092:8) " {\n " --> (1314:38-1315:6) " {\n\t\t\t\t\t" +(2092:8-2092:12) " var" --> (1315:6-1315:10) "\tvar" +(2092:12-2092:23) " iterator =" --> (1315:10-1315:21) " iterator =" +(2092:23-2092:34) " iteratorFn" --> (1315:21-1315:32) " iteratorFn" +(2092:34-2092:39) ".call" --> (1315:32-1315:37) ".call" +(2092:39-2092:44) "(node" --> (1315:37-1315:42) "(node" +(2092:44-2093:8) ");\n " --> (1315:42-1316:6) ");\n\t\t\t\t\t" +(2093:8-2093:12) " var" --> (1316:6-1316:10) "\tvar" +(2093:12-2095:8) " step;\n\n " --> (1316:10-1317:0) " step;" +(2095:8-2095:17) " while (!" --> (1317:0-1317:15) "\n\t\t\t\t\t\twhile (!" +(2095:17-2095:24) "(step =" --> (1317:15-1317:22) "(step =" +(2095:24-2095:33) " iterator" --> (1317:22-1317:31) " iterator" +(2095:33-2095:39) ".next(" --> (1317:31-1317:37) ".next(" +(2095:39-2095:41) "))" --> (1317:37-1317:39) "))" +(2095:41-2095:47) ".done)" --> (1317:39-1317:45) ".done)" +(2095:47-2096:10) " {\n " --> (1317:45-1318:0) " {" +(2096:10-2096:14) " if " --> (1318:0-1318:11) "\n\t\t\t\t\t\t\tif " +(2096:14-2096:29) "(isValidElement" --> (1318:11-1318:26) "(isValidElement" +(2096:29-2096:34) "(step" --> (1318:26-1318:31) "(step" +(2096:34-2096:40) ".value" --> (1318:31-1318:37) ".value" +(2096:40-2096:42) "))" --> (1318:37-1318:39) "))" +(2096:42-2097:12) " {\n " --> (1318:39-1319:0) " {" +(2097:12-2097:32) " validateExplicitKey" --> (1319:0-1319:28) "\n\t\t\t\t\t\t\t\tvalidateExplicitKey" +(2097:32-2097:37) "(step" --> (1319:28-1319:33) "(step" +(2097:37-2097:44) ".value," --> (1319:33-1319:40) ".value," +(2097:44-2097:55) " parentType" --> (1319:40-1319:51) " parentType" +(2097:55-2098:11) ");\n " --> (1319:51-1320:7) ");\n\t\t\t\t\t\t" +(2098:11-2099:9) "}\n " --> (1320:7-1321:6) "\t}\n\t\t\t\t\t" +(2099:9-2100:7) "}\n " --> (1321:6-1322:5) "\t}\n\t\t\t\t" +(2100:7-2101:5) "}\n " --> (1322:5-1323:4) "\t}\n\t\t\t" +(2101:5-2102:3) "}\n " --> (1323:4-1324:3) "\t}\n\t\t" +(2102:3-2103:1) "}\n" --> (1324:3-1325:2) "\t}\n\t" +(2103:1-2112:0) "}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n" --> (1325:2-1326:2) "\t}\n\t" +(2112:0-2112:9) "\nfunction" --> (1326:2-1326:11) "\tfunction" +(2112:9-2112:27) " validatePropTypes" --> (1326:11-1326:29) " validatePropTypes" +(2112:27-2112:36) "(element)" --> (1326:29-1326:38) "(element)" +(2112:36-2113:2) " {\n " --> (1326:38-1327:3) " {\n\t\t" +(2113:2-2114:4) " {\n " --> (1327:3-1328:4) "\t{\n\t\t\t" +(2114:4-2114:8) " var" --> (1328:4-1328:8) "\tvar" +(2114:8-2114:15) " type =" --> (1328:8-1328:15) " type =" +(2114:15-2114:23) " element" --> (1328:15-1328:23) " element" +(2114:23-2116:4) ".type;\n\n " --> (1328:23-1329:0) ".type;" +(2116:4-2116:8) " if " --> (1329:0-1329:8) "\n\t\t\t\tif " +(2116:8-2116:17) "(type ===" --> (1329:8-1329:17) "(type ===" +(2116:17-2116:25) " null ||" --> (1329:17-1329:25) " null ||" +(2116:25-2116:34) " type ===" --> (1329:25-1329:34) " type ===" +(2116:34-2116:54) " undefined || typeof" --> (1329:34-1329:54) " undefined || typeof" +(2116:54-2116:63) " type ===" --> (1329:54-1329:63) " type ===" +(2116:63-2116:73) " 'string')" --> (1329:63-1329:73) " \"string\")" +(2116:73-2117:6) " {\n " --> (1329:73-1330:0) " {" +(2117:6-2118:5) " return;\n " --> (1330:0-1331:4) "\n\t\t\t\t\treturn;\n\t\t\t" +(2118:5-2120:4) "}\n\n " --> (1331:4-1332:4) "\t}\n\t\t\t" +(2120:4-2120:8) " var" --> (1332:4-1332:8) "\tvar" +(2120:8-2122:4) " propTypes;\n\n " --> (1332:8-1333:0) " propTypes;" +(2122:4-2122:15) " if (typeof" --> (1333:0-1333:15) "\n\t\t\t\tif (typeof" +(2122:15-2122:24) " type ===" --> (1333:15-1333:24) " type ===" +(2122:24-2122:36) " 'function')" --> (1333:24-1333:36) " \"function\")" +(2122:36-2123:6) " {\n " --> (1333:36-1334:0) " {" +(2123:6-2123:18) " propTypes =" --> (1334:0-1334:17) "\n\t\t\t\t\tpropTypes =" +(2123:18-2123:23) " type" --> (1334:17-1334:22) " type" +(2123:23-2124:5) ".propTypes;\n " --> (1334:22-1335:4) ".propTypes;\n\t\t\t" +(2124:5-2124:22) "} else if (typeof" --> (1335:4-1335:22) "\t} else if (typeof" +(2124:22-2124:31) " type ===" --> (1335:22-1335:31) " type ===" +(2124:31-2124:44) " 'object' && " --> (1335:31-1335:44) " \"object\" && " +(2124:44-2124:49) "(type" --> (1335:44-1335:49) "(type" +(2124:49-2124:62) ".$$typeof ===" --> (1335:49-1335:62) ".$$typeof ===" +(2124:62-2126:4) " REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n " --> (1335:62-1335:88) " REACT_FORWARD_REF_TYPE ||" +(2126:4-2126:9) " type" --> (1335:88-1335:93) " type" +(2126:9-2126:22) ".$$typeof ===" --> (1335:93-1335:106) ".$$typeof ===" +(2126:22-2126:40) " REACT_MEMO_TYPE))" --> (1335:106-1335:124) " REACT_MEMO_TYPE))" +(2126:40-2127:6) " {\n " --> (1335:124-1336:0) " {" +(2127:6-2127:18) " propTypes =" --> (1336:0-1336:17) "\n\t\t\t\t\tpropTypes =" +(2127:18-2127:23) " type" --> (1336:17-1336:22) " type" +(2127:23-2128:5) ".propTypes;\n " --> (1336:22-1337:4) ".propTypes;\n\t\t\t" +(2128:5-2128:11) "} else" --> (1337:4-1337:11) "\t} else" +(2128:11-2129:6) " {\n " --> (1337:11-1338:0) " {" +(2129:6-2130:5) " return;\n " --> (1338:0-1339:4) "\n\t\t\t\t\treturn;\n\t\t\t" +(2130:5-2132:4) "}\n\n " --> (1339:4-1340:0) "\t}" +(2132:4-2132:8) " if " --> (1340:0-1340:8) "\n\t\t\t\tif " +(2132:8-2132:19) "(propTypes)" --> (1340:8-1340:19) "(propTypes)" +(2132:19-2134:6) " {\n // Intentionally inside to avoid triggering lazy initializers:\n " --> (1340:19-1341:5) " {\n\t\t\t\t" +(2134:6-2134:10) " var" --> (1341:5-1341:9) "\tvar" +(2134:10-2134:17) " name =" --> (1341:9-1341:16) " name =" +(2134:17-2134:34) " getComponentName" --> (1341:16-1341:33) " getComponentName" +(2134:34-2134:39) "(type" --> (1341:33-1341:38) "(type" +(2134:39-2135:6) ");\n " --> (1341:38-1342:0) ");" +(2135:6-2135:21) " checkPropTypes" --> (1342:0-1342:20) "\n\t\t\t\t\tcheckPropTypes" +(2135:21-2135:32) "(propTypes," --> (1342:20-1342:31) "(propTypes," +(2135:32-2135:40) " element" --> (1342:31-1342:39) " element" +(2135:40-2135:47) ".props," --> (1342:39-1342:46) ".props," +(2135:47-2135:55) " 'prop'," --> (1342:46-1342:54) " \"prop\"," +(2135:55-2135:61) " name," --> (1342:54-1342:60) " name," +(2135:61-2135:69) " element" --> (1342:60-1342:68) " element" +(2135:69-2136:5) ");\n " --> (1342:68-1343:4) ");\n\t\t\t" +(2136:5-2136:15) "} else if " --> (1343:4-1343:15) "\t} else if " +(2136:15-2136:20) "(type" --> (1343:15-1343:20) "(type" +(2136:20-2136:34) ".PropTypes !==" --> (1343:20-1343:34) ".PropTypes !==" +(2136:34-2136:48) " undefined && " --> (1343:34-1343:48) " undefined && " +(2136:48-2136:79) "!propTypesMisspellWarningShown)" --> (1343:48-1343:79) "!propTypesMisspellWarningShown)" +(2136:79-2137:6) " {\n " --> (1343:79-1344:0) " {" +(2137:6-2137:38) " propTypesMisspellWarningShown =" --> (1344:0-1344:37) "\n\t\t\t\t\tpropTypesMisspellWarningShown =" +(2137:38-2139:6) " true; // Intentionally inside to avoid triggering lazy initializers:\n\n " --> (1344:37-1345:5) " true;\n\t\t\t\t" +(2139:6-2139:10) " var" --> (1345:5-1345:9) "\tvar" +(2139:10-2139:18) " _name =" --> (1345:9-1345:17) " _name =" +(2139:18-2139:35) " getComponentName" --> (1345:17-1345:34) " getComponentName" +(2139:35-2139:40) "(type" --> (1345:34-1345:39) "(type" +(2139:40-2141:6) ");\n\n " --> (1345:39-1346:0) ");" +(2141:6-2141:12) " error" --> (1346:0-1346:11) "\n\t\t\t\t\terror" +(2141:12-2141:115) "('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?'," --> (1346:11-1346:114) "(\"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?\"," +(2141:115-2141:124) " _name ||" --> (1346:114-1346:123) " _name ||" +(2141:124-2141:134) " 'Unknown'" --> (1346:123-1346:133) " \"Unknown\"" +(2141:134-2142:5) ");\n " --> (1346:133-1347:4) ");\n\t\t\t" +(2142:5-2144:4) "}\n\n " --> (1347:4-1348:0) "\t}" +(2144:4-2144:15) " if (typeof" --> (1348:0-1348:15) "\n\t\t\t\tif (typeof" +(2144:15-2144:20) " type" --> (1348:15-1348:20) " type" +(2144:20-2144:40) ".getDefaultProps ===" --> (1348:20-1348:40) ".getDefaultProps ===" +(2144:40-2144:55) " 'function' && " --> (1348:40-1348:55) " \"function\" && " +(2144:55-2144:60) "!type" --> (1348:55-1348:60) "!type" +(2144:60-2144:76) ".getDefaultProps" --> (1348:60-1348:76) ".getDefaultProps" +(2144:76-2144:98) ".isReactClassApproved)" --> (1348:76-1348:98) ".isReactClassApproved)" +(2144:98-2145:6) " {\n " --> (1348:98-1349:0) " {" +(2145:6-2145:12) " error" --> (1349:0-1349:11) "\n\t\t\t\t\terror" +(2145:12-2145:75) "('getDefaultProps is only used on classic React.createClass ' +" --> (1349:11-1349:74) "(\"getDefaultProps is only used on classic React.createClass \" +" +(2145:75-2145:142) " 'definitions. Use a static property named `defaultProps` instead.'" --> (1349:74-1349:141) " \"definitions. Use a static property named `defaultProps` instead.\"" +(2145:142-2146:5) ");\n " --> (1349:141-1350:4) ");\n\t\t\t" +(2146:5-2147:3) "}\n " --> (1350:4-1351:3) "\t}\n\t\t" +(2147:3-2148:1) "}\n" --> (1351:3-1352:2) "\t}\n\t" +(2148:1-2155:0) "}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n" --> (1352:2-1353:2) "\t}\n\t" +(2155:0-2155:9) "\nfunction" --> (1353:2-1353:11) "\tfunction" +(2155:9-2155:31) " validateFragmentProps" --> (1353:11-1353:33) " validateFragmentProps" +(2155:31-2155:41) "(fragment)" --> (1353:33-1353:43) "(fragment)" +(2155:41-2156:2) " {\n " --> (1353:43-1354:3) " {\n\t\t" +(2156:2-2157:4) " {\n " --> (1354:3-1355:4) "\t{\n\t\t\t" +(2157:4-2157:8) " var" --> (1355:4-1355:8) "\tvar" +(2157:8-2157:15) " keys =" --> (1355:8-1355:15) " keys =" +(2157:15-2157:22) " Object" --> (1355:15-1355:22) " Object" +(2157:22-2157:27) ".keys" --> (1355:22-1355:27) ".keys" +(2157:27-2157:36) "(fragment" --> (1355:27-1355:36) "(fragment" +(2157:36-2157:42) ".props" --> (1355:36-1355:42) ".props" +(2157:42-2159:4) ");\n\n " --> (1355:42-1356:0) ");" +(2159:4-2159:9) " for " --> (1356:0-1356:9) "\n\t\t\t\tfor " +(2159:9-2159:13) "(var" --> (1356:9-1356:13) "(var" +(2159:13-2159:17) " i =" --> (1356:13-1356:17) " i =" +(2159:17-2159:20) " 0;" --> (1356:17-1356:20) " 0;" +(2159:20-2159:24) " i <" --> (1356:20-1356:24) " i <" +(2159:24-2159:29) " keys" --> (1356:24-1356:29) " keys" +(2159:29-2159:37) ".length;" --> (1356:29-1356:37) ".length;" +(2159:37-2159:42) " i++)" --> (1356:37-1356:42) " i++)" +(2159:42-2160:6) " {\n " --> (1356:42-1357:5) " {\n\t\t\t\t" +(2160:6-2160:10) " var" --> (1357:5-1357:9) "\tvar" +(2160:10-2160:16) " key =" --> (1357:9-1357:15) " key =" +(2160:16-2160:21) " keys" --> (1357:15-1357:20) " keys" +(2160:21-2162:6) "[i];\n\n " --> (1357:20-1358:0) "[i];" +(2162:6-2162:10) " if " --> (1358:0-1358:9) "\n\t\t\t\t\tif " +(2162:10-2162:18) "(key !==" --> (1358:9-1358:17) "(key !==" +(2162:18-2162:32) " 'children' &&" --> (1358:17-1358:31) " \"children\" &&" +(2162:32-2162:40) " key !==" --> (1358:31-1358:39) " key !==" +(2162:40-2162:47) " 'key')" --> (1358:39-1358:46) " \"key\")" +(2162:47-2163:8) " {\n " --> (1358:46-1359:0) " {" +(2163:8-2163:40) " setCurrentlyValidatingElement$1" --> (1359:0-1359:38) "\n\t\t\t\t\t\tsetCurrentlyValidatingElement$1" +(2163:40-2163:49) "(fragment" --> (1359:38-1359:47) "(fragment" +(2163:49-2165:8) ");\n\n " --> (1359:47-1360:0) ");" +(2165:8-2165:14) " error" --> (1360:0-1360:12) "\n\t\t\t\t\t\terror" +(2165:14-2165:67) "('Invalid prop `%s` supplied to `React.Fragment`. ' +" --> (1360:12-1360:65) "(\"Invalid prop `%s` supplied to `React.Fragment`. \" +" +(2165:67-2165:127) " 'React.Fragment can only have `key` and `children` props.'," --> (1360:65-1360:125) " \"React.Fragment can only have `key` and `children` props.\"," +(2165:127-2165:131) " key" --> (1360:125-1360:129) " key" +(2165:131-2167:8) ");\n\n " --> (1360:129-1361:0) ");" +(2167:8-2167:40) " setCurrentlyValidatingElement$1" --> (1361:0-1361:38) "\n\t\t\t\t\t\tsetCurrentlyValidatingElement$1" +(2167:40-2167:45) "(null" --> (1361:38-1361:43) "(null" +(2167:45-2168:8) ");\n " --> (1361:43-1362:0) ");" +(2168:8-2169:7) " break;\n " --> (1362:0-1363:5) "\n\t\t\t\t\t\tbreak;\n\t\t\t\t" +(2169:7-2170:5) "}\n " --> (1363:5-1364:4) "\t}\n\t\t\t" +(2170:5-2172:4) "}\n\n " --> (1364:4-1365:0) "\t}" +(2172:4-2172:8) " if " --> (1365:0-1365:8) "\n\t\t\t\tif " +(2172:8-2172:17) "(fragment" --> (1365:8-1365:17) "(fragment" +(2172:17-2172:25) ".ref !==" --> (1365:17-1365:25) ".ref !==" +(2172:25-2172:31) " null)" --> (1365:25-1365:31) " null)" +(2172:31-2173:6) " {\n " --> (1365:31-1366:0) " {" +(2173:6-2173:38) " setCurrentlyValidatingElement$1" --> (1366:0-1366:37) "\n\t\t\t\t\tsetCurrentlyValidatingElement$1" +(2173:38-2173:47) "(fragment" --> (1366:37-1366:46) "(fragment" +(2173:47-2175:6) ");\n\n " --> (1366:46-1367:0) ");" +(2175:6-2175:12) " error" --> (1367:0-1367:11) "\n\t\t\t\t\terror" +(2175:12-2175:68) "('Invalid attribute `ref` supplied to `React.Fragment`.'" --> (1367:11-1367:67) "(\"Invalid attribute `ref` supplied to `React.Fragment`.\"" +(2175:68-2177:6) ");\n\n " --> (1367:67-1368:0) ");" +(2177:6-2177:38) " setCurrentlyValidatingElement$1" --> (1368:0-1368:37) "\n\t\t\t\t\tsetCurrentlyValidatingElement$1" +(2177:38-2177:43) "(null" --> (1368:37-1368:42) "(null" +(2177:43-2178:5) ");\n " --> (1368:42-1369:4) ");\n\t\t\t" +(2178:5-2179:3) "}\n " --> (1369:4-1370:3) "\t}\n\t\t" +(2179:3-2180:1) "}\n" --> (1370:3-1371:2) "\t}\n\t" +(2180:1-2181:0) "}" --> (1371:2-1372:2) "\t}\n\t" +(2181:0-2181:9) "\nfunction" --> (1372:2-1372:11) "\tfunction" +(2181:9-2181:37) " createElementWithValidation" --> (1372:11-1372:39) " createElementWithValidation" +(2181:37-2181:43) "(type," --> (1372:39-1372:45) "(type," +(2181:43-2181:50) " props," --> (1372:45-1372:52) " props," +(2181:50-2181:60) " children)" --> (1372:52-1372:62) " children)" +(2181:60-2182:2) " {\n " --> (1372:62-1373:3) " {\n\t\t" +(2182:2-2182:6) " var" --> (1373:3-1373:7) "\tvar" +(2182:6-2182:18) " validType =" --> (1373:7-1373:19) " validType =" +(2182:18-2182:37) " isValidElementType" --> (1373:19-1373:38) " isValidElementType" +(2182:37-2182:42) "(type" --> (1373:38-1373:43) "(type" +(2182:42-2185:2) "); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n " --> (1373:43-1374:0) ");" +(2185:2-2185:7) " if (" --> (1374:0-1374:8) "\n\t\t\tif (" +(2185:7-2185:18) "!validType)" --> (1374:8-1374:19) "!validType)" +(2185:18-2186:4) " {\n " --> (1374:19-1375:4) " {\n\t\t\t" +(2186:4-2186:8) " var" --> (1375:4-1375:8) "\tvar" +(2186:8-2186:15) " info =" --> (1375:8-1375:15) " info =" +(2186:15-2188:4) " '';\n\n " --> (1375:15-1376:0) " \"\";" +(2188:4-2188:8) " if " --> (1376:0-1376:8) "\n\t\t\t\tif " +(2188:8-2188:17) "(type ===" --> (1376:8-1376:17) "(type ===" +(2188:17-2188:37) " undefined || typeof" --> (1376:17-1376:37) " undefined || typeof" +(2188:37-2188:46) " type ===" --> (1376:37-1376:46) " type ===" +(2188:46-2188:58) " 'object' &&" --> (1376:46-1376:58) " \"object\" &&" +(2188:58-2188:67) " type !==" --> (1376:58-1376:67) " type !==" +(2188:67-2188:75) " null &&" --> (1376:67-1376:75) " null &&" +(2188:75-2188:82) " Object" --> (1376:75-1376:82) " Object" +(2188:82-2188:87) ".keys" --> (1376:82-1376:87) ".keys" +(2188:87-2188:92) "(type" --> (1376:87-1376:92) "(type" +(2188:92-2188:93) ")" --> (1376:92-1376:93) ")" +(2188:93-2188:104) ".length ===" --> (1376:93-1376:104) ".length ===" +(2188:104-2188:107) " 0)" --> (1376:104-1376:107) " 0)" +(2188:107-2189:6) " {\n " --> (1376:107-1377:0) " {" +(2189:6-2189:14) " info +=" --> (1377:0-1377:13) "\n\t\t\t\t\tinfo +=" +(2189:14-2189:77) " ' You likely forgot to export your component from the file ' +" --> (1377:13-1377:76) " \" You likely forgot to export your component from the file \" +" +(2189:77-2190:5) " \"it's defined in, or you might have mixed up default and named imports.\";\n " --> (1377:76-1378:4) " \"it's defined in, or you might have mixed up default and named imports.\";\n\t\t\t" +(2190:5-2192:4) "}\n\n " --> (1378:4-1379:4) "\t}\n\t\t\t" +(2192:4-2192:8) " var" --> (1379:4-1379:8) "\tvar" +(2192:8-2192:21) " sourceInfo =" --> (1379:8-1379:21) " sourceInfo =" +(2192:21-2192:56) " getSourceInfoErrorAddendumForProps" --> (1379:21-1379:56) " getSourceInfoErrorAddendumForProps" +(2192:56-2192:62) "(props" --> (1379:56-1379:62) "(props" +(2192:62-2194:4) ");\n\n " --> (1379:62-1380:0) ");" +(2194:4-2194:8) " if " --> (1380:0-1380:8) "\n\t\t\t\tif " +(2194:8-2194:20) "(sourceInfo)" --> (1380:8-1380:20) "(sourceInfo)" +(2194:20-2195:6) " {\n " --> (1380:20-1381:0) " {" +(2195:6-2195:14) " info +=" --> (1381:0-1381:13) "\n\t\t\t\t\tinfo +=" +(2195:14-2196:5) " sourceInfo;\n " --> (1381:13-1382:4) " sourceInfo;\n\t\t\t" +(2196:5-2196:11) "} else" --> (1382:4-1382:11) "\t} else" +(2196:11-2197:6) " {\n " --> (1382:11-1383:0) " {" +(2197:6-2197:14) " info +=" --> (1383:0-1383:13) "\n\t\t\t\t\tinfo +=" +(2197:14-2197:43) " getDeclarationErrorAddendum(" --> (1383:13-1383:42) " getDeclarationErrorAddendum(" +(2197:43-2198:5) ");\n " --> (1383:42-1384:4) ");\n\t\t\t" +(2198:5-2200:4) "}\n\n " --> (1384:4-1385:4) "\t}\n\t\t\t" +(2200:4-2200:8) " var" --> (1385:4-1385:8) "\tvar" +(2200:8-2202:4) " typeString;\n\n " --> (1385:8-1386:0) " typeString;" +(2202:4-2202:8) " if " --> (1386:0-1386:8) "\n\t\t\t\tif " +(2202:8-2202:17) "(type ===" --> (1386:8-1386:17) "(type ===" +(2202:17-2202:23) " null)" --> (1386:17-1386:23) " null)" +(2202:23-2203:6) " {\n " --> (1386:23-1387:0) " {" +(2203:6-2203:19) " typeString =" --> (1387:0-1387:18) "\n\t\t\t\t\ttypeString =" +(2203:19-2204:5) " 'null';\n " --> (1387:18-1388:4) " \"null\";\n\t\t\t" +(2204:5-2204:15) "} else if " --> (1388:4-1388:15) "\t} else if " +(2204:15-2204:21) "(Array" --> (1388:15-1388:21) "(Array" +(2204:21-2204:29) ".isArray" --> (1388:21-1388:29) ".isArray" +(2204:29-2204:34) "(type" --> (1388:29-1388:34) "(type" +(2204:34-2204:36) "))" --> (1388:34-1388:36) "))" +(2204:36-2205:6) " {\n " --> (1388:36-1389:0) " {" +(2205:6-2205:19) " typeString =" --> (1389:0-1389:18) "\n\t\t\t\t\ttypeString =" +(2205:19-2206:5) " 'array';\n " --> (1389:18-1390:4) " \"array\";\n\t\t\t" +(2206:5-2206:15) "} else if " --> (1390:4-1390:15) "\t} else if " +(2206:15-2206:24) "(type !==" --> (1390:15-1390:24) "(type !==" +(2206:24-2206:37) " undefined &&" --> (1390:24-1390:37) " undefined &&" +(2206:37-2206:42) " type" --> (1390:37-1390:42) " type" +(2206:42-2206:55) ".$$typeof ===" --> (1390:42-1390:55) ".$$typeof ===" +(2206:55-2206:75) " REACT_ELEMENT_TYPE)" --> (1390:55-1390:75) " REACT_ELEMENT_TYPE)" +(2206:75-2207:6) " {\n " --> (1390:75-1391:0) " {" +(2207:6-2207:19) " typeString =" --> (1391:0-1391:18) "\n\t\t\t\t\ttypeString =" +(2207:19-2207:26) " \"<\" + " --> (1391:18-1391:25) " \"<\" + " +(2207:26-2207:43) "(getComponentName" --> (1391:25-1391:42) "(getComponentName" +(2207:43-2207:48) "(type" --> (1391:42-1391:47) "(type" +(2207:48-2207:53) ".type" --> (1391:47-1391:52) ".type" +(2207:53-2207:57) ") ||" --> (1391:52-1391:56) ") ||" +(2207:57-2207:70) " 'Unknown') +" --> (1391:56-1391:69) " \"Unknown\") +" +(2207:70-2208:6) " \" />\";\n " --> (1391:69-1392:0) " \" />\";" +(2208:6-2208:13) " info =" --> (1392:0-1392:12) "\n\t\t\t\t\tinfo =" +(2208:13-2209:5) " ' Did you accidentally export a JSX literal instead of a component?';\n " --> (1392:12-1393:4) " \" Did you accidentally export a JSX literal instead of a component?\";\n\t\t\t" +(2209:5-2209:11) "} else" --> (1393:4-1393:11) "\t} else" +(2209:11-2210:6) " {\n " --> (1393:11-1394:0) " {" +(2210:6-2210:26) " typeString = typeof" --> (1394:0-1394:25) "\n\t\t\t\t\ttypeString = typeof" +(2210:26-2211:5) " type;\n " --> (1394:25-1395:4) " type;\n\t\t\t" +(2211:5-2213:4) "}\n\n " --> (1395:4-1396:4) "\t}\n\t\t\t" +(2213:4-2214:6) " {\n " --> (1396:4-1397:0) "\t{" +(2214:6-2214:12) " error" --> (1397:0-1397:11) "\n\t\t\t\t\terror" +(2214:12-2214:80) "('React.createElement: type is invalid -- expected a string (for ' +" --> (1397:11-1397:79) "(\"React.createElement: type is invalid -- expected a string (for \" +" +(2214:80-2214:141) " 'built-in components) or a class/function (for composite ' +" --> (1397:79-1397:140) " \"built-in components) or a class/function (for composite \" +" +(2214:141-2214:171) " 'components) but got: %s.%s'," --> (1397:140-1397:170) " \"components) but got: %s.%s\"," +(2214:171-2214:183) " typeString," --> (1397:170-1397:182) " typeString," +(2214:183-2214:188) " info" --> (1397:182-1397:187) " info" +(2214:188-2215:5) ");\n " --> (1397:187-1398:4) ");\n\t\t\t" +(2215:5-2216:3) "}\n " --> (1398:4-1399:3) "\t}\n\t\t" +(2216:3-2218:2) "}\n\n " --> (1399:3-1400:3) "\t}\n\t\t" +(2218:2-2218:6) " var" --> (1400:3-1400:7) "\tvar" +(2218:6-2218:16) " element =" --> (1400:7-1400:17) " element =" +(2218:16-2218:30) " createElement" --> (1400:17-1400:31) " createElement" +(2218:30-2218:36) ".apply" --> (1400:31-1400:37) ".apply" +(2218:36-2218:42) "(this," --> (1400:37-1400:43) "(this," +(2218:42-2218:52) " arguments" --> (1400:43-1400:53) " arguments" +(2218:52-2221:2) "); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n " --> (1400:53-1401:0) ");" +(2221:2-2221:6) " if " --> (1401:0-1401:7) "\n\t\t\tif " +(2221:6-2221:17) "(element ==" --> (1401:7-1401:18) "(element ==" +(2221:17-2221:23) " null)" --> (1401:18-1401:24) " null)" +(2221:23-2222:4) " {\n " --> (1401:24-1402:0) " {" +(2222:4-2222:11) " return" --> (1402:0-1402:11) "\n\t\t\t\treturn" +(2222:11-2223:3) " element;\n " --> (1402:11-1403:3) " element;\n\t\t" +(2223:3-2230:2) "} // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n " --> (1403:3-1404:0) "\t}" +(2230:2-2230:6) " if " --> (1404:0-1404:7) "\n\t\t\tif " +(2230:6-2230:17) "(validType)" --> (1404:7-1404:18) "(validType)" +(2230:17-2231:4) " {\n " --> (1404:18-1405:0) " {" +(2231:4-2231:9) " for " --> (1405:0-1405:9) "\n\t\t\t\tfor " +(2231:9-2231:13) "(var" --> (1405:9-1405:13) "(var" +(2231:13-2231:17) " i =" --> (1405:13-1405:17) " i =" +(2231:17-2231:20) " 2;" --> (1405:17-1405:20) " 2;" +(2231:20-2231:24) " i <" --> (1405:20-1405:24) " i <" +(2231:24-2231:34) " arguments" --> (1405:24-1405:34) " arguments" +(2231:34-2231:42) ".length;" --> (1405:34-1405:42) ".length;" +(2231:42-2231:47) " i++)" --> (1405:42-1405:47) " i++)" +(2231:47-2232:6) " {\n " --> (1405:47-1406:0) " {" +(2232:6-2232:24) " validateChildKeys" --> (1406:0-1406:23) "\n\t\t\t\t\tvalidateChildKeys" +(2232:24-2232:34) "(arguments" --> (1406:23-1406:33) "(arguments" +(2232:34-2232:38) "[i]," --> (1406:33-1406:37) "[i]," +(2232:38-2232:43) " type" --> (1406:37-1406:42) " type" +(2232:43-2233:5) ");\n " --> (1406:42-1407:4) ");\n\t\t\t" +(2233:5-2234:3) "}\n " --> (1407:4-1408:3) "\t}\n\t\t" +(2234:3-2236:2) "}\n\n " --> (1408:3-1409:0) "\t}" +(2236:2-2236:6) " if " --> (1409:0-1409:7) "\n\t\t\tif " +(2236:6-2236:15) "(type ===" --> (1409:7-1409:16) "(type ===" +(2236:15-2236:23) " exports" --> (1409:16-1409:24) " exports" +(2236:23-2236:33) ".Fragment)" --> (1409:24-1409:34) ".Fragment)" +(2236:33-2237:4) " {\n " --> (1409:34-1410:0) " {" +(2237:4-2237:26) " validateFragmentProps" --> (1410:0-1410:26) "\n\t\t\t\tvalidateFragmentProps" +(2237:26-2237:34) "(element" --> (1410:26-1410:34) "(element" +(2237:34-2238:3) ");\n " --> (1410:34-1411:3) ");\n\t\t" +(2238:3-2238:9) "} else" --> (1411:3-1411:10) "\t} else" +(2238:9-2239:4) " {\n " --> (1411:10-1412:0) " {" +(2239:4-2239:22) " validatePropTypes" --> (1412:0-1412:22) "\n\t\t\t\tvalidatePropTypes" +(2239:22-2239:30) "(element" --> (1412:22-1412:30) "(element" +(2239:30-2240:3) ");\n " --> (1412:30-1413:3) ");\n\t\t" +(2240:3-2242:2) "}\n\n " --> (1413:3-1414:0) "\t}" +(2242:2-2242:9) " return" --> (1414:0-1414:10) "\n\t\t\treturn" +(2242:9-2243:1) " element;\n" --> (1414:10-1415:2) " element;\n\t" +(2243:1-2244:0) "}" --> (1415:2-1416:2) "\t}\n\t" +(2244:0-2244:4) "\nvar" --> (1416:2-1416:6) "\tvar" +(2244:4-2244:42) " didWarnAboutDeprecatedCreateFactory =" --> (1416:6-1416:44) " didWarnAboutDeprecatedCreateFactory =" +(2244:42-2245:0) " false;" --> (1416:44-1417:2) " false;\n\t" +(2245:0-2245:9) "\nfunction" --> (1417:2-1417:11) "\tfunction" +(2245:9-2245:37) " createFactoryWithValidation" --> (1417:11-1417:39) " createFactoryWithValidation" +(2245:37-2245:43) "(type)" --> (1417:39-1417:45) "(type)" +(2245:43-2246:2) " {\n " --> (1417:45-1418:3) " {\n\t\t" +(2246:2-2246:6) " var" --> (1418:3-1418:7) "\tvar" +(2246:6-2246:25) " validatedFactory =" --> (1418:7-1418:26) " validatedFactory =" +(2246:25-2246:53) " createElementWithValidation" --> (1418:26-1418:54) " createElementWithValidation" +(2246:53-2246:58) ".bind" --> (1418:54-1418:59) ".bind" +(2246:58-2246:64) "(null," --> (1418:59-1418:65) "(null," +(2246:64-2246:69) " type" --> (1418:65-1418:70) " type" +(2246:69-2247:2) ");\n " --> (1418:70-1419:0) ");" +(2247:2-2247:19) " validatedFactory" --> (1419:0-1419:20) "\n\t\t\tvalidatedFactory" +(2247:19-2247:26) ".type =" --> (1419:20-1419:27) ".type =" +(2247:26-2249:2) " type;\n\n " --> (1419:27-1420:3) " type;\n\t\t" +(2249:2-2250:4) " {\n " --> (1420:3-1421:0) "\t{" +(2250:4-2250:9) " if (" --> (1421:0-1421:9) "\n\t\t\t\tif (" +(2250:9-2250:46) "!didWarnAboutDeprecatedCreateFactory)" --> (1421:9-1421:46) "!didWarnAboutDeprecatedCreateFactory)" +(2250:46-2251:6) " {\n " --> (1421:46-1422:0) " {" +(2251:6-2251:44) " didWarnAboutDeprecatedCreateFactory =" --> (1422:0-1422:43) "\n\t\t\t\t\tdidWarnAboutDeprecatedCreateFactory =" +(2251:44-2253:6) " true;\n\n " --> (1422:43-1423:0) " true;" +(2253:6-2253:11) " warn" --> (1423:0-1423:10) "\n\t\t\t\t\twarn" +(2253:11-2253:75) "('React.createFactory() is deprecated and will be removed in ' +" --> (1423:10-1423:74) "(\"React.createFactory() is deprecated and will be removed in \" +" +(2253:75-2253:123) " 'a future major release. Consider using JSX ' +" --> (1423:74-1423:122) " \"a future major release. Consider using JSX \" +" +(2253:123-2253:172) " 'or use React.createElement() directly instead.'" --> (1423:122-1423:171) " \"or use React.createElement() directly instead.\"" +(2253:172-2254:5) ");\n " --> (1423:171-1424:4) ");\n\t\t\t" +(2254:5-2257:4) "} // Legacy hook: remove it\n\n\n " --> (1424:4-1425:0) "\t}" +(2257:4-2257:11) " Object" --> (1425:0-1425:11) "\n\t\t\t\tObject" +(2257:11-2257:26) ".defineProperty" --> (1425:11-1425:26) ".defineProperty" +(2257:26-2257:44) "(validatedFactory," --> (1425:26-1425:44) "(validatedFactory," +(2257:44-2257:52) " 'type'," --> (1425:44-1425:52) " \"type\"," +(2257:52-2258:6) " {\n " --> (1425:52-1426:5) " {\n\t\t\t\t" +(2258:6-2258:18) " enumerable:" --> (1426:5-1426:17) "\tenumerable:" +(2258:18-2259:6) " false,\n " --> (1426:17-1427:5) " false,\n\t\t\t\t" +(2259:6-2259:11) " get:" --> (1427:5-1427:10) "\tget:" +(2259:11-2259:23) " function ()" --> (1427:10-1427:21) " function()" +(2259:23-2260:8) " {\n " --> (1427:21-1428:0) " {" +(2260:8-2260:13) " warn" --> (1428:0-1428:11) "\n\t\t\t\t\t\twarn" +(2260:13-2260:72) "('Factory.type is deprecated. Access the class directly ' +" --> (1428:11-1428:70) "(\"Factory.type is deprecated. Access the class directly \" +" +(2260:72-2260:110) " 'before passing it to createFactory.'" --> (1428:70-1428:108) " \"before passing it to createFactory.\"" +(2260:110-2262:8) ");\n\n " --> (1428:108-1429:0) ");" +(2262:8-2262:15) " Object" --> (1429:0-1429:13) "\n\t\t\t\t\t\tObject" +(2262:15-2262:30) ".defineProperty" --> (1429:13-1429:28) ".defineProperty" +(2262:30-2262:36) "(this," --> (1429:28-1429:34) "(this," +(2262:36-2262:44) " 'type'," --> (1429:34-1429:42) " \"type\"," +(2262:44-2263:10) " {\n " --> (1429:42-1429:44) " {" +(2263:10-2263:17) " value:" --> (1429:44-1429:51) " value:" +(2263:17-2264:9) " type\n " --> (1429:51-1429:56) " type" +(2264:9-2264:10) "}" --> (1429:56-1429:58) " }" +(2264:10-2265:8) ");\n " --> (1429:58-1430:0) ");" +(2265:8-2265:15) " return" --> (1430:0-1430:13) "\n\t\t\t\t\t\treturn" +(2265:15-2266:7) " type;\n " --> (1430:13-1431:5) " type;\n\t\t\t\t" +(2266:7-2267:5) "}\n " --> (1431:5-1432:4) "\t}\n\t\t\t" +(2267:5-2267:6) "}" --> (1432:4-1432:6) "\t}" +(2267:6-2268:3) ");\n " --> (1432:6-1433:3) ");\n\t\t" +(2268:3-2270:2) "}\n\n " --> (1433:3-1434:0) "\t}" +(2270:2-2270:9) " return" --> (1434:0-1434:10) "\n\t\t\treturn" +(2270:9-2271:1) " validatedFactory;\n" --> (1434:10-1435:2) " validatedFactory;\n\t" +(2271:1-2272:0) "}" --> (1435:2-1436:2) "\t}\n\t" +(2272:0-2272:9) "\nfunction" --> (1436:2-1436:11) "\tfunction" +(2272:9-2272:36) " cloneElementWithValidation" --> (1436:11-1436:38) " cloneElementWithValidation" +(2272:36-2272:45) "(element," --> (1436:38-1436:47) "(element," +(2272:45-2272:52) " props," --> (1436:47-1436:54) " props," +(2272:52-2272:62) " children)" --> (1436:54-1436:64) " children)" +(2272:62-2273:2) " {\n " --> (1436:64-1437:3) " {\n\t\t" +(2273:2-2273:6) " var" --> (1437:3-1437:7) "\tvar" +(2273:6-2273:19) " newElement =" --> (1437:7-1437:20) " newElement =" +(2273:19-2273:32) " cloneElement" --> (1437:20-1437:33) " cloneElement" +(2273:32-2273:38) ".apply" --> (1437:33-1437:39) ".apply" +(2273:38-2273:44) "(this," --> (1437:39-1437:45) "(this," +(2273:44-2273:54) " arguments" --> (1437:45-1437:55) " arguments" +(2273:54-2275:2) ");\n\n " --> (1437:55-1438:0) ");" +(2275:2-2275:7) " for " --> (1438:0-1438:8) "\n\t\t\tfor " +(2275:7-2275:11) "(var" --> (1438:8-1438:12) "(var" +(2275:11-2275:15) " i =" --> (1438:12-1438:16) " i =" +(2275:15-2275:18) " 2;" --> (1438:16-1438:19) " 2;" +(2275:18-2275:22) " i <" --> (1438:19-1438:23) " i <" +(2275:22-2275:32) " arguments" --> (1438:23-1438:33) " arguments" +(2275:32-2275:40) ".length;" --> (1438:33-1438:41) ".length;" +(2275:40-2275:45) " i++)" --> (1438:41-1438:46) " i++)" +(2275:45-2276:4) " {\n " --> (1438:46-1439:0) " {" +(2276:4-2276:22) " validateChildKeys" --> (1439:0-1439:22) "\n\t\t\t\tvalidateChildKeys" +(2276:22-2276:32) "(arguments" --> (1439:22-1439:32) "(arguments" +(2276:32-2276:36) "[i]," --> (1439:32-1439:36) "[i]," +(2276:36-2276:47) " newElement" --> (1439:36-1439:47) " newElement" +(2276:47-2276:52) ".type" --> (1439:47-1439:52) ".type" +(2276:52-2277:3) ");\n " --> (1439:52-1440:3) ");\n\t\t" +(2277:3-2279:2) "}\n\n " --> (1440:3-1441:0) "\t}" +(2279:2-2279:20) " validatePropTypes" --> (1441:0-1441:21) "\n\t\t\tvalidatePropTypes" +(2279:20-2279:31) "(newElement" --> (1441:21-1441:32) "(newElement" +(2279:31-2280:2) ");\n " --> (1441:32-1442:0) ");" +(2280:2-2280:9) " return" --> (1442:0-1442:10) "\n\t\t\treturn" +(2280:9-2281:1) " newElement;\n" --> (1442:10-1443:2) " newElement;\n\t" +(2281:1-2283:0) "}\n" --> (1443:2-1444:2) "\t}\n\t" +(2283:0-2285:2) "\n{\n\n " --> (1444:2-1445:0) "\t{" +(2285:2-2285:6) " try" --> (1445:0-1445:7) "\n\t\t\ttry" +(2285:6-2286:4) " {\n " --> (1445:7-1446:4) " {\n\t\t\t" +(2286:4-2286:8) " var" --> (1446:4-1446:8) "\tvar" +(2286:8-2286:23) " frozenObject =" --> (1446:8-1446:23) " frozenObject =" +(2286:23-2286:30) " Object" --> (1446:23-1446:30) " Object" +(2286:30-2286:37) ".freeze" --> (1446:30-1446:37) ".freeze" +(2286:37-2286:39) "({" --> (1446:37-1446:38) "(" +(2286:39-2286:40) "}" --> (1446:38-1446:40) "{}" +(2286:40-2289:4) ");\n /* eslint-disable no-new */\n\n " --> (1446:40-1447:0) ");" +(2289:4-2289:8) " new" --> (1447:0-1447:8) "\n\t\t\t\tnew" +(2289:8-2289:12) " Map" --> (1447:8-1447:12) " Map" +(2289:12-2289:13) "(" --> (1447:12-1447:13) "(" +(2289:13-2289:14) "[" --> (1447:13-1447:14) "[" +(2289:14-2289:28) "[frozenObject," --> (1447:14-1447:28) "[frozenObject," +(2289:28-2289:33) " null" --> (1447:28-1447:33) " null" +(2289:33-2289:34) "]" --> (1447:33-1447:34) "]" +(2289:34-2290:4) "]);\n " --> (1447:34-1448:0) "]);" +(2290:4-2290:8) " new" --> (1448:0-1448:8) "\n\t\t\t\tnew" +(2290:8-2290:12) " Set" --> (1448:8-1448:12) " Set" +(2290:12-2290:13) "(" --> (1448:12-1448:13) "(" +(2290:13-2290:26) "[frozenObject" --> (1448:13-1448:26) "[frozenObject" +(2290:26-2292:3) "]);\n /* eslint-enable no-new */\n " --> (1448:26-1449:3) "]);\n\t\t" +(2292:3-2292:11) "} catch " --> (1449:3-1449:12) "\t} catch " +(2292:11-2292:14) "(e)" --> (1449:12-1449:15) "(e)" +(2292:14-2293:3) " {\n " --> (1449:15-1449:16) " " +(2293:3-2294:1) "}\n" --> (1449:16-1450:2) "{}\n\t" +(2294:1-2296:0) "}\n" --> (1450:2-1451:2) "\t}\n\t" +(2296:0-2296:4) "\nvar" --> (1451:2-1451:6) "\tvar" +(2296:4-2296:23) " createElement$1 = " --> (1451:6-1451:24) " createElement$1 =" +(2296:23-2297:0) " createElementWithValidation ;" --> (1451:24-1452:2) " createElementWithValidation;\n\t" +(2297:0-2297:4) "\nvar" --> (1452:2-1452:6) "\tvar" +(2297:4-2297:22) " cloneElement$1 = " --> (1452:6-1452:23) " cloneElement$1 =" +(2297:22-2298:0) " cloneElementWithValidation ;" --> (1452:23-1453:2) " cloneElementWithValidation;\n\t" +(2298:0-2298:4) "\nvar" --> (1453:2-1453:6) "\tvar" +(2298:4-2298:21) " createFactory = " --> (1453:6-1453:22) " createFactory =" +(2298:21-2299:0) " createFactoryWithValidation ;" --> (1453:22-1454:2) " createFactoryWithValidation;\n\t" +(2299:0-2299:4) "\nvar" --> (1454:2-1454:6) "\tvar" +(2299:4-2299:15) " Children =" --> (1454:6-1454:17) " Children =" +(2299:15-2300:2) " {\n " --> (1454:17-1455:3) " {\n\t\t" +(2300:2-2300:7) " map:" --> (1455:3-1455:8) "\tmap:" +(2300:7-2301:2) " mapChildren,\n " --> (1455:8-1456:3) " mapChildren,\n\t\t" +(2301:2-2301:11) " forEach:" --> (1456:3-1456:12) "\tforEach:" +(2301:11-2302:2) " forEachChildren,\n " --> (1456:12-1457:3) " forEachChildren,\n\t\t" +(2302:2-2302:9) " count:" --> (1457:3-1457:10) "\tcount:" +(2302:9-2303:11) " countChildren,\n toArray:" --> (1457:10-1458:3) " countChildren,\n\t\t" +(2303:11-2304:2) " toArray,\n " --> (1458:3-1459:3) "\ttoArray,\n\t\t" +(2304:2-2304:8) " only:" --> (1459:3-1459:9) "\tonly:" +(2304:8-2305:1) " onlyChild\n" --> (1459:9-1460:2) " onlyChild\n\t" +(2305:1-2307:0) "};\n" --> (1460:2-1461:0) "\t};" +(2307:0-2307:8) "\nexports" --> (1461:0-1461:10) "\n\t\texports" +(2307:8-2307:19) ".Children =" --> (1461:10-1461:21) ".Children =" +(2307:19-2308:0) " Children;" --> (1461:21-1462:0) " Children;" +(2308:0-2308:8) "\nexports" --> (1462:0-1462:10) "\n\t\texports" +(2308:8-2308:20) ".Component =" --> (1462:10-1462:22) ".Component =" +(2308:20-2309:0) " Component;" --> (1462:22-1463:0) " Component;" +(2309:0-2309:8) "\nexports" --> (1463:0-1463:10) "\n\t\texports" +(2309:8-2309:24) ".PureComponent =" --> (1463:10-1463:26) ".PureComponent =" +(2309:24-2310:0) " PureComponent;" --> (1463:26-1464:0) " PureComponent;" +(2310:0-2310:8) "\nexports" --> (1464:0-1464:10) "\n\t\texports" +(2310:8-2310:61) ".__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =" --> (1464:10-1464:63) ".__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =" +(2310:61-2311:0) " ReactSharedInternals;" --> (1464:63-1465:0) " ReactSharedInternals;" +(2311:0-2311:8) "\nexports" --> (1465:0-1465:10) "\n\t\texports" +(2311:8-2311:23) ".cloneElement =" --> (1465:10-1465:25) ".cloneElement =" +(2311:23-2312:0) " cloneElement$1;" --> (1465:25-1466:0) " cloneElement$1;" +(2312:0-2312:8) "\nexports" --> (1466:0-1466:10) "\n\t\texports" +(2312:8-2312:24) ".createContext =" --> (1466:10-1466:26) ".createContext =" +(2312:24-2313:0) " createContext;" --> (1466:26-1467:0) " createContext;" +(2313:0-2313:8) "\nexports" --> (1467:0-1467:10) "\n\t\texports" +(2313:8-2313:24) ".createElement =" --> (1467:10-1467:26) ".createElement =" +(2313:24-2314:0) " createElement$1;" --> (1467:26-1468:0) " createElement$1;" +(2314:0-2314:8) "\nexports" --> (1468:0-1468:10) "\n\t\texports" +(2314:8-2314:24) ".createFactory =" --> (1468:10-1468:26) ".createFactory =" +(2314:24-2315:0) " createFactory;" --> (1468:26-1469:0) " createFactory;" +(2315:0-2315:8) "\nexports" --> (1469:0-1469:10) "\n\t\texports" +(2315:8-2315:20) ".createRef =" --> (1469:10-1469:22) ".createRef =" +(2315:20-2316:0) " createRef;" --> (1469:22-1470:0) " createRef;" +(2316:0-2316:8) "\nexports" --> (1470:0-1470:10) "\n\t\texports" +(2316:8-2316:21) ".forwardRef =" --> (1470:10-1470:23) ".forwardRef =" +(2316:21-2317:0) " forwardRef;" --> (1470:23-1471:0) " forwardRef;" +(2317:0-2317:8) "\nexports" --> (1471:0-1471:10) "\n\t\texports" +(2317:8-2317:25) ".isValidElement =" --> (1471:10-1471:27) ".isValidElement =" +(2317:25-2318:0) " isValidElement;" --> (1471:27-1472:0) " isValidElement;" +(2318:0-2318:8) "\nexports" --> (1472:0-1472:10) "\n\t\texports" +(2318:8-2318:15) ".lazy =" --> (1472:10-1472:17) ".lazy =" +(2318:15-2319:0) " lazy;" --> (1472:17-1473:0) " lazy;" +(2319:0-2319:8) "\nexports" --> (1473:0-1473:10) "\n\t\texports" +(2319:8-2319:15) ".memo =" --> (1473:10-1473:17) ".memo =" +(2319:15-2320:0) " memo;" --> (1473:17-1474:0) " memo;" +(2320:0-2320:8) "\nexports" --> (1474:0-1474:10) "\n\t\texports" +(2320:8-2320:22) ".useCallback =" --> (1474:10-1474:24) ".useCallback =" +(2320:22-2321:0) " useCallback;" --> (1474:24-1475:0) " useCallback;" +(2321:0-2321:8) "\nexports" --> (1475:0-1475:10) "\n\t\texports" +(2321:8-2321:21) ".useContext =" --> (1475:10-1475:23) ".useContext =" +(2321:21-2322:0) " useContext;" --> (1475:23-1476:0) " useContext;" +(2322:0-2322:8) "\nexports" --> (1476:0-1476:10) "\n\t\texports" +(2322:8-2322:24) ".useDebugValue =" --> (1476:10-1476:26) ".useDebugValue =" +(2322:24-2323:0) " useDebugValue;" --> (1476:26-1477:0) " useDebugValue;" +(2323:0-2323:8) "\nexports" --> (1477:0-1477:10) "\n\t\texports" +(2323:8-2323:20) ".useEffect =" --> (1477:10-1477:22) ".useEffect =" +(2323:20-2324:0) " useEffect;" --> (1477:22-1478:0) " useEffect;" +(2324:0-2324:8) "\nexports" --> (1478:0-1478:10) "\n\t\texports" +(2324:8-2324:30) ".useImperativeHandle =" --> (1478:10-1478:32) ".useImperativeHandle =" +(2324:30-2325:0) " useImperativeHandle;" --> (1478:32-1479:0) " useImperativeHandle;" +(2325:0-2325:8) "\nexports" --> (1479:0-1479:10) "\n\t\texports" +(2325:8-2325:26) ".useLayoutEffect =" --> (1479:10-1479:28) ".useLayoutEffect =" +(2325:26-2326:0) " useLayoutEffect;" --> (1479:28-1480:0) " useLayoutEffect;" +(2326:0-2326:8) "\nexports" --> (1480:0-1480:10) "\n\t\texports" +(2326:8-2326:18) ".useMemo =" --> (1480:10-1480:20) ".useMemo =" +(2326:18-2327:0) " useMemo;" --> (1480:20-1481:0) " useMemo;" +(2327:0-2327:8) "\nexports" --> (1481:0-1481:10) "\n\t\texports" +(2327:8-2327:21) ".useReducer =" --> (1481:10-1481:23) ".useReducer =" +(2327:21-2328:0) " useReducer;" --> (1481:23-1482:0) " useReducer;" +(2328:0-2328:8) "\nexports" --> (1482:0-1482:10) "\n\t\texports" +(2328:8-2328:17) ".useRef =" --> (1482:10-1482:19) ".useRef =" +(2328:17-2329:0) " useRef;" --> (1482:19-1483:0) " useRef;" +(2329:0-2329:8) "\nexports" --> (1483:0-1483:10) "\n\t\texports" +(2329:8-2329:19) ".useState =" --> (1483:10-1483:21) ".useState =" +(2329:19-2330:0) " useState;" --> (1483:21-1484:0) " useState;" +(2330:0-2330:8) "\nexports" --> (1484:0-1484:10) "\n\t\texports" +(2330:8-2330:18) ".version =" --> (1484:10-1484:20) ".version =" +(2330:18-2331:3) " ReactVersion;\n " --> (1484:20-1485:1) " ReactVersion;\n" +(2331:3-2331:6) "})(" --> (1485:1-1485:5) "\t})(" +(2331:6-2332:1) ");\n" --> (1485:5-1486:0) ");" +(2332:1-2333:1) "}\n" --> (1486:0-1487:1) "\n}\n" + - string-literal-newline/input.js diff --git a/tasks/coverage/minifier_test262.snap b/tasks/coverage/minifier_test262.snap index 66336a0659aac..8eaa256428305 100644 --- a/tasks/coverage/minifier_test262.snap +++ b/tasks/coverage/minifier_test262.snap @@ -1,8 +1,8 @@ commit: a1587416 minifier_test262 Summary: -AST Parsed : 46406/46406 (100.00%) -Positive Passed: 46402/46406 (99.99%) +AST Parsed : 46466/46466 (100.00%) +Positive Passed: 46462/46466 (99.99%) Expect to Parse: "language/expressions/logical-and/S11.11.1_A3_T4.js" Expect to Parse: "language/expressions/logical-not/S9.2_A1_T2.js" Expect to Parse: "language/statements/if/S12.5_A1.1_T1.js" diff --git a/tasks/coverage/parser_babel.snap b/tasks/coverage/parser_babel.snap index 13aa9e204baf7..25aad3e883271 100644 --- a/tasks/coverage/parser_babel.snap +++ b/tasks/coverage/parser_babel.snap @@ -2,7 +2,7 @@ commit: 12619ffe parser_babel Summary: AST Parsed : 2093/2101 (99.62%) -Positive Passed: 2082/2101 (99.10%) +Positive Passed: 2083/2101 (99.14%) Negative Passed: 1380/1501 (91.94%) Expect Syntax Error: "annex-b/disabled/1.1-html-comments-close/input.js" Expect Syntax Error: "annex-b/disabled/3.1-sloppy-labeled-functions/input.js" @@ -142,9 +142,6 @@ Expect to Parse: "core/opts/allowNewTargetOutsideFunction-true/input.js" · ────────── ╰──── help: new.target is only allowed in constructors and functions invoked using thew `new` operator -Expect to Parse: "core/uncategorised/331/input.js" - - × Invalid braced quantifier Expect to Parse: "typescript/arrow-function/generic-tsx-babel-7/input.ts" × Expected `<` but found `EOF` @@ -1720,6 +1717,13 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" 2 │ / ╰──── + × Invalid atom escape + ╭─[core/uncategorised/441/input.js:1:3] + 1 │ /a\ + · ─ + 2 │ / + ╰──── + × Unexpected token ╭─[core/uncategorised/441/input.js:2:2] 1 │ /a\ @@ -8956,6 +8960,13 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" 2 │ / ╰──── + × Invalid atom escape + ╭─[esprima/invalid-syntax/migrated_0157/input.js:1:3] + 1 │ /a\ + · ─ + 2 │ / + ╰──── + × Unexpected token ╭─[esprima/invalid-syntax/migrated_0157/input.js:3:1] 2 │ / diff --git a/tasks/coverage/parser_test262.snap b/tasks/coverage/parser_test262.snap index a21e69ce77917..76d4b47459b4e 100644 --- a/tasks/coverage/parser_test262.snap +++ b/tasks/coverage/parser_test262.snap @@ -2,10599 +2,2223 @@ commit: a1587416 parser_test262 Summary: AST Parsed : 46466/46466 (100.00%) -Positive Passed: 45405/46466 (97.72%) +Positive Passed: 46376/46466 (99.81%) Negative Passed: 4301/4307 (99.86%) Expect Syntax Error: "language/import/import-assertions/json-invalid.js" Expect Syntax Error: "language/import/import-assertions/json-named-bindings.js" Expect Syntax Error: "language/import/import-attributes/json-invalid.js" Expect Syntax Error: "language/import/import-attributes/json-named-bindings.js" -Expect Syntax Error: "language/literals/regexp/early-err-pattern.js" -Expect Syntax Error: "language/literals/regexp/u-invalid-legacy-octal-escape.js" -Expect to Parse: "annexB/built-ins/RegExp/RegExp-control-escape-russian-letter.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u.js" +Expect Syntax Error: "language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4.js" +Expect to Parse: "annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js" - × Invalid braced quantifier -Expect to Parse: "annexB/built-ins/RegExp/RegExp-decimal-escape-class-range.js" + × Invalid hexadecimal escape + ╭─[annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js:13:9] + 12 │ // Hex escape + 13 │ assert(/\x/.test("x"), "/\\x/"); + · ── + 14 │ assert(/\xa/.test("xa"), "/\\xa/"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "annexB/built-ins/RegExp/RegExp-invalid-control-escape-character-class-range.js" + × Invalid hexadecimal escape + ╭─[annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js:14:9] + 13 │ assert(/\x/.test("x"), "/\\x/"); + 14 │ assert(/\xa/.test("xa"), "/\\xa/"); + · ── + 15 │ + ╰──── +Expect to Parse: "annexB/language/literals/regexp/class-escape.js" × Invalid atom escape -Expect to Parse: "annexB/built-ins/RegExp/RegExp-invalid-control-escape-character-class.js" - - × Invalid braced quantifier -Expect to Parse: "annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js" + ╭─[annexB/language/literals/regexp/class-escape.js:30:10] + 29 │ + 30 │ match = /\c0/.exec('\x0f\x10\x11'); + · ─ + 31 │ assert.sameValue(match, null, '\\c0 outside of CharacterClass'); + ╰──── - × Invalid escape + × Invalid atom escape + ╭─[annexB/language/literals/regexp/class-escape.js:39:10] + 38 │ + 39 │ match = /\c1/.exec('\x10\x11\x12'); + · ─ + 40 │ assert.sameValue(match, null, '\\c1 outside of CharacterClass'); + ╰──── - × Invalid escape + × Invalid atom escape + ╭─[annexB/language/literals/regexp/class-escape.js:48:10] + 47 │ + 48 │ match = /\c8/.exec('\x17\x18\x19'); + · ─ + 49 │ assert.sameValue(match, null, '\\c8 outside of CharacterClass'); + ╰──── - × Invalid escape + × Invalid atom escape + ╭─[annexB/language/literals/regexp/class-escape.js:57:10] + 56 │ + 57 │ match = /\c9/.exec('\x18\x19\x1a'); + · ─ + 58 │ assert.sameValue(match, null, '\\c9 outside of CharacterClass'); + ╰──── - × Invalid escape -Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/index/this-not-regexp-constructor.js" + × Invalid atom escape + ╭─[annexB/language/literals/regexp/class-escape.js:66:10] + 65 │ + 66 │ match = /\c_/.exec('\x1e\x1f\x20'); + · ─ + 67 │ assert.sameValue(match, null, '\\c_ outside of CharacterClass'); + ╰──── +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-exec.js" - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/input/this-not-regexp-constructor.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/lastMatch/this-not-regexp-constructor.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/lastParen/this-not-regexp-constructor.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/leftContext/this-not-regexp-constructor.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/legacy-accessors/rightContext/this-not-regexp-constructor.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/named-groups/non-unicode-malformed-lookbehind.js" + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/named-groups/non-unicode-malformed.js" + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-group-property-enumeration-order.js" - × Character class range out of order + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-match-indices.js" - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-match.js" - × Character class range out of order + × Duplicated group name - × Character class range out of order -Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/duplicate-named-capturing-groups-syntax.js" + × Duplicated group name × Duplicated group name -Expect to Parse: "annexB/built-ins/RegExp/prototype/compile/pattern-string-invalid.js" - × Numbers out of order in braced quantifier -Expect to Parse: "annexB/built-ins/RegExp/prototype/flags/order-after-compile.js" + × Duplicated group name - × Unterminated capturing group name -Expect to Parse: "annexB/language/literals/regexp/class-escape.js" + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-matchall.js" - × Invalid atom escape + × Duplicated group name - × Invalid atom escape + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-replace.js" - × Invalid atom escape + × Duplicated group name - × Invalid atom escape -Expect to Parse: "annexB/language/literals/regexp/extended-pattern-char.js" + × Duplicated group name - × Invalid braced quantifier + × Duplicated group name - × Invalid braced quantifier + × Duplicated group name - × Invalid braced quantifier + × Duplicated group name - × Invalid braced quantifier -Expect to Parse: "annexB/language/literals/regexp/identity-escape.js" + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-replaceall.js" - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-search.js" - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-split.js" - × Too many capturing groups + × Duplicated group name - × Too many capturing groups -Expect to Parse: "annexB/language/literals/regexp/legacy-octal-escape.js" + × Duplicated group name +Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-test.js" - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js" - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js:34:25] + 33 │ testPropertyEscapes( + 34 │ /^\p{General_Category=cntrl}+$/u, + · ───── + 35 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js:49:11] + 48 │ testPropertyEscapes( + 49 │ /^\p{gc=cntrl}+$/u, + · ───── + 50 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js:64:8] + 63 │ testPropertyEscapes( + 64 │ /^\p{cntrl}+$/u, + · ───── + 65 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js:89:25] + 88 │ testPropertyEscapes( + 89 │ /^\P{General_Category=cntrl}+$/u, + · ───── + 90 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js:104:11] + 103 │ testPropertyEscapes( + 104 │ /^\P{gc=cntrl}+$/u, + · ───── + 105 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js:119:8] + 118 │ testPropertyEscapes( + 119 │ /^\P{cntrl}+$/u, + · ───── + 120 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js" - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js:96:25] + 95 │ testPropertyEscapes( + 96 │ /^\p{General_Category=digit}+$/u, + · ───── + 97 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js:111:11] + 110 │ testPropertyEscapes( + 111 │ /^\p{gc=digit}+$/u, + · ───── + 112 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js:126:8] + 125 │ testPropertyEscapes( + 126 │ /^\p{digit}+$/u, + · ───── + 127 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js:214:25] + 213 │ testPropertyEscapes( + 214 │ /^\P{General_Category=digit}+$/u, + · ───── + 215 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js:229:11] + 228 │ testPropertyEscapes( + 229 │ /^\P{gc=digit}+$/u, + · ───── + 230 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js:244:8] + 243 │ testPropertyEscapes( + 244 │ /^\P{digit}+$/u, + · ───── + 245 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js" - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js:343:25] + 342 │ testPropertyEscapes( + 343 │ /^\p{General_Category=Combining_Mark}+$/u, + · ────────────── + 344 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js:358:11] + 357 │ testPropertyEscapes( + 358 │ /^\p{gc=Combining_Mark}+$/u, + · ────────────── + 359 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js:373:8] + 372 │ testPropertyEscapes( + 373 │ /^\p{Combining_Mark}+$/u, + · ────────────── + 374 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js:708:25] + 707 │ testPropertyEscapes( + 708 │ /^\P{General_Category=Combining_Mark}+$/u, + · ────────────── + 709 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js:723:11] + 722 │ testPropertyEscapes( + 723 │ /^\P{gc=Combining_Mark}+$/u, + · ────────────── + 724 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js:738:8] + 737 │ testPropertyEscapes( + 738 │ /^\P{Combining_Mark}+$/u, + · ────────────── + 739 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js" - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js:224:25] + 223 │ testPropertyEscapes( + 224 │ /^\p{General_Category=punct}+$/u, + · ───── + 225 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js:239:11] + 238 │ testPropertyEscapes( + 239 │ /^\p{gc=punct}+$/u, + · ───── + 240 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js:254:8] + 253 │ testPropertyEscapes( + 254 │ /^\p{punct}+$/u, + · ───── + 255 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js:470:25] + 469 │ testPropertyEscapes( + 470 │ /^\P{General_Category=punct}+$/u, + · ───── + 471 │ nonMatchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js:485:11] + 484 │ testPropertyEscapes( + 485 │ /^\P{gc=punct}+$/u, + · ───── + 486 │ nonMatchSymbols, + ╰──── - × Too many capturing groups -Expect to Parse: "built-ins/Array/prototype/findLast/predicate-is-not-callable-throws.js" + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js:500:8] + 499 │ testPropertyEscapes( + 500 │ /^\P{punct}+$/u, + · ───── + 501 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js" - × Character class range out of order -Expect to Parse: "built-ins/Array/prototype/findLastIndex/predicate-is-not-callable-throws.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js:35:15] + 34 │ testPropertyEscapes( + 35 │ /^\p{Script=Qaac}+$/u, + · ──── + 36 │ matchSymbols, + ╰──── - × Character class range out of order -Expect to Parse: "built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js:50:11] + 49 │ testPropertyEscapes( + 50 │ /^\p{sc=Qaac}+$/u, + · ──── + 51 │ matchSymbols, + ╰──── - × Too many capturing groups + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js:77:15] + 76 │ testPropertyEscapes( + 77 │ /^\P{Script=Qaac}+$/u, + · ──── + 78 │ nonMatchSymbols, + ╰──── - × Too many capturing groups -Expect to Parse: "built-ins/Array/prototype/toSorted/comparefn-not-a-function.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js:92:11] + 91 │ testPropertyEscapes( + 92 │ /^\P{sc=Qaac}+$/u, + · ──── + 93 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js" - × Character class range out of order -Expect to Parse: "built-ins/Function/prototype/apply/this-not-callable-realm.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js:62:15] + 61 │ testPropertyEscapes( + 62 │ /^\p{Script=Qaai}+$/u, + · ──── + 63 │ matchSymbols, + ╰──── - × Character class range out of order -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js:77:11] + 76 │ testPropertyEscapes( + 77 │ /^\p{sc=Qaai}+$/u, + · ──── + 78 │ matchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js:131:15] + 130 │ testPropertyEscapes( + 131 │ /^\P{Script=Qaai}+$/u, + · ──── + 132 │ nonMatchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js:146:11] + 145 │ testPropertyEscapes( + 146 │ /^\P{sc=Qaai}+$/u, + · ──── + 147 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js" - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js:36:26] + 35 │ testPropertyEscapes( + 36 │ /^\p{Script_Extensions=Qaac}+$/u, + · ──── + 37 │ matchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js:51:12] + 50 │ testPropertyEscapes( + 51 │ /^\p{scx=Qaac}+$/u, + · ──── + 52 │ matchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js:79:26] + 78 │ testPropertyEscapes( + 79 │ /^\P{Script_Extensions=Qaac}+$/u, + · ──── + 80 │ nonMatchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js:94:12] + 93 │ testPropertyEscapes( + 94 │ /^\P{scx=Qaac}+$/u, + · ──── + 95 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js" - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js:53:26] + 52 │ testPropertyEscapes( + 53 │ /^\p{Script_Extensions=Qaai}+$/u, + · ──── + 54 │ matchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js:68:12] + 67 │ testPropertyEscapes( + 68 │ /^\p{scx=Qaai}+$/u, + · ──── + 69 │ matchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js:113:26] + 112 │ testPropertyEscapes( + 113 │ /^\P{Script_Extensions=Qaai}+$/u, + · ──── + 114 │ nonMatchSymbols, + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js" + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js:128:12] + 127 │ testPropertyEscapes( + 128 │ /^\P{scx=Qaai}+$/u, + · ──── + 129 │ nonMatchSymbols, + ╰──── +Expect to Parse: "built-ins/RegExp/prototype/exec/duplicate-named-groups-properties.js" - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js" + × Duplicated group name - × Unterminated capturing group -Expect to Parse: "built-ins/RegExp/S15.10.2.10_A4.1_T1.js" + × Duplicated group name +Expect to Parse: "built-ins/RegExp/prototype/exec/duplicate-named-indices-groups-properties.js" - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-dotAll-property.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-dotAll-property.js:36:12] + 35 │ + 36 │ var re1 = /(?s:)/; + · ── + 37 │ assert(!re1.dotAll, "RegExp instance dotAll flag should not be set"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-dotAll-property.js:42:12] + 41 │ + 42 │ var re3 = /(?s-:)/; + · ── + 43 │ assert(!re3.dotAll, "RegExp instance dotAll flag should not be set"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js:42:12] + 41 │ + 42 │ var re1 = /(?s:.es)/; + · ── + 43 │ assert(re1.test("aes"), "s should match s in modified group"); + ╰──── - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T8.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js:48:12] + 47 │ + 48 │ var re2 = /(?s:.es)/i; + · ── + 49 │ assert(re2.test("aes"), "s should match s in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.11_A1_T9.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js:54:12] + 53 │ + 54 │ var re3 = /(?s-:.es)/; + · ── + 55 │ assert(re3.test("aes"), "s should match s in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.12_A3_T5.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js:60:12] + 59 │ + 60 │ var re4 = /(?s-:.es)/i; + · ── + 61 │ assert(re4.test("aes"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js" - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js:42:12] + 41 │ + 42 │ var re1 = /(?s:.es$)/; + · ── + 43 │ assert(re1.test("\nes"), ". should match newline in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.12_A4_T5.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js:46:12] + 45 │ + 46 │ var re2 = /(?s:.es$)/m; + · ── + 47 │ assert(re2.test("\nes"), ". should match newline in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js:50:12] + 49 │ + 50 │ var re3 = /(?s-:.es$)/; + · ── + 51 │ assert(re3.test("\nes"), ". should match newline in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T10.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js:54:12] + 53 │ + 54 │ var re4 = /(?s-:.es$)/m; + · ── + 55 │ assert(re4.test("\nes"), ". should match newline in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T11.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll.js:36:12] + 35 │ + 36 │ var re1 = /(?s:^.$)/; + · ── + 37 │ assert(re1.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T12.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-dotAll.js:70:12] + 69 │ + 70 │ var re3 = /(?s-:^.$)/; + · ── + 71 │ assert(re3.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-backreferences.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T13.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-backreferences.js:42:15] + 41 │ + 42 │ var re1 = /(a)(?i:\1)/; + · ── + 43 │ assert(!re1.test("AA"), "a should not match first A"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T15.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A1_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A2_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.13_A3_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T13.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T15.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T16.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T17.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.3_A1_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.5_A1_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A1_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A2_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A3_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A4_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A5_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A5_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.6_A6_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A1_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T1.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T2.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T3.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A2_T4.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T13.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A3_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T13.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T15.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T16.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T17.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T18.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T19.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T20.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A4_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A5_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T1.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T2.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T3.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T4.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T5.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.7_A6_T6.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A2_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T13.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T17.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T19.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T20.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T21.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T22.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T23.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T24.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T25.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T26.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T27.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T28.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T29.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T30.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T31.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T32.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T33.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A3_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T1.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T2.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T3.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T4.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T5.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T6.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T7.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T8.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A4_T9.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A5_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.8_A5_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/S15.10.2.9_A1_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/character-class-escape-non-whitespace.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/dotall/with-dotall-unicode.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/dotall/with-dotall.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/dotall/without-dotall-unicode.js" - - × Could not parse the entire pattern - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/lookBehind/alternations.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/back-references-to-captures.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/back-references.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/lookBehind/captures-negative.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/captures.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/do-not-backtrack.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/greedy-loop.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/misc.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/mutual-recursive.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/negative.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/nested-lookaround.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/simple-fixed-length.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/lookBehind/sliced-strings.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/start-of-line.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/lookBehind/sticky.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/variable-length.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/lookBehind/word-boundary.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-element.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-matched.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-non-unicode-match.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-properties.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-unicode-match.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-unicode-property-names.js" - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/match-indices/indices-array-unmatched.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-array.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-object-undefined.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-object-unmatched.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-object.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-groups-properties.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/indices-property.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/match-indices/no-indices-array.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-exec.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-group-property-enumeration-order.js" - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-match-indices.js" - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-match.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-matchall.js" - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-replace.js" - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-replaceall.js" - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-search.js" - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-split.js" - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/duplicate-names-test.js" - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/groups-object-undefined.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/named-groups/groups-object-unmatched.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/named-groups/groups-object.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/named-groups/groups-properties.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/named-groups/lookbehind.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-match.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-property-names-valid.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-property-names.js" - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/named-groups/non-unicode-references.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/unicode-match.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/unicode-property-names-valid.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/unicode-property-names.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/named-groups/unicode-references.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/property-escapes/character-class.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/ASCII.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/ASCII_Hex_Digit.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Alphabetic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Any.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Assigned.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Bidi_Control.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Bidi_Mirrored.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Case_Ignorable.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Cased.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Casefolded.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Casemapped.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Lowercased.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Titlecased.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Changes_When_Uppercased.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Dash.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Default_Ignorable_Code_Point.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Deprecated.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Diacritic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Component.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Modifier.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Modifier_Base.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Emoji_Presentation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Extended_Pictographic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Extender.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Cased_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Close_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Connector_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Control.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Currency_Symbol.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Dash_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Enclosing_Mark.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Final_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Format.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Initial_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Letter_Number.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Line_Separator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Lowercase_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Math_Symbol.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Symbol.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Nonspacing_Mark.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Number.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Open_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Number.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Paragraph_Separator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Private_Use.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Separator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Space_Separator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Spacing_Mark.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Surrogate.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Titlecase_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/General_Category_-_Uppercase_Letter.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Grapheme_Base.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Grapheme_Extend.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Hex_Digit.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/IDS_Binary_Operator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/IDS_Trinary_Operator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/ID_Continue.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/ID_Start.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Ideographic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Join_Control.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Logical_Order_Exception.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Lowercase.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Math.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Noncharacter_Code_Point.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Pattern_Syntax.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Pattern_White_Space.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Quotation_Mark.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Radical.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Regional_Indicator.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Adlam.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ahom.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Anatolian_Hieroglyphs.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Arabic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Armenian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Avestan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Balinese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bamum.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bassa_Vah.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Batak.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bengali.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bhaiksuki.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Bopomofo.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Brahmi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Braille.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Buginese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Buhid.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Canadian_Aboriginal.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Carian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Caucasian_Albanian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Chakma.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cherokee.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Chorasmian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Common.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Coptic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cuneiform.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cypriot.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cypro_Minoan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Cyrillic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Deseret.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Devanagari.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Dives_Akuru.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Dogra.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Duployan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Egyptian_Hieroglyphs.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Elbasan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Elymaic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ethiopic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Georgian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Glagolitic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gothic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Grantha.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Greek.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gujarati.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gunjala_Gondi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Gurmukhi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Han.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hangul.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hanifi_Rohingya.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hanunoo.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hatran.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hebrew.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Hiragana.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Imperial_Aramaic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inscriptional_Pahlavi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Inscriptional_Parthian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Javanese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kaithi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kannada.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Katakana.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kawi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kayah_Li.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Kharoshthi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khitan_Small_Script.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khmer.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khojki.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Khudawadi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lao.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Latin.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lepcha.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Limbu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Linear_A.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Linear_B.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lisu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lycian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Lydian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mahajani.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Makasar.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Malayalam.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mandaic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Manichaean.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Marchen.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Masaram_Gondi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Medefaidrin.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Meetei_Mayek.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mende_Kikakui.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Meroitic_Cursive.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Meroitic_Hieroglyphs.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Miao.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Modi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mongolian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Mro.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Multani.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Myanmar.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nabataean.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nag_Mundari.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nandinagari.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_New_Tai_Lue.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Newa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nko.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nushu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Nyiakeng_Puachue_Hmong.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ogham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ol_Chiki.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Hungarian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Italic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_North_Arabian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Permic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Persian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Sogdian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_South_Arabian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Turkic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Old_Uyghur.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Oriya.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Osage.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Osmanya.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Pahawh_Hmong.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Palmyrene.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Pau_Cin_Hau.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Phags_Pa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Phoenician.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Psalter_Pahlavi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Rejang.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Runic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Samaritan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Saurashtra.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sharada.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Shavian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Siddham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_SignWriting.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sinhala.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sogdian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sora_Sompeng.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Soyombo.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Sundanese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Syloti_Nagri.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Syriac.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tagalog.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tagbanwa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tai_Le.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tai_Tham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tai_Viet.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Takri.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tamil.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tangsa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tangut.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Telugu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Thaana.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Thai.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tibetan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tifinagh.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Tirhuta.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Toto.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Ugaritic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Vai.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Vithkuqi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Wancho.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Warang_Citi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Yezidi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Yi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_-_Zanabazar_Square.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Adlam.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ahom.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Anatolian_Hieroglyphs.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Arabic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Armenian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Avestan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Balinese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bamum.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bassa_Vah.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Batak.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bengali.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bhaiksuki.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bopomofo.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Brahmi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Braille.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Buginese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Buhid.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Canadian_Aboriginal.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Carian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Caucasian_Albanian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Chakma.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cherokee.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Chorasmian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cuneiform.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cypriot.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cypro_Minoan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cyrillic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Deseret.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Devanagari.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Dives_Akuru.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Dogra.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Duployan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Egyptian_Hieroglyphs.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elbasan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elymaic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ethiopic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Georgian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Glagolitic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gothic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Grantha.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Greek.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gujarati.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gunjala_Gondi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gurmukhi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hangul.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hanifi_Rohingya.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hanunoo.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hatran.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hebrew.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hiragana.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Imperial_Aramaic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inscriptional_Pahlavi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inscriptional_Parthian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Javanese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kaithi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kannada.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kawi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kayah_Li.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kharoshthi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khitan_Small_Script.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khmer.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khojki.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khudawadi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lao.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Latin.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lepcha.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Limbu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Linear_A.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Linear_B.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lisu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lycian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lydian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mahajani.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Makasar.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Malayalam.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mandaic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Manichaean.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Marchen.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Masaram_Gondi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Medefaidrin.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meetei_Mayek.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mende_Kikakui.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Cursive.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Hieroglyphs.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Miao.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Modi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mongolian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mro.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Multani.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Myanmar.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nabataean.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nag_Mundari.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nandinagari.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_New_Tai_Lue.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Newa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nko.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nushu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nyiakeng_Puachue_Hmong.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ogham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ol_Chiki.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Hungarian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Italic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_North_Arabian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Permic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Persian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Sogdian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_South_Arabian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Turkic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Uyghur.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Oriya.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osage.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osmanya.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Pahawh_Hmong.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Palmyrene.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Pau_Cin_Hau.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phags_Pa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phoenician.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Psalter_Pahlavi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Rejang.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Runic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Samaritan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Saurashtra.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sharada.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Shavian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Siddham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_SignWriting.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sinhala.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sogdian.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sora_Sompeng.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Soyombo.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sundanese.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syloti_Nagri.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syriac.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagalog.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagbanwa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Le.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Tham.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Viet.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Takri.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tamil.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tangsa.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tangut.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Telugu.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thaana.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thai.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tibetan.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tifinagh.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tirhuta.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Toto.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ugaritic.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Vai.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Vithkuqi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Wancho.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Warang_Citi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yezidi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yi.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Zanabazar_Square.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Soft_Dotted.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Terminal_Punctuation.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Uppercase.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/Variation_Selector.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/White_Space.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/XID_Continue.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/XID_Start.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-coerce-lastindex.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-infer-unicode.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/builtin-y-coerce-lastindex-err.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/coerce-global.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/flags-tostring-error.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/get-global-err.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.match/get-unicode-error.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-is-undefined.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-is-not-constructor.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-is-null-or-undefined.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-throws.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-constructor.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-regexp-get-global-throws.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/species-regexp-get-unicode-throws.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/string-tostring.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-get-flags-throws.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-get-flags.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-lastindex-cached.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-tolength-lastindex-throws.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-tostring-flags-throws.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.matchAll/this-tostring-flags.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/coerce-lastindex-err.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/coerce-lastindex.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/flags-tostring-error.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/fn-invoke-args-empty-result.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/get-global-err.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/get-unicode-error.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/named-groups-fn.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/named-groups.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/poisoned-stdlib.js" - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-err.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-prop-err.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups-prop.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-groups.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-index-undefined.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-index.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-matched-global.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-coerce-matched.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-groups-err.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.replace/result-get-groups-prop-err.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/Symbol.search/u-lastindex-advance.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/Symbol.split/splitter-proto-from-ctor-realm.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/prototype/dotAll/this-val-regexp.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T13.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T14.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T15.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T17.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T18.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T19.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T20.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T21.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T10.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T11.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T12.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T2.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T3.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T4.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T5.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T6.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T7.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T8.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T9.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T1.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/duplicate-named-groups-properties.js" - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/prototype/exec/duplicate-named-indices-groups-properties.js" - - × Duplicated group name - - × Duplicated group name -Expect to Parse: "built-ins/RegExp/prototype/exec/failure-g-lastindex-reset.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/exec/failure-lastindex-access.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/exec/failure-lastindex-set.js" - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/exec/success-g-lastindex-no-access.js" - - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExp/prototype/exec/success-lastindex-access.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/exec/u-captured-value.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/exec/u-lastindex-adv.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/exec/u-lastindex-value.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/flags/this-val-regexp.js" - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/prototype/hasIndices/this-val-regexp.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/prototype/source/value-u.js" - - × Could not parse the entire pattern - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/unicode/this-val-regexp.js" - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/prototype/unicodeSets/this-val-regexp.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-dotAll-property.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-ignoreCase-flag.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll-does-not-affect-multiline-flag.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-dotAll.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-backreferences.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-p.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-b.js" - - × Could not parse the entire pattern - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-p.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-w.js" - - × Could not parse the entire pattern - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-ignoreCase-property.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-multiline-property.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline.js" - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-remove-modifiers.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-dotAll-flag-does-not-affect-dotAll-modifier.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-ignoreCase-flag-does-not-affect-ignoreCase-modifier.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-multiline-flag-does-not-affect-multiline-modifier.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nested-add-remove-modifiers.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-dotAll-within-remove-dotAll.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-ignoreCase-within-remove-ignoreCase.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-multiline-within-remove-multiline.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-dotAll-within-add-dotAll.js" - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-ignoreCase-within-add-ignoreCase.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-multiline-within-add-multiline.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-dotAll-property.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-ignoreCase-flag.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-multiline-flag.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll.js" - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-backreferences.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterClasses.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterEscapes.js" - - × Character class range out of order - - × Character class range out of order - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-b.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-p.js" - - × Unterminated unicode property escape -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-w.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-b.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-p.js" - - × Unterminated unicode property escape -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-w.js" - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-dotAll-flag.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-ignoreCase-property.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-multiline-flag.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-dotAll-flag.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-ignoreCase-flag.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-multiline-property.js" - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline.js" - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-nested.js" - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js" - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-nested.js" - - × Unterminated capturing group name - - × Unterminated capturing group name - - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-difference-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-class-union-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-difference-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-intersection-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-string-literal.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-string-literal.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-string-literal.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/character-union-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-string-literal.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-string-literal.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-string-literal.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-13.1.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-14.0.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-15.0.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-15.1.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-class-escape.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-class.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-property-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-property-of-strings-escape.js" - - × Character set class range out of order -Expect to Parse: "built-ins/RegExp/unicodeSets/generated/string-literal-union-string-literal.js" - - × Unterminated character class -Expect to Parse: "built-ins/RegExp/unicode_character_class_backspace_escape.js" - - × Character class range out of order - - × Character class range out of order -Expect to Parse: "built-ins/RegExp/unicode_full_case_folding.js" - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExp/unicode_identity_escape.js" - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups - - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-backreferences.js:48:15] + 47 │ + 48 │ var re2 = /(a)(?i-:\1)/; + · ── + 49 │ assert(!re2.test("AA"), "a should not match first A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js:42:12] + 41 │ + 42 │ var re1 = /(?i:[ab])c/; + · ── + 43 │ assert(re1.test("ac"), "[ab] should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js:48:12] + 47 │ + 48 │ var re2 = /(?i-:[ab])c/; + · ── + 49 │ assert(re2.test("ac"), "[ab] should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js:54:12] + 53 │ + 54 │ var re3 = /(?i:[^ab])c/; + · ── + 55 │ assert(!re3.test("ac"), "[^ab] should not match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterClasses.js:60:12] + 59 │ + 60 │ var re4 = /(?i-:[^ab])c/; + · ── + 61 │ assert(!re4.test("ac"), "[^ab] should not match a"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js:42:12] + 41 │ + 42 │ var re1 = /(?i:\x61)b/; + · ── + 43 │ assert(re1.test("ab"), "\\x61 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js:46:12] + 45 │ + 46 │ var re2 = /(?i:\u0061)b/; + · ── + 47 │ assert(re2.test("ab"), "\\u0061 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js:50:12] + 49 │ + 50 │ var re3 = /(?i:\u{0061})b/u; + · ── + 51 │ assert(re3.test("ab"), "\\u0061 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js:54:12] + 53 │ + 54 │ var re4 = /(?i-:\x61)b/; + · ── + 55 │ assert(re4.test("ab"), "\\x61 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js:58:12] + 57 │ + 58 │ var re5 = /(?i-:\u0061)b/; + · ── + 59 │ assert(re5.test("ab"), "\\u0061 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-characterEscapes.js:62:12] + 61 │ + 62 │ var re6 = /(?i-:\u{0061})b/u; + · ── + 63 │ assert(re6.test("ab"), "\\u0061 should match a"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js:48:12] + 47 │ + 48 │ var re1 = /(?i:\b)/; + · ── + 49 │ assert(re1.test("A"), "\\b should match after A"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js:54:12] + 53 │ + 54 │ var re2 = /(?i:\b)/u; + · ── + 55 │ assert(re2.test("A"), "\\b should match after A"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js:62:12] + 61 │ + 62 │ var re3 = /(?i-:\b)/; + · ── + 63 │ assert(re3.test("A"), "\\b should match after A"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-b.js:68:12] + 67 │ + 68 │ var re4 = /(?i-:\b)/u; + · ── + 69 │ assert(re4.test("A"), "\\b should match after A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-p.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-p.js:48:12] + 47 │ + 48 │ var re1 = /(?i:\p{Lu})/u; + · ── + 49 │ assert(re1.test("A"), "\\p{Lu} should match A"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-p.js:54:12] + 53 │ + 54 │ var re2 = /(?i-:\p{Lu})/u; + · ── + 55 │ assert(re2.test("A"), "\\p{Lu} should match A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js" - × Too many capturing groups -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js:48:12] + 47 │ + 48 │ var re1 = /(?i:\w)/; + · ── + 49 │ assert(re1.test("A"), "\\w should match A"); + ╰──── - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js:54:12] + 53 │ + 54 │ var re2 = /(?i:\w)/u; + · ── + 55 │ assert(re2.test("A"), "\\w should match A"); + ╰──── - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js:62:12] + 61 │ + 62 │ var re3 = /(?i-:\w)/; + · ── + 63 │ assert(re3.test("A"), "\\w should match A"); + ╰──── - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-not-callable.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js:68:12] + 67 │ + 68 │ var re4 = /(?i-:\w)/u; + · ── + 69 │ assert(re4.test("A"), "\\w should match A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-b.js" - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-b.js:48:12] + 47 │ + 48 │ var re1 = /(?i:Z\B)/u; + · ── + 49 │ assert(re1.test("Z\u017f"), "\\B should match between Z and \u017f"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/next-iteration-global.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-b.js:52:12] + 51 │ + 52 │ var re2 = /(?i-:Z\B)/u; + · ── + 53 │ assert(re2.test("Z\u017f"), "\\B should match between Z and \u017f"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-p.js" - × Unterminated capturing group name -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/next-iteration.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-p.js:48:12] + 47 │ + 48 │ var re1 = /(?i:\P{Lu})/u; + · ── + 49 │ assert(re1.test("A"), "\\P{Lu} should match A (ignores case)"); + ╰──── - × Could not parse the entire pattern -Expect to Parse: "built-ins/RegExpStringIteratorPrototype/next/regexp-tolength-lastindex-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-p.js:55:12] + 54 │ + 55 │ var re2 = /(?i-:\P{Lu})/u; + · ── + 56 │ assert(re2.test("A"), "\\P{Lu} should match A (ignores case)"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-w.js" - × Unterminated capturing group name -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T10.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-w.js:48:12] + 47 │ + 48 │ var re1 = /(?i:\W)/u; + · ── + 49 │ assert(!re1.test("\u017f"), "\\W should not match \u017f"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T11.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-w.js:52:12] + 51 │ + 52 │ var re2 = /(?i-:\W)/u; + · ── + 53 │ assert(!re2.test("\u017f"), "\\W should not match \u017f"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T2.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js:42:12] + 41 │ + 42 │ var re1 = /(?i:.es)/; + · ── + 43 │ assert(re1.test("aes"), ". should match a in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js:48:12] + 47 │ + 48 │ var re2 = /(?i:.es)/s; + · ── + 49 │ assert(re2.test("aes"), ". should match a in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js:54:12] + 53 │ + 54 │ var re3 = /(?i-:.es)/; + · ── + 55 │ assert(re3.test("aes"), ". should match a in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-dotAll-flag.js:60:12] + 59 │ + 60 │ var re4 = /(?i-:.es)/s; + · ── + 61 │ assert(re4.test("aes"), ". should match a in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-ignoreCase-property.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T3.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-ignoreCase-property.js:42:12] + 41 │ + 42 │ var re1 = /(?i:)/; + · ── + 43 │ assert(!re1.ignoreCase, "RegExp instance ignoreCase property should not be set"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-ignoreCase-property.js:48:12] + 47 │ + 48 │ var re3 = /(?i-:)/; + · ── + 49 │ assert(!re3.ignoreCase, "RegExp instance ignoreCase property should not be set"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js" - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js:42:12] + 41 │ + 42 │ var re1 = /(?i:es$)/; + · ── + 43 │ assert(re1.test("es"), "s should match s in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js:48:12] + 47 │ + 48 │ var re2 = /(?i:es$)/m; + · ── + 49 │ assert(re2.test("es"), "s should match s in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T4.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js:54:12] + 53 │ + 54 │ var re3 = /(?i-:es$)/; + · ── + 55 │ assert(re3.test("es"), "s should match s in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase-does-not-affect-multiline-flag.js:60:12] + 59 │ + 60 │ var re4 = /(?i-:es$)/m; + · ── + 61 │ assert(re4.test("es"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-ignoreCase.js" - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-ignoreCase.js:36:12] + 35 │ + 36 │ var re1 = /(?i:a)b/; + · ── + 37 │ assert(!re1.test("AB"), "b should not match B in AB"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js" - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js:42:12] + 41 │ + 42 │ var re1 = /(?m:es.$)/; + · ── + 43 │ assert(re1.test("esz\n"), "$ should match newline in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T5.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js:46:12] + 45 │ + 46 │ var re2 = /(?m:es.$)/s; + · ── + 47 │ assert(re2.test("esz\n"), "$ should match newline in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js:50:12] + 49 │ + 50 │ var re3 = /(?m-:es.$)/; + · ── + 51 │ assert(re3.test("esz\n"), "$ should match newline in modified group"); + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-dotAll-flag.js:54:12] + 53 │ + 54 │ var re4 = /(?m-:es.$)/s; + · ── + 55 │ assert(re4.test("esz\n"), "$ should match newline in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js" - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js:42:12] + 41 │ + 42 │ var re1 = /(?m:es$)/; + · ── + 43 │ assert(re1.test("es"), "s should match s in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T6.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js:48:12] + 47 │ + 48 │ var re2 = /(?m:es$)/i; + · ── + 49 │ assert(re2.test("es"), "s should match s in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js:54:12] + 53 │ + 54 │ var re3 = /(?m-:es$)/; + · ── + 55 │ assert(re3.test("es"), "s should match s in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-ignoreCase-flag.js:60:12] + 59 │ + 60 │ var re4 = /(?m-:es$)/i; + · ── + 61 │ assert(re4.test("es"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-multiline-property.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-multiline-property.js:36:12] + 35 │ + 36 │ var re1 = /(?m:)/; + · ── + 37 │ assert(!re1.multiline, "RegExp instance multiline flag should not be set"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline-does-not-affect-multiline-property.js:42:12] + 41 │ + 42 │ var re3 = /(?m-:)/; + · ── + 43 │ assert(!re3.multiline, "RegExp instance multiline flag should not be set"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-multiline.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline.js:36:12] + 35 │ + 36 │ var re1 = /(?m:es$)/; + · ── + 37 │ assert(re1.test("es\ns"), "$ should match newline in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-multiline.js:42:12] + 41 │ + 42 │ var re3 = /(?m-:es$)/; + · ── + 43 │ assert(re3.test("es\ns"), "$ should match newline in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/add-remove-modifiers.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/add-remove-modifiers.js:36:12] + 35 │ + 36 │ var re1 = /(?m-i:^a$)/i; + · ── + 37 │ assert(!re1.test("A\n"), "Should not match 'A\\n'"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-dotAll-flag-does-not-affect-dotAll-modifier.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/changing-dotAll-flag-does-not-affect-dotAll-modifier.js:42:23] + 41 │ + 42 │ var re1 = new RegExp(/(?s:^.$)/s, ""); + · ── + 43 │ assert(re1.test("a"), "Pattern character '.' still should match non-line terminators in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/changing-dotAll-flag-does-not-affect-dotAll-modifier.js:59:23] + 58 │ + 59 │ var re2 = new RegExp(/(?-s:^.$)/, "s"); + · ── + 60 │ assert(re2.test("a"), "Pattern character '.' still should match non-line terminators in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-ignoreCase-flag-does-not-affect-ignoreCase-modifier.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/changing-ignoreCase-flag-does-not-affect-ignoreCase-modifier.js:42:23] + 41 │ + 42 │ var re1 = new RegExp(/(?i:aB)/i, ""); + · ── + 43 │ assert(re1.test("AB"), "still should ignore case in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/changing-ignoreCase-flag-does-not-affect-ignoreCase-modifier.js:48:23] + 47 │ + 48 │ var re2 = new RegExp(/(?-i:aB)/, "i"); + · ── + 49 │ assert(!re2.test("AB"), "still should preserve case in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/changing-multiline-flag-does-not-affect-multiline-modifier.js" - × Too many capturing groups -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T8.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/changing-multiline-flag-does-not-affect-multiline-modifier.js:42:23] + 41 │ + 42 │ var re1 = new RegExp(/(?m:es$)/m, ""); + · ── + 43 │ assert(re1.test("es"), "$ still should match end of input in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/S15.5.4.10_A2_T9.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/changing-multiline-flag-does-not-affect-multiline-modifier.js:46:24] + 45 │ + 46 │ var re2 = new RegExp(/^(?-m:es$)/, "m"); + · ── + 47 │ assert(re2.test("es"), "$ still should match end of input in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nested-add-remove-modifiers.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/match/duplicate-named-groups-properties.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nested-add-remove-modifiers.js:36:12] + 35 │ + 36 │ var re1 = /(?m:^(?-i:a)$)/i; + · ── + 37 │ assert(!re1.test("A\n"), "Should not match 'A\\n'"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-dotAll-within-remove-dotAll.js" - × Duplicated group name + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-add-dotAll-within-remove-dotAll.js:36:12] + 35 │ + 36 │ var re1 = /(?-s:(?s:^.$))/s; + · ── + 37 │ assert(re1.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── - × Duplicated group name -Expect to Parse: "built-ins/String/prototype/match/duplicate-named-indices-groups-properties.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-add-dotAll-within-remove-dotAll.js:53:12] + 52 │ + 53 │ var re2 = /(?-s:(?s-:^.$))/s; + · ── + 54 │ assert(re2.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-ignoreCase-within-remove-ignoreCase.js" - × Duplicated group name + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-add-ignoreCase-within-remove-ignoreCase.js:36:12] + 35 │ + 36 │ var re1 = /(?-i:a(?i:b))c/i; + · ── + 37 │ assert(!re1.test("ABC"), "a should not match A in ABC"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-add-multiline-within-remove-multiline.js" - × Duplicated group name -Expect to Parse: "built-ins/String/prototype/matchAll/flags-nonglobal-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-add-multiline-within-remove-multiline.js:36:12] + 35 │ + 36 │ var re1 = /(?-m:es(?m:$)|js$)/m; + · ── + 37 │ assert(re1.test("es\ns"), "$ should match newline in modified group"); + ╰──── - × Unterminated capturing group -Expect to Parse: "built-ins/String/prototype/matchAll/regexp-matchAll-is-undefined-or-null.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-add-multiline-within-remove-multiline.js:41:12] + 40 │ + 41 │ var re2 = /(?-m:es(?m-:$)|js$)/m; + · ── + 42 │ assert(re2.test("es\ns"), "$ should match newline in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-dotAll-within-add-dotAll.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/matchAll/regexp-prototype-matchAll-invocation.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-remove-dotAll-within-add-dotAll.js:36:12] + 35 │ + 36 │ var re1 = /(?s:(?-s:^.$))/; + · ── + 37 │ assert(re1.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/matchAll/toString-this-val.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-remove-dotAll-within-add-dotAll.js:53:12] + 52 │ + 53 │ var re2 = /(?s-:(?-s:^.$))/; + · ── + 54 │ assert(re2.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-ignoreCase-within-add-ignoreCase.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/replaceAll/searchValue-get-flags-abrupt.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-remove-ignoreCase-within-add-ignoreCase.js:36:12] + 35 │ + 36 │ var re1 = /(?-i:a(?i:b))c/i; + · ── + 37 │ assert(!re1.test("ABC"), "a should not match A in ABC"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/nesting-remove-multiline-within-add-multiline.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-remove-multiline-within-add-multiline.js:36:12] + 35 │ + 36 │ var re1 = /(?m:es$|(?-m:js$))/; + · ── + 37 │ assert(re1.test("es\ns"), "first $ should match newline in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/nesting-remove-multiline-within-add-multiline.js:41:12] + 40 │ + 41 │ var re2 = /(?m-:es$|(?-m:js$))/; + · ── + 42 │ assert(re2.test("es\ns"), "first $ should match newline in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-dotAll-property.js" - × Too many capturing groups -Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-a-z-and-instance-is-string-abc.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-dotAll-property.js:36:12] + 35 │ + 36 │ var re1 = /(?-s:^.$)/s; + · ── + 37 │ assert(re1.dotAll, "RegExp instance dotAll flag should still be set"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-ignoreCase-flag.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-and-instance-is-number.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-ignoreCase-flag.js:36:12] + 35 │ + 36 │ var re1 = /(?-s:.es)/s; + · ── + 37 │ assert(re1.test("aes"), "s should match s in modified group"); + ╰──── - × Could not parse the entire pattern -Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-d-and-instance-is-string-dfe23iu-34-65.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-ignoreCase-flag.js:42:12] + 41 │ + 42 │ var re2 = /(?-s:.es)/si; + · ── + 43 │ assert(re2.test("aes"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-multiline-flag.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/split/argument-is-regexp-s-and-instance-is-string-a-b-c-de-f.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-multiline-flag.js:36:12] + 35 │ + 36 │ var re1 = /(?-s:.es$)/s; + · ── + 37 │ assert(re1.test("aes"), ". should match a in modified group"); + ╰──── - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/split/arguments-are-regexp-s-and-3-and-instance-is-string-a-b-c-de-f.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-dotAll-does-not-affect-multiline-flag.js:42:12] + 41 │ + 42 │ var re2 = /(?-s:.es$)/sm; + · ── + 43 │ assert(re2.test("aes"), ". should match a in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-dotAll.js" - × Invalid braced quantifier -Expect to Parse: "built-ins/String/prototype/split/separator-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-dotAll.js:36:12] + 35 │ + 36 │ var re1 = /(?-s:^.$)/s; + · ── + 37 │ assert(re1.test("a"), "Pattern character '.' should match non-line terminators in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-backreferences.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-backreferences.js:36:15] + 35 │ + 36 │ var re1 = /(a)(?-i:\1)/i; + · ── + 37 │ assert(re1.test("AA"), "a matches first A, so \\1 should match second A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterClasses.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterClasses.js:42:12] + 41 │ + 42 │ var re1 = /(?-i:[ab])c/i; + · ── + 43 │ assert(re1.test("ac"), "[ab] should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterClasses.js:48:12] + 47 │ + 48 │ var re2 = /(?-i:[^ab])c/i; + · ── + 49 │ assert(!re2.test("ac"), "[^ab] should not match a"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterEscapes.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterEscapes.js:36:12] + 35 │ + 36 │ var re1 = /(?-i:\x61)b/i; + · ── + 37 │ assert(re1.test("ab"), "\\x61 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterEscapes.js:41:12] + 40 │ + 41 │ var re2 = /(?-i:\u0061)b/i; + · ── + 42 │ assert(re2.test("ab"), "\\u0061 should match a"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-characterEscapes.js:46:12] + 45 │ + 46 │ var re3 = /(?-i:\u{0061})b/iu; + · ── + 47 │ assert(re3.test("ab"), "\\u0061 should match a"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-b.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-b.js:48:12] + 47 │ + 48 │ var re1 = /(?-i:\b)/ui; + · ── + 49 │ assert(!re1.test("\u017f"), "\\b should not match after \u017f"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-p.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-p.js:48:12] + 47 │ + 48 │ var re1 = /(?-i:\p{Lu})/ui; + · ── + 49 │ assert(re1.test("A"), "\\p{Lu} should match A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-w.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-w.js:48:12] + 47 │ + 48 │ var re1 = /(?-i:\w)/ui; + · ── + 49 │ assert(!re1.test("\u017f"), "\\w should not match \u017f"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-b.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-b.js:48:12] + 47 │ + 48 │ var re1 = /(?-i:Z\B)/ui; + · ── + 49 │ assert(!re1.test("Z\u017f"), "\\B should not match between Z and \u017f"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-p.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-p.js:48:12] + 47 │ + 48 │ var re1 = /(?-i:\P{Lu})/ui; + · ── + 49 │ assert(!re1.test("A"), "\\P{Lu} should not match A"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-w.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-w.js:48:12] + 47 │ + 48 │ var re1 = /(?-i:\W)/ui; + · ── + 49 │ assert(re1.test("\u017f"), "\\W should match \u017f"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-dotAll-flag.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-dotAll-flag.js:36:12] + 35 │ + 36 │ var re1 = /(?-i:.es)/i; + · ── + 37 │ assert(re1.test("aes"), "s should match s in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-dotAll-flag.js:42:12] + 41 │ + 42 │ var re2 = /(?-i:.es)/is; + · ── + 43 │ assert(re2.test("aes"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-ignoreCase-property.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-ignoreCase-property.js:42:12] + 41 │ + 42 │ var re1 = /(?-i:)/i; + · ── + 43 │ assert(re1.ignoreCase, "RegExp instance ignoreCase property should still be set"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-multiline-flag.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-multiline-flag.js:36:12] + 35 │ + 36 │ var re1 = /(?-i:es$)/i; + · ── + 37 │ assert(re1.test("es"), "s should match s in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase-does-not-affect-multiline-flag.js:42:12] + 41 │ + 42 │ var re2 = /(?-i:es$)/im; + · ── + 43 │ assert(re2.test("es"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-ignoreCase.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-ignoreCase.js:36:12] + 35 │ + 36 │ var re1 = /(?-i:fo)o/i; + · ── + 37 │ assert(!re1.test("FOO"), "Pattern should not match as modified group does not ignore case"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-dotAll-flag.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-dotAll-flag.js:36:12] + 35 │ + 36 │ var re1 = /(?-m:es.$)/m; + · ── + 37 │ assert(re1.test("esz"), ". should match z in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-dotAll-flag.js:42:12] + 41 │ + 42 │ var re2 = /(?-m:es.$)/ms; + · ── + 43 │ assert(re2.test("esz"), ". should match z in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-ignoreCase-flag.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-ignoreCase-flag.js:36:12] + 35 │ + 36 │ var re1 = /(?-m:es$)/m; + · ── + 37 │ assert(re1.test("es"), "s should match s in modified group"); + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-ignoreCase-flag.js:42:12] + 41 │ + 42 │ var re2 = /(?-m:es$)/mi; + · ── + 43 │ assert(re2.test("es"), "s should match s in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-multiline-property.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-multiline-does-not-affect-multiline-property.js:36:12] + 35 │ + 36 │ var re1 = /(?-m:)/m; + · ── + 37 │ assert(re1.multiline, "RegExp instance multiline flag should still be set"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/remove-multiline.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/remove-multiline.js:36:13] + 35 │ + 36 │ var re1 = /^(?-m:es$)/m; + · ── + 37 │ assert(!re1.test("\nes\ns"), "$ should not match newline in modified group"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js" - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:36:2] + 35 │ + 36 │ /(?i-:)/; + · ── + 37 │ /(?is-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:37:2] + 36 │ /(?i-:)/; + 37 │ /(?is-:)/; + · ── + 38 │ /(?im-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:38:2] + 37 │ /(?is-:)/; + 38 │ /(?im-:)/; + · ── + 39 │ /(?s-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:39:2] + 38 │ /(?im-:)/; + 39 │ /(?s-:)/; + · ── + 40 │ /(?si-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:40:2] + 39 │ /(?s-:)/; + 40 │ /(?si-:)/; + · ── + 41 │ /(?sm-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:41:2] + 40 │ /(?si-:)/; + 41 │ /(?sm-:)/; + · ── + 42 │ /(?m-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:42:2] + 41 │ /(?sm-:)/; + 42 │ /(?m-:)/; + · ── + 43 │ /(?mi-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:43:2] + 42 │ /(?m-:)/; + 43 │ /(?mi-:)/; + · ── + 44 │ /(?ms-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:44:2] + 43 │ /(?mi-:)/; + 44 │ /(?ms-:)/; + · ── + 45 │ /(?ims-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:45:2] + 44 │ /(?ms-:)/; + 45 │ /(?ims-:)/; + · ── + 46 │ /(?ism-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:46:2] + 45 │ /(?ims-:)/; + 46 │ /(?ism-:)/; + · ── + 47 │ /(?sim-:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:47:2] + 46 │ /(?ism-:)/; + 47 │ /(?sim-:)/; + · ── + 48 │ /(?smi-:)/; + ╰──── - × Too many capturing groups -Expect to Parse: "built-ins/String/prototype/split/transferred-to-number-separator-override-tostring-returns-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:48:2] + 47 │ /(?sim-:)/; + 48 │ /(?smi-:)/; + · ── + 49 │ /(?mis-:)/; + ╰──── - × Could not parse the entire pattern -Expect to Parse: "built-ins/TypedArray/prototype/findLast/BigInt/predicate-is-not-callable-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:49:2] + 48 │ /(?smi-:)/; + 49 │ /(?mis-:)/; + · ── + 50 │ /(?msi-:)/; + ╰──── - × Character class range out of order -Expect to Parse: "built-ins/TypedArray/prototype/findLast/predicate-is-not-callable-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers-can-have-empty-remove-modifiers.js:50:2] + 49 │ /(?mis-:)/; + 50 │ /(?msi-:)/; + · ── + 51 │ new RegExp("(?i-:)"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js" - × Character class range out of order -Expect to Parse: "built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-is-not-callable-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:36:2] + 35 │ + 36 │ /(?i-s:)/; + · ── + 37 │ /(?i-sm:)/; + ╰──── - × Character class range out of order -Expect to Parse: "built-ins/TypedArray/prototype/findLastIndex/predicate-is-not-callable-throws.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:37:2] + 36 │ /(?i-s:)/; + 37 │ /(?i-sm:)/; + · ── + 38 │ /(?i-m:)/; + ╰──── - × Character class range out of order -Expect to Parse: "built-ins/TypedArray/prototype/toSorted/comparefn-not-a-function.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:38:2] + 37 │ /(?i-sm:)/; + 38 │ /(?i-m:)/; + · ── + 39 │ /(?i-ms:)/; + ╰──── - × Character class range out of order -Expect to Parse: "intl402/DateTimeFormat/prototype/format/proleptic-gregorian-calendar.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:39:2] + 38 │ /(?i-m:)/; + 39 │ /(?i-ms:)/; + · ── + 40 │ /(?s-i:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:40:2] + 39 │ /(?i-ms:)/; + 40 │ /(?s-i:)/; + · ── + 41 │ /(?s-im:)/; + ╰──── - × Character class range out of order -Expect to Parse: "intl402/Intl/supportedValuesOf/calendars.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:41:2] + 40 │ /(?s-i:)/; + 41 │ /(?s-im:)/; + · ── + 42 │ /(?s-m:)/; + ╰──── - × Character class range out of order -Expect to Parse: "intl402/Intl/supportedValuesOf/collations.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:42:2] + 41 │ /(?s-im:)/; + 42 │ /(?s-m:)/; + · ── + 43 │ /(?s-mi:)/; + ╰──── - × Character class range out of order -Expect to Parse: "intl402/Intl/supportedValuesOf/currencies.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:43:2] + 42 │ /(?s-m:)/; + 43 │ /(?s-mi:)/; + · ── + 44 │ /(?m-i:)/; + ╰──── - × Character class range out of order -Expect to Parse: "intl402/Intl/supportedValuesOf/numberingSystems.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:44:2] + 43 │ /(?s-mi:)/; + 44 │ /(?m-i:)/; + · ── + 45 │ /(?m-is:)/; + ╰──── - × Character class range out of order -Expect to Parse: "intl402/Locale/likely-subtags-grandfathered.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:45:2] + 44 │ /(?m-i:)/; + 45 │ /(?m-is:)/; + · ── + 46 │ /(?m-s:)/; + ╰──── - × Too many capturing groups + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:46:2] + 45 │ /(?m-is:)/; + 46 │ /(?m-s:)/; + · ── + 47 │ /(?m-si:)/; + ╰──── - × Too many capturing groups -Expect to Parse: "language/expressions/optional-chaining/member-expression.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:47:2] + 46 │ /(?m-s:)/; + 47 │ /(?m-si:)/; + · ── + 48 │ /(?is-m:)/; + ╰──── - × Too many capturing groups -Expect to Parse: "language/literals/regexp/inequality.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:48:2] + 47 │ /(?m-si:)/; + 48 │ /(?is-m:)/; + · ── + 49 │ /(?im-s:)/; + ╰──── - × Invalid braced quantifier + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:49:2] + 48 │ /(?is-m:)/; + 49 │ /(?im-s:)/; + · ── + 50 │ /(?si-m:)/; + ╰──── - × Invalid braced quantifier -Expect to Parse: "language/literals/regexp/named-groups/forward-reference.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:50:2] + 49 │ /(?im-s:)/; + 50 │ /(?si-m:)/; + · ── + 51 │ /(?sm-i:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/literals/regexp/u-null-character-escape.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:51:2] + 50 │ /(?si-m:)/; + 51 │ /(?sm-i:)/; + · ── + 52 │ /(?mi-s:)/; + ╰──── - × Invalid atom escape + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:52:2] + 51 │ /(?sm-i:)/; + 52 │ /(?mi-s:)/; + · ── + 53 │ /(?ms-i:)/; + ╰──── - × Invalid atom escape + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-and-remove-modifiers.js:53:2] + 52 │ /(?mi-s:)/; + 53 │ /(?ms-i:)/; + · ── + 54 │ new RegExp("(?i-s:)"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-nested.js" - × Invalid atom escape + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-nested.js:36:2] + 35 │ + 36 │ /(?i:(?i:))/; + · ── + 37 │ /(?s:(?s:))/; + ╰──── - × Invalid atom escape -Expect to Parse: "language/literals/regexp/u-surrogate-pairs.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-nested.js:37:2] + 36 │ /(?i:(?i:))/; + 37 │ /(?s:(?s:))/; + · ── + 38 │ /(?m:(?m:))/; + ╰──── - × Invalid unicode escape sequence -Expect to Parse: "language/literals/regexp/u-unicode-esc.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-nested.js:38:2] + 37 │ /(?s:(?s:))/; + 38 │ /(?m:(?m:))/; + · ── + 39 │ new RegExp("(?i:(?i:))"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js" - × Could not parse the entire pattern + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:36:2] + 35 │ + 36 │ /(?i:)/; + · ── + 37 │ /(?is:)/; + ╰──── - × Could not parse the entire pattern + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:37:2] + 36 │ /(?i:)/; + 37 │ /(?is:)/; + · ── + 38 │ /(?im:)/; + ╰──── - × Could not parse the entire pattern + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:38:2] + 37 │ /(?is:)/; + 38 │ /(?im:)/; + · ── + 39 │ /(?s:)/; + ╰──── - × Could not parse the entire pattern + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:39:2] + 38 │ /(?im:)/; + 39 │ /(?s:)/; + · ── + 40 │ /(?si:)/; + ╰──── - × Could not parse the entire pattern + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:40:2] + 39 │ /(?s:)/; + 40 │ /(?si:)/; + · ── + 41 │ /(?sm:)/; + ╰──── - × Could not parse the entire pattern + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:41:2] + 40 │ /(?si:)/; + 41 │ /(?sm:)/; + · ── + 42 │ /(?m:)/; + ╰──── - × Could not parse the entire pattern -Expect to Parse: "language/module-code/top-level-await/await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:42:2] + 41 │ /(?sm:)/; + 42 │ /(?m:)/; + · ── + 43 │ /(?mi:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/block-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:43:2] + 42 │ /(?m:)/; + 43 │ /(?mi:)/; + · ── + 44 │ /(?ms:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/export-class-decl-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:44:2] + 43 │ /(?mi:)/; + 44 │ /(?ms:)/; + · ── + 45 │ /(?ims:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/export-dflt-assign-expr-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:45:2] + 44 │ /(?ms:)/; + 45 │ /(?ims:)/; + · ── + 46 │ /(?ism:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/export-dft-class-decl-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:46:2] + 45 │ /(?ims:)/; + 46 │ /(?ism:)/; + · ── + 47 │ /(?sim:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/export-lex-decl-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:47:2] + 46 │ /(?ism:)/; + 47 │ /(?sim:)/; + · ── + 48 │ /(?smi:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:48:2] + 47 │ /(?sim:)/; + 48 │ /(?smi:)/; + · ── + 49 │ /(?mis:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/export-var-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:49:2] + 48 │ /(?smi:)/; + 49 │ /(?mis:)/; + · ── + 50 │ /(?msi:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-not-set-as-flags.js:50:2] + 49 │ /(?mis:)/; + 50 │ /(?msi:)/; + · ── + 51 │ new RegExp("(?i:)"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js" - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/for-await-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js:36:2] + 35 │ + 36 │ /(?i:)/i; + · ── + 37 │ /(?s:)/s; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js:37:2] + 36 │ /(?i:)/i; + 37 │ /(?s:)/s; + · ── + 38 │ /(?m:)/m; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js:38:2] + 37 │ /(?s:)/s; + 38 │ /(?m:)/m; + · ── + 39 │ /(?ims:)/ims; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/add-modifiers-when-set-as-flags.js:39:2] + 38 │ /(?m:)/m; + 39 │ /(?ims:)/ims; + · ── + 40 │ new RegExp("(?i:)", "i"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-nested.js" - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-nested.js:36:2] + 35 │ + 36 │ /(?-i:(?-i:))/; + · ── + 37 │ /(?-s:(?-s:))/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-nested.js:37:2] + 36 │ /(?-i:(?-i:))/; + 37 │ /(?-s:(?-s:))/; + · ── + 38 │ /(?-m:(?-m:))/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/for-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-nested.js:38:2] + 37 │ /(?-s:(?-s:))/; + 38 │ /(?-m:(?-m:))/; + · ── + 39 │ new RegExp("(?-i:(?-i:))"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js" - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:36:2] + 35 │ + 36 │ /(?-i:)/; + · ── + 37 │ /(?-is:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:37:2] + 36 │ /(?-i:)/; + 37 │ /(?-is:)/; + · ── + 38 │ /(?-im:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:38:2] + 37 │ /(?-is:)/; + 38 │ /(?-im:)/; + · ── + 39 │ /(?-s:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:39:2] + 38 │ /(?-im:)/; + 39 │ /(?-s:)/; + · ── + 40 │ /(?-si:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:40:2] + 39 │ /(?-s:)/; + 40 │ /(?-si:)/; + · ── + 41 │ /(?-sm:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:41:2] + 40 │ /(?-si:)/; + 41 │ /(?-sm:)/; + · ── + 42 │ /(?-m:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:42:2] + 41 │ /(?-sm:)/; + 42 │ /(?-m:)/; + · ── + 43 │ /(?-mi:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:43:2] + 42 │ /(?-m:)/; + 43 │ /(?-mi:)/; + · ── + 44 │ /(?-ms:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:44:2] + 43 │ /(?-mi:)/; + 44 │ /(?-ms:)/; + · ── + 45 │ /(?-ims:)/; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/for-in-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:45:2] + 44 │ /(?-ms:)/; + 45 │ /(?-ims:)/; + · ── + 46 │ /(?-ism:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:46:2] + 45 │ /(?-ims:)/; + 46 │ /(?-ism:)/; + · ── + 47 │ /(?-smi:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:47:2] + 46 │ /(?-ism:)/; + 47 │ /(?-smi:)/; + · ── + 48 │ /(?-sim:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:48:2] + 47 │ /(?-smi:)/; + 48 │ /(?-sim:)/; + · ── + 49 │ /(?-mis:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:49:2] + 48 │ /(?-sim:)/; + 49 │ /(?-mis:)/; + · ── + 50 │ /(?-msi:)/; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-not-set-as-flags.js:50:2] + 49 │ /(?-mis:)/; + 50 │ /(?-msi:)/; + · ── + 51 │ new RegExp("(?-i:)"); + ╰──── +Expect to Parse: "built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js" - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/for-of-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:36:2] + 35 │ + 36 │ /(?-i:)/i; + · ── + 37 │ /(?-is:)/is; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:37:2] + 36 │ /(?-i:)/i; + 37 │ /(?-is:)/is; + · ── + 38 │ /(?-im:)/im; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:38:2] + 37 │ /(?-is:)/is; + 38 │ /(?-im:)/im; + · ── + 39 │ /(?-s:)/s; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:39:2] + 38 │ /(?-im:)/im; + 39 │ /(?-s:)/s; + · ── + 40 │ /(?-si:)/si; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:40:2] + 39 │ /(?-s:)/s; + 40 │ /(?-si:)/si; + · ── + 41 │ /(?-sm:)/sm; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:41:2] + 40 │ /(?-si:)/si; + 41 │ /(?-sm:)/sm; + · ── + 42 │ /(?-m:)/m; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/if-block-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:42:2] + 41 │ /(?-sm:)/sm; + 42 │ /(?-m:)/m; + · ── + 43 │ /(?-mi:)/mi; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/if-expr-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:43:2] + 42 │ /(?-m:)/m; + 43 │ /(?-mi:)/mi; + · ── + 44 │ /(?-ms:)/ms; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/top-level-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:44:2] + 43 │ /(?-mi:)/mi; + 44 │ /(?-ms:)/ms; + · ── + 45 │ /(?-ims:)/ims; + ╰──── - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/try-await-expr-regexp.js" + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:45:2] + 44 │ /(?-ms:)/ms; + 45 │ /(?-ims:)/ims; + · ── + 46 │ /(?-ism:)/ism; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:46:2] + 45 │ /(?-ims:)/ims; + 46 │ /(?-ism:)/ism; + · ── + 47 │ /(?-sim:)/sim; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:47:2] + 46 │ /(?-ism:)/ism; + 47 │ /(?-sim:)/sim; + · ── + 48 │ /(?-smi:)/smi; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:48:2] + 47 │ /(?-sim:)/sim; + 48 │ /(?-smi:)/smi; + · ── + 49 │ /(?-mis:)/mis; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:49:2] + 48 │ /(?-smi:)/smi; + 49 │ /(?-mis:)/mis; + · ── + 50 │ /(?-msi:)/msi; + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[built-ins/RegExp/regexp-modifiers/syntax/valid/remove-modifiers-when-set-as-flags.js:50:2] + 49 │ /(?-mis:)/mis; + 50 │ /(?-msi:)/msi; + · ── + 51 │ new RegExp("(?-i:)", "i"); + ╰──── +Expect to Parse: "built-ins/RegExp/unicode_character_class_backspace_escape.js" × Character class range out of order + ╭─[built-ins/RegExp/unicode_character_class_backspace_escape.js:20:12] + 19 │ assert(/[\b]/u.test('\u0008')); + 20 │ assert(/[\b-A]/u.test('A')); + · ── + ╰──── +Expect to Parse: "built-ins/String/prototype/match/duplicate-named-groups-properties.js" - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/typeof-await-expr-regexp.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/void-await-expr-regexp.js" + × Duplicated group name +Expect to Parse: "built-ins/String/prototype/match/duplicate-named-indices-groups-properties.js" - × Character class range out of order -Expect to Parse: "language/module-code/top-level-await/syntax/while-await-expr-regexp.js" + × Duplicated group name - × Character class range out of order -Expect to Parse: "language/statements/for-of/iterator-next-result-type.js" + × Duplicated group name +Expect to Parse: "built-ins/String/prototype/split/separator-regexp.js" - × Too many capturing groups + × Invalid hexadecimal escape + ╭─[built-ins/String/prototype/split/separator-regexp.js:56:32] + 55 │ assert.compareArray("x".split(/[\b]/), ["x"], '"x".split(/[\\b]/) must return ["x"]'); + 56 │ assert.compareArray("x".split(/\x/), ["", ""], '"x".split(/\\x/) must return ["", ""]'); + · ── + 57 │ assert.compareArray("x".split(/\X/), ["x"], '"x".split(/\\X/) must return ["x"]'); + ╰──── Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups-replace.js" - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name - × Too many capturing groups + × Duplicated group name Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups-search.js" × Duplicated group name @@ -10665,389 +2289,1342 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 15 │ ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=F}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F.js:18:11] + 17 │ + 18 │ /\p{ASCII=F}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Invalid-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=Invalid}/u; + · ─────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Invalid.js:18:11] + 17 │ + 18 │ /\p{ASCII=Invalid}/u; + · ─────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_N-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=N}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_N.js:18:11] + 17 │ + 18 │ /\p{ASCII=N}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_No-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=No}/u; + · ── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_No.js:18:11] + 17 │ + 18 │ /\p{ASCII=No}/u; + · ── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_T-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=T}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_T.js:18:11] + 17 │ + 18 │ /\p{ASCII=T}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Y-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=Y}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Y.js:18:11] + 17 │ + 18 │ /\p{ASCII=Y}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Yes-negated.js:18:11] + 17 │ + 18 │ /\P{ASCII=Yes}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Yes.js:18:11] + 17 │ + 18 │ /\p{ASCII=Yes}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid character class range + ╭─[built-ins/RegExp/property-escapes/character-class-range-end.js:20:3] + 19 │ + 20 │ /[--\p{Hex}]/u; + · ───────── + ╰──── - × Character class range out of order + × Invalid character class range + ╭─[built-ins/RegExp/property-escapes/character-class-range-no-dash-end.js:20:3] + 19 │ + 20 │ /[\uFFFF-\p{Hex}]/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid character class range + ╭─[built-ins/RegExp/property-escapes/character-class-range-no-dash-start.js:20:3] + 19 │ + 20 │ /[\p{Hex}-\uFFFF]/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid character class range + ╭─[built-ins/RegExp/property-escapes/character-class-range-start.js:20:3] + 19 │ + 20 │ /[\p{Hex}--]/u; + · ───────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{Basic_Emoji}]/v; + · ────────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji-negative-P.js:20:2] + 19 │ + 20 │ /\P{Basic_Emoji}/v; + · ─────────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji-negative-u.js:20:5] + 19 │ + 20 │ /\p{Basic_Emoji}/u; + · ─────────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{Emoji_Keycap_Sequence}]/v; + · ──────────────────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence-negative-P.js:20:2] + 19 │ + 20 │ /\P{Emoji_Keycap_Sequence}/v; + · ───────────────────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence-negative-u.js:20:5] + 19 │ + 20 │ /\p{Emoji_Keycap_Sequence}/u; + · ───────────────────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{RGI_Emoji}]/v; + · ──────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji-negative-P.js:20:2] + 19 │ + 20 │ /\P{RGI_Emoji}/v; + · ───────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji-negative-u.js:20:5] + 19 │ + 20 │ /\p{RGI_Emoji}/u; + · ───────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{RGI_Emoji_Flag_Sequence}]/v; + · ────────────────────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence-negative-P.js:20:2] + 19 │ + 20 │ /\P{RGI_Emoji_Flag_Sequence}/v; + · ─────────────────────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence-negative-u.js:20:5] + 19 │ + 20 │ /\p{RGI_Emoji_Flag_Sequence}/u; + · ─────────────────────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{RGI_Emoji_Modifier_Sequence}]/v; + · ────────────────────────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence-negative-P.js:20:2] + 19 │ + 20 │ /\P{RGI_Emoji_Modifier_Sequence}/v; + · ─────────────────────────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence-negative-u.js:20:5] + 19 │ + 20 │ /\p{RGI_Emoji_Modifier_Sequence}/u; + · ─────────────────────────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{RGI_Emoji_Tag_Sequence}]/v; + · ───────────────────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence-negative-P.js:20:2] + 19 │ + 20 │ /\P{RGI_Emoji_Tag_Sequence}/v; + · ────────────────────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence-negative-u.js:20:5] + 19 │ + 20 │ /\p{RGI_Emoji_Tag_Sequence}/u; + · ────────────────────── + ╰──── + + × Invalid character class + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence-negative-CharacterClass.js:20:2] + 19 │ + 20 │ /[^\p{RGI_Emoji_ZWJ_Sequence}]/v; + · ───────────────────────────── + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence-negative-P.js:20:2] + 19 │ + 20 │ /\P{RGI_Emoji_ZWJ_Sequence}/v; + · ────────────────────────── + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence-negative-u.js:20:5] + 19 │ + 20 │ /\p{RGI_Emoji_ZWJ_Sequence}/u; + · ────────────────────── + ╰──── + + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Block-implicit-negated.js:21:5] + 20 │ + 21 │ /\P{InAdlam}/u; + · ─────── + ╰──── + + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Block-implicit.js:21:5] + 20 │ + 21 │ /\p{InAdlam}/u; + · ─────── + ╰──── + + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-implicit-negated.js:21:5] + 20 │ + 21 │ /\P{InAdlam}/u; + · ─────── + ╰──── + + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-implicit.js:21:5] + 20 │ + 21 │ /\p{InAdlam}/u; + · ─────── + ╰──── + + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-negated.js:21:14] + 20 │ + 21 │ /\P{InScript=Adlam}/u; + · ───── + ╰──── + + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script.js:21:14] + 20 │ + 21 │ /\p{InScript=Adlam}/u; + · ───── + ╰──── + + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/grammar-extension-Is-prefix-Script-negated.js:21:14] + 20 │ + 21 │ /\P{IsScript=Adlam}/u; + · ───── + ╰──── + + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/grammar-extension-Is-prefix-Script.js:21:14] + 20 │ + 21 │ /\p{IsScript=Adlam}/u; + · ───── + ╰──── + + × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-circumflex-negation-negated.js:21:2] + 20 │ + 21 │ /\P{^General_Category=Letter}/u; + · ─── + ╰──── + + × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-circumflex-negation.js:21:2] + 20 │ + 21 │ /\p{^General_Category=Letter}/u; + · ─── + ╰──── + + × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-empty-negated.js:21:3] + 20 │ + 21 │ /[\p{}]/u; + · ─── + ╰──── + + × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-empty.js:21:3] + 20 │ + 21 │ /[\P{}]/u; + · ─── + ╰──── + + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-invalid-negated.js:21:6] + 20 │ + 21 │ /[\P{invalid}]/u; + · ─────── + ╰──── + + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-invalid.js:21:6] + 20 │ + 21 │ /[\p{invalid}]/u; + · ─────── + ╰──── + + × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-no-braces-negated.js:21:2] + 20 │ + 21 │ /\P/u; + · ── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-no-braces-value-negated.js:21:2] + 20 │ + 21 │ /\PL/u; + · ── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-no-braces-value.js:21:2] + 20 │ + 21 │ /\pL/u; + · ── + ╰──── - × Character class range out of order + × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-no-braces.js:21:2] + 20 │ + 21 │ /\p/u; + · ── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-separator-and-value-only-negated.js:21:2] + 20 │ + 21 │ /\P{=Letter}/u; + · ─── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-separator-and-value-only.js:21:2] + 20 │ + 21 │ /\p{=Letter}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-separator-negated.js:21:5] + 20 │ + 21 │ /\P{General_Category:Letter}/u; + · ──────────────── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-separator-only-negated.js:21:2] + 20 │ + 21 │ /\P{=}/u; + · ─── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-separator-only.js:21:2] + 20 │ + 21 │ /\p{=}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/grammar-extension-separator.js:21:5] + 20 │ + 21 │ /\p{General_Category:Letter}/u; + · ──────────────── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-unclosed-negated.js:21:2] + 20 │ + 21 │ /\P{/u; + · ─── + ╰──── × Unterminated unicode property escape - - × Character class range out of order + ╭─[built-ins/RegExp/property-escapes/grammar-extension-unclosed.js:21:2] + 20 │ + 21 │ /\p{/u; + · ─── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/grammar-extension-unopened-negated.js:21:2] + 20 │ + 21 │ /\P}/u; + · ── + ╰──── × Unterminated unicode property escape - - × Character class range out of order + ╭─[built-ins/RegExp/property-escapes/grammar-extension-unopened.js:21:2] + 20 │ + 21 │ /\p}/u; + · ── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/loose-matching-01-negated.js:18:2] + 17 │ + 18 │ /\P{ General_Category=Uppercase_Letter }/u; + · ─── + ╰──── × Unterminated unicode property escape - - × Character class range out of order + ╭─[built-ins/RegExp/property-escapes/loose-matching-01.js:18:2] + 17 │ + 18 │ /\p{ General_Category=Uppercase_Letter }/u; + · ─── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/loose-matching-02-negated.js:18:2] + 17 │ + 18 │ /\P{ Lowercase }/u; + · ─── + ╰──── × Unterminated unicode property escape + ╭─[built-ins/RegExp/property-escapes/loose-matching-02.js:18:2] + 17 │ + 18 │ /\p{ Lowercase }/u; + · ─── + ╰──── - × Character class range out of order - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Could not parse the entire pattern - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order - - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-03-negated.js:18:5] + 17 │ + 18 │ /\P{ANY}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-03.js:18:5] + 17 │ + 18 │ /\p{ANY}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-04-negated.js:18:5] + 17 │ + 18 │ /\P{ASSIGNED}/u; + · ──────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-04.js:18:5] + 17 │ + 18 │ /\p{ASSIGNED}/u; + · ──────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-05-negated.js:18:5] + 17 │ + 18 │ /\P{Ascii}/u; + · ───── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-05.js:18:5] + 17 │ + 18 │ /\p{Ascii}/u; + · ───── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-06-negated.js:18:5] + 17 │ + 18 │ /\P{General_Category = Uppercase_Letter}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-06.js:18:5] + 17 │ + 18 │ /\p{General_Category = Uppercase_Letter}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-07-negated.js:18:5] + 17 │ + 18 │ /\P{_-_lOwEr_C-A_S-E_-_}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-07.js:18:5] + 17 │ + 18 │ /\p{_-_lOwEr_C-A_S-E_-_}/u; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-08-negated.js:18:5] + 17 │ + 18 │ /\P{any}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-08.js:18:5] + 17 │ + 18 │ /\p{any}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-09-negated.js:18:5] + 17 │ + 18 │ /\P{ascii}/u; + · ───── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-09.js:18:5] + 17 │ + 18 │ /\p{ascii}/u; + · ───── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-10-negated.js:18:5] + 17 │ + 18 │ /\P{assigned}/u; + · ──────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-10.js:18:5] + 17 │ + 18 │ /\p{assigned}/u; + · ──────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/loose-matching-11-negated.js:18:8] + 17 │ + 18 │ /\P{gC=uppercase_letter}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/loose-matching-11.js:18:8] + 17 │ + 18 │ /\p{gC=uppercase_letter}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/loose-matching-12-negated.js:18:8] + 17 │ + 18 │ /\P{gc=uppercaseletter}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/loose-matching-12.js:18:8] + 17 │ + 18 │ /\p{gc=uppercaseletter}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-13-negated.js:18:5] + 17 │ + 18 │ /\P{lowercase}/u; + · ───────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-13.js:18:5] + 17 │ + 18 │ /\p{lowercase}/u; + · ───────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-14-negated.js:18:5] + 17 │ + 18 │ /\P{lowercase}/u; + · ───────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/loose-matching-14.js:18:5] + 17 │ + 18 │ /\p{lowercase}/u; + · ───────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-equals-negated.js:17:5] + 16 │ + 17 │ /\P{General_Category=}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-equals.js:17:5] + 16 │ + 17 │ /\p{General_Category=}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-negated.js:17:5] + 16 │ + 17 │ /\P{General_Category}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category.js:17:5] + 16 │ + 17 │ /\p{General_Category}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-equals-negated.js:17:5] + 16 │ + 17 │ /\P{Script=}/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-equals.js:17:5] + 16 │ + 17 │ /\p{Script=}/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-negated.js:17:5] + 16 │ + 17 │ /\P{Script}/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script.js:17:5] + 16 │ + 17 │ /\p{Script}/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-equals-negated.js:17:5] + 16 │ + 17 │ /\P{Script_Extensions=}/u; + · ───────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-equals.js:17:5] + 16 │ + 17 │ /\p{Script_Extensions=}/u; + · ───────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-negated.js:17:5] + 16 │ + 17 │ /\P{Script_Extensions}/u; + · ───────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions.js:17:5] + 16 │ + 17 │ /\p{Script_Extensions}/u; + · ───────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-existent-binary-property-negated.js:17:5] + 16 │ + 17 │ /\P{UnknownBinaryProperty}/u; + · ───────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/non-existent-binary-property.js:17:5] + 16 │ + 17 │ /\p{UnknownBinaryProperty}/u; + · ───────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/non-existent-property-and-value-negated.js:18:17] + 17 │ + 18 │ /\P{Line_Breakz=WAT}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/non-existent-property-and-value.js:18:17] + 17 │ + 18 │ /\p{Line_Breakz=WAT}/u; + · ─── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/non-existent-property-existing-value-negated.js:17:17] + 16 │ + 17 │ /\P{Line_Breakz=Alphabetic}/u; + · ────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/non-existent-property-existing-value.js:17:17] + 16 │ + 17 │ /\p{Line_Breakz=Alphabetic}/u; + · ────────── + ╰──── - × Character class range out of order + × Could not parse the entire pattern + ╭─[built-ins/RegExp/property-escapes/non-existent-property-value-General_Category-negated.js:18:5] + 17 │ + 18 │ /\\P{General_Category=WAT}/u; + · ▲ + ╰──── - × Character class range out of order + × Could not parse the entire pattern + ╭─[built-ins/RegExp/property-escapes/non-existent-property-value-Script-negated.js:18:5] + 17 │ + 18 │ /\\P{Script=FooBarBazInvalid}/u; + · ▲ + ╰──── - × Character class range out of order + × Could not parse the entire pattern + ╭─[built-ins/RegExp/property-escapes/non-existent-property-value-Script.js:18:5] + 17 │ + 18 │ /\\p{Script=FooBarBazInvalid}/u; + · ▲ + ╰──── - × Character class range out of order + × Could not parse the entire pattern + ╭─[built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions-negated.js:18:5] + 17 │ + 18 │ /\\P{Script_Extensions=H_e_h}/u; + · ▲ + ╰──── - × Character class range out of order + × Could not parse the entire pattern + ╭─[built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions.js:18:5] + 17 │ + 18 │ /\\p{Script_Extensions=H_e_h}/u; + · ▲ + ╰──── - × Character class range out of order + × Could not parse the entire pattern + ╭─[built-ins/RegExp/property-escapes/non-existent-property-value-general-category.js:18:5] + 17 │ + 18 │ /\\p{General_Category=WAT}/u; + · ▲ + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Composition_Exclusion-negated.js:18:5] + 17 │ + 18 │ /\P{Composition_Exclusion}/u; + · ───────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Composition_Exclusion.js:18:5] + 17 │ + 18 │ /\p{Composition_Exclusion}/u; + · ───────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFC-negated.js:18:5] + 17 │ + 18 │ /\P{Expands_On_NFC}/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFC.js:18:5] + 17 │ + 18 │ /\p{Expands_On_NFC}/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFD-negated.js:18:5] + 17 │ + 18 │ /\P{Expands_On_NFD}/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFD.js:18:5] + 17 │ + 18 │ /\p{Expands_On_NFD}/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKC-negated.js:18:5] + 17 │ + 18 │ /\P{Expands_On_NFKC}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKC.js:18:5] + 17 │ + 18 │ /\p{Expands_On_NFKC}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKD-negated.js:18:5] + 17 │ + 18 │ /\P{Expands_On_NFKD}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKD.js:18:5] + 17 │ + 18 │ /\p{Expands_On_NFKD}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-FC_NFKC_Closure-negated.js:18:5] + 17 │ + 18 │ /\P{FC_NFKC_Closure}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-FC_NFKC_Closure.js:18:5] + 17 │ + 18 │ /\p{FC_NFKC_Closure}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Full_Composition_Exclusion-negated.js:18:5] + 17 │ + 18 │ /\P{Full_Composition_Exclusion}/u; + · ────────────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Full_Composition_Exclusion.js:18:5] + 17 │ + 18 │ /\p{Full_Composition_Exclusion}/u; + · ────────────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Grapheme_Link-negated.js:18:5] + 17 │ + 18 │ /\P{Grapheme_Link}/u; + · ───────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Grapheme_Link.js:18:5] + 17 │ + 18 │ /\p{Grapheme_Link}/u; + · ───────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Hyphen-negated.js:18:5] + 17 │ + 18 │ /\P{Hyphen}/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Hyphen.js:18:5] + 17 │ + 18 │ /\p{Hyphen}/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Alphabetic-negated.js:18:5] + 17 │ + 18 │ /\P{Other_Alphabetic}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Alphabetic.js:18:5] + 17 │ + 18 │ /\p{Other_Alphabetic}/u; + · ──────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Default_Ignorable_Code_Point-negated.js:18:5] + 17 │ + 18 │ /\P{Other_Default_Ignorable_Code_Point}/u; + · ────────────────────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Default_Ignorable_Code_Point.js:18:5] + 17 │ + 18 │ /\p{Other_Default_Ignorable_Code_Point}/u; + · ────────────────────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Grapheme_Extend-negated.js:18:5] + 17 │ + 18 │ /\P{Other_Grapheme_Extend}/u; + · ───────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Grapheme_Extend.js:18:5] + 17 │ + 18 │ /\p{Other_Grapheme_Extend}/u; + · ───────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Continue-negated.js:18:5] + 17 │ + 18 │ /\P{Other_ID_Continue}/u; + · ───────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Continue.js:18:5] + 17 │ + 18 │ /\p{Other_ID_Continue}/u; + · ───────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Start-negated.js:18:5] + 17 │ + 18 │ /\P{Other_ID_Start}/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Start.js:18:5] + 17 │ + 18 │ /\p{Other_ID_Start}/u; + · ────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Lowercase-negated.js:18:5] + 17 │ + 18 │ /\P{Other_Lowercase}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Lowercase.js:18:5] + 17 │ + 18 │ /\p{Other_Lowercase}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Math-negated.js:18:5] + 17 │ + 18 │ /\P{Other_Math}/u; + · ────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Math.js:18:5] + 17 │ + 18 │ /\p{Other_Math}/u; + · ────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Uppercase-negated.js:18:5] + 17 │ + 18 │ /\P{Other_Uppercase}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Uppercase.js:18:5] + 17 │ + 18 │ /\p{Other_Uppercase}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Prepended_Concatenation_Mark-negated.js:18:5] + 17 │ + 18 │ /\P{Prepended_Concatenation_Mark}/u; + · ──────────────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-binary-property-Prepended_Concatenation_Mark.js:18:5] + 17 │ + 18 │ /\p{Prepended_Concatenation_Mark}/u; + · ──────────────────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/unsupported-property-Block-with-value-negated.js:18:11] + 17 │ + 18 │ /\P{Block=Adlam}/u; + · ───── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/unsupported-property-Block-with-value.js:18:11] + 17 │ + 18 │ /\p{Block=Adlam}/u; + · ───── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-property-FC_NFKC_Closure-negated.js:18:5] + 17 │ + 18 │ /\P{FC_NFKC_Closure}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-property-FC_NFKC_Closure.js:18:5] + 17 │ + 18 │ /\p{FC_NFKC_Closure}/u; + · ─────────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/unsupported-property-Line_Break-negated.js:18:16] + 17 │ + 18 │ /\P{Line_Break=Alphabetic}/u; + · ────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value-negated.js:18:16] + 17 │ + 18 │ /\P{Line_Break=Alphabetic}/u; + · ────────── + ╰──── - × Character class range out of order + × Invalid unicode property name + ╭─[built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js:18:16] + 17 │ + 18 │ /\p{Line_Break=Alphabetic}/u; + · ────────── + ╰──── - × Unterminated character class + × Invalid unicode property name or value + ╭─[built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js:18:5] + 17 │ + 18 │ /\p{Line_Break}/u; + · ────────── + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js:19:3] + 18 │ + 19 │ /[(]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js:19:3] + 18 │ + 19 │ /[)]/v; + · ▲ + ╰──── × Unterminated character class + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-03.js:19:2] + 18 │ + 19 │ /[[]/v; + · ─── + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-04.js:19:3] + 18 │ + 19 │ /[{]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-05.js:19:3] + 18 │ + 19 │ /[}]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-06.js:19:3] + 18 │ + 19 │ /[/]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-07.js:19:3] + 18 │ + 19 │ /[-]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-08.js:19:3] + 18 │ + 19 │ /[|]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-09.js:19:3] + 18 │ + 19 │ /[&&]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-10.js:19:3] + 18 │ + 19 │ /[!!]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-11.js:19:3] + 18 │ + 19 │ /[##]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-12.js:19:3] + 18 │ + 19 │ /[$$]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-13.js:19:3] + 18 │ + 19 │ /[%%]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-14.js:19:3] + 18 │ + 19 │ /[**]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-15.js:19:3] + 18 │ + 19 │ /[++]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-16.js:19:3] + 18 │ + 19 │ /[,,]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-17.js:19:3] + 18 │ + 19 │ /[..]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-18.js:19:3] + 18 │ + 19 │ /[::]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-19.js:19:3] + 18 │ + 19 │ /[;;]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-20.js:19:3] + 18 │ + 19 │ /[<<]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-21.js:19:3] + 18 │ + 19 │ /[==]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-22.js:19:3] + 18 │ + 19 │ /[>>]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-23.js:19:3] + 18 │ + 19 │ /[??]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-24.js:19:3] + 18 │ + 19 │ /[@@]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-25.js:19:3] + 18 │ + 19 │ /[``]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-26.js:19:3] + 18 │ + 19 │ /[~~]/v; + · ▲ + ╰──── - × Unterminated character class + × Expected nonempty class set expression + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-27.js:19:4] + 18 │ + 19 │ /[^^^]/v; + · ▲ + ╰──── × Unterminated character class + ╭─[built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-28.js:19:2] + 18 │ + 19 │ /[_^^]/v; + · ── + ╰──── × The 'u' and 'v' regular expression flags cannot be enabled at the same time ╭─[built-ins/RegExp/prototype/unicodeSets/uv-flags.js:17:1] @@ -30020,8 +22597,6 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j · ──── ╰──── - × Unterminated character class - × Unexpected token ╭─[language/literals/regexp/S7.8.5_A1.2_T3.js:27:1] 26 │ /// @@ -30044,8 +22619,6 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 30 │ / ╰──── - × Unterminated character class - × Unexpected token ╭─[language/literals/regexp/S7.8.5_A1.3_T1.js:31:1] 30 │ / @@ -30059,8 +22632,6 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 30 │ / ╰──── - × Unterminated character class - × Unexpected token ╭─[language/literals/regexp/S7.8.5_A1.3_T3.js:31:1] 30 │ / @@ -30074,6 +22645,14 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 24 │ / ╰──── + × Invalid atom escape + ╭─[language/literals/regexp/S7.8.5_A1.5_T1.js:23:2] + 22 │ + 23 │ /\ + · ─ + 24 │ / + ╰──── + × Unexpected token ╭─[language/literals/regexp/S7.8.5_A1.5_T1.js:25:1] 24 │ / @@ -30087,6 +22666,14 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 23 │ / ╰──── + × Invalid atom escape + ╭─[language/literals/regexp/S7.8.5_A1.5_T3.js:22:2] + 21 │ + 22 │ /\ + · ─ + 23 │ / + ╰──── + × Unexpected token ╭─[language/literals/regexp/S7.8.5_A1.5_T3.js:24:1] 23 │ / @@ -30099,10 +22686,6 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j · ───── ╰──── - × Unterminated character class - - × Unterminated character class - × Unexpected token ╭─[language/literals/regexp/S7.8.5_A2.2_T2.js:23:5] 22 │ @@ -30144,6 +22727,14 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 29 │ / ╰──── + × Invalid atom escape + ╭─[language/literals/regexp/S7.8.5_A2.5_T1.js:28:3] + 27 │ + 28 │ /a\ + · ─ + 29 │ / + ╰──── + × Unexpected token ╭─[language/literals/regexp/S7.8.5_A2.5_T1.js:30:1] 29 │ / @@ -30157,126 +22748,424 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j 29 │ / ╰──── + × Invalid atom escape + ╭─[language/literals/regexp/S7.8.5_A2.5_T3.js:28:3] + 27 │ + 28 │ /a\ + · ─ + 29 │ / + ╰──── + × Unexpected token ╭─[language/literals/regexp/S7.8.5_A2.5_T3.js:30:1] 29 │ / ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-add-remove-i.js:19:2] + 18 │ + 19 │ /(?i-i:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-add-remove-m.js:19:2] + 18 │ + 19 │ /(?m-m:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-add-remove-multi-duplicate.js:19:2] + 18 │ + 19 │ /(?ims-m:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s-escape.js:19:2] + 18 │ + 19 │ /(?\u{0073}-s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-add-remove-s.js:19:2] + 18 │ + 19 │ /(?s-s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-both-empty.js:19:2] + 18 │ + 19 │ /(?-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-1.js:19:2] + 18 │ + 19 │ /(?-ii:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-code-point-repeat-i-2.js:19:2] + 18 │ + 19 │ /(?-imsi:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-no-colon-1.js:18:2] + 17 │ + 18 │ /(?ms-i)/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-no-colon-2.js:18:2] + 17 │ + 18 │ /(?-s)/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-no-colon-3.js:18:2] + 17 │ + 18 │ /(?i-)/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-arbitrary.js:19:2] + 18 │ + 19 │ /(?-1:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-i.js:19:2] + 18 │ + 19 │ /(?-iͥ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-m.js:19:2] + 18 │ + 19 │ /(?-mͫ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-combining-s.js:19:2] + 18 │ + 19 │ /(?-s̀:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-d.js:19:2] + 18 │ + 19 │ /(?-d:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-g.js:19:2] + 18 │ + 19 │ /(?-g:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-1.js:19:2] + 18 │ + 19 │ /(?-s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-display-2.js:19:2] + 18 │ + 19 │ /(?-s‎:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-non-flag.js:19:2] + 18 │ + 19 │ /(?-Q:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-u.js:19:2] + 18 │ + 19 │ /(?-u:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-uppercase-I.js:19:2] + 18 │ + 19 │ /(?-I:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-y.js:19:2] + 18 │ + 19 │ /(?-y:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwj.js:19:2] + 18 │ + 19 │ /(?-s‍:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnbsp.js:19:2] + 18 │ + 19 │ /(?-s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-other-code-point-zwnj.js:19:2] + 18 │ + 19 │ /(?-s‌:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-i.js:19:2] + 18 │ + 19 │ /(?i-i:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-m.js:19:2] + 18 │ + 19 │ /(?m-m:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-multi-duplicate.js:19:2] + 18 │ + 19 │ /(?m-ims:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s-escape.js:19:2] + 18 │ + 19 │ /(?s-\u{0073}:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-add-remove-s.js:19:2] + 18 │ + 19 │ /(?s-s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-1.js:19:2] + 18 │ + 19 │ /(?ii-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-code-point-repeat-i-2.js:19:2] + 18 │ + 19 │ /(?imsi-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-arbitrary.js:19:2] + 18 │ + 19 │ /(?1-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-i.js:19:2] + 18 │ + 19 │ /(?iͥ-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-m.js:19:2] + 18 │ + 19 │ /(?mͫ-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-combining-s.js:19:2] + 18 │ + 19 │ /(?s̀-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-d.js:19:2] + 18 │ + 19 │ /(?d-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-g.js:19:2] + 18 │ + 19 │ /(?g-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-1.js:19:2] + 18 │ + 19 │ /(?s-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-display-2.js:19:2] + 18 │ + 19 │ /(?s‎-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-non-flag.js:19:2] + 18 │ + 19 │ /(?Q-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-u.js:19:2] + 18 │ + 19 │ /(?u-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-uppercase-I.js:19:2] + 18 │ + 19 │ /(?I-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-y.js:19:2] + 18 │ + 19 │ /(?y-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwj.js:19:2] + 18 │ + 19 │ /(?s‍-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnbsp.js:19:2] + 18 │ + 19 │ /(?s-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-other-code-point-zwnj.js:19:2] + 18 │ + 19 │ /(?s‌-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-i.js:19:2] + 18 │ + 19 │ /(?I-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-m.js:19:2] + 18 │ + 19 │ /(?M-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-case-fold-s.js:19:2] + 18 │ + 19 │ /(?S-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-i.js:19:2] + 18 │ + 19 │ /(?İ-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-reverse-should-not-unicode-case-fold-s.js:19:2] + 18 │ + 19 │ /(?ſ-:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-i.js:19:2] + 18 │ + 19 │ /(?-I:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-m.js:19:2] + 18 │ + 19 │ /(?-M:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-should-not-case-fold-s.js:19:2] + 18 │ + 19 │ /(?-S:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-i.js:19:2] + 18 │ + 19 │ /(?-İ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-arithmetic-modifiers-should-not-unicode-case-fold-s.js:19:2] + 18 │ + 19 │ /(?-ſ:a)//*{ global-modifiers }*/; + · ── + ╰──── × Unexpected flag G in regular expression literal ╭─[language/literals/regexp/early-err-bad-flag.js:18:5] @@ -30300,91 +23189,306 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j ╰──── help: Try insert a semicolon here - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-code-point-repeat-i-1.js:19:2] + 18 │ + 19 │ /(?ii:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-code-point-repeat-i-2.js:19:2] + 18 │ + 19 │ /(?imsi:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-arbitrary.js:19:2] + 18 │ + 19 │ /(?1:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-combining-i.js:19:2] + 18 │ + 19 │ /(?iͥ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-combining-m.js:19:2] + 18 │ + 19 │ /(?mͫ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-combining-s.js:19:2] + 18 │ + 19 │ /(?s̀:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-d.js:19:2] + 18 │ + 19 │ /(?d:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-g.js:19:2] + 18 │ + 19 │ /(?g:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-non-display-1.js:19:2] + 18 │ + 19 │ /(?s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-non-display-2.js:19:2] + 18 │ + 19 │ /(?s‎:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-non-flag.js:19:2] + 18 │ + 19 │ /(?Q:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-u.js:19:2] + 18 │ + 19 │ /(?u:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-uppercase-I.js:19:2] + 18 │ + 19 │ /(?I:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-y.js:19:2] + 18 │ + 19 │ /(?y:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-zwj.js:19:2] + 18 │ + 19 │ /(?s‍:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-zwnbsp.js:19:2] + 18 │ + 19 │ /(?s:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-other-code-point-zwnj.js:19:2] + 18 │ + 19 │ /(?s‌:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-case-fold-i.js:19:2] + 18 │ + 19 │ /(?I:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-case-fold-m.js:19:2] + 18 │ + 19 │ /(?M:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-case-fold-s.js:19:2] + 18 │ + 19 │ /(?S:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-i.js:19:2] + 18 │ + 19 │ /(?İ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-unicode-case-fold-s.js:19:2] + 18 │ + 19 │ /(?ſ:a)//*{ global-modifiers }*/; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-unicode-escape-i.js:19:2] + 18 │ + 19 │ /(?\u0069:a)/u /* i */; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-unicode-escape-m.js:19:2] + 18 │ + 19 │ /(?\u006D:a)/u /* m */; + · ── + ╰──── - × Character class range out of order + × Capturing group name is missing + ╭─[language/literals/regexp/early-err-modifiers-should-not-unicode-escape-s.js:19:2] + 18 │ + 19 │ /(?\u0073:a)/u /* s */; + · ── + ╰──── × Invalid braced quantifier + ╭─[language/literals/regexp/early-err-pattern.js:17:2] + 16 │ + 17 │ /?/; + · ─ + ╰──── × Invalid braced quantifier + ╭─[language/literals/regexp/invalid-braced-quantifier-exact.js:25:2] + 24 │ + 25 │ /{2}/; + · ─── + ╰──── × Invalid braced quantifier + ╭─[language/literals/regexp/invalid-braced-quantifier-lower.js:25:2] + 24 │ + 25 │ /{2,}/; + · ──── + ╰──── × Invalid braced quantifier + ╭─[language/literals/regexp/invalid-braced-quantifier-range.js:25:2] + 24 │ + 25 │ /{2,3}/; + · ───── + ╰──── × Invalid braced quantifier + ╭─[language/literals/regexp/invalid-optional-lookbehind.js:20:9] + 19 │ + 20 │ /.(?<=.)?/; + · ─ + ╰──── × Invalid braced quantifier + ╭─[language/literals/regexp/invalid-optional-negative-lookbehind.js:20:9] + 19 │ + 20 │ /.(?a)\k/u; + · ────── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-2.js:20:9] + 19 │ + 20 │ /(?a)\k/; + · ────── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js:20:10] + 19 │ + 20 │ /(?a)\k/u; + · ───── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-3.js:20:10] + 19 │ + 20 │ /(?a)\k/; + · ───── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-4-u.js:20:2] + 19 │ + 20 │ /\k(?a)/u; + · ───── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-4.js:20:2] + 19 │ + 20 │ /\k(?a)/; + · ───── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-5.js:20:2] + 19 │ + 20 │ /\k(?x)/; + · ───── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-u.js:20:9] + 19 │ + 20 │ /(?.)\k/u; + · ───── + ╰──── - × Character class range out of order + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u.js:20:2] + 19 │ + 20 │ /\k/u; + · ───── + ╰──── - × Duplicated group name + × Group specifier is empty + ╭─[language/literals/regexp/named-groups/invalid-dangling-groupname.js:20:9] + 19 │ + 20 │ /(?.)\k/; + · ───── + ╰──── × Duplicated group name @@ -30392,85 +23496,273 @@ Expect to Parse: "staging/built-ins/RegExp/named-groups/duplicate-named-groups.j × Duplicated group name - × Character class range out of order - - × Character class range out of order + × Duplicated group name - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-empty-groupspecifier-u.js:15:4] + 14 │ + 15 │ /(?<>a)/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-empty-groupspecifier.js:15:4] + 14 │ + 15 │ /(?<>a)/; + · ─ + ╰──── - × Character class range out of order + × Invalid atom escape + ╭─[language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u.js:15:7] + 14 │ + 15 │ /(?\a)/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-2-u.js:15:11] + 14 │ + 15 │ /(?.)\k.)\k.)\k<>/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-3.js:15:11] + 14 │ + 15 │ /(?.)\k<>/; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-4.js:15:4] + 14 │ + 15 │ /\ka)/; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-5.js:15:4] + 14 │ + 15 │ /\k.)/; + · ── + ╰──── - × Character class range out of order + × Invalid named reference + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-6.js:15:2] + 14 │ + 15 │ /\k(?.)/; + · ── + ╰──── - × Character class range out of order + × Invalid named reference + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-u.js:15:9] + 14 │ + 15 │ /(?.)\k/u; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u.js:15:4] + 14 │ + 15 │ /\k<>/u; + · ─ + ╰──── - × Character class range out of order + × Invalid named reference + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u.js:15:2] + 14 │ + 15 │ /\k/u; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-u.js:15:4] + 14 │ + 15 │ /\k.)\k/; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier.js:15:4] + 14 │ + 15 │ /(?<$❞>a)/; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u.js:15:4] + 14 │ + 15 │ /(?<𐒤>a)/u; + · ─ + ╰──── - × Character class range out of order + × Invalid surrogate pair + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2.js:15:5] + 14 │ + 15 │ /(?<𐒤>a)/; + · ─ + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3.js:15:6] + 14 │ + 15 │ /(?.)/; + · ──────────── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u.js:15:6] + 14 │ + 15 │ /(?.)/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.js:15:6] + 14 │ + 15 │ /(?.)/; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u.js:15:6] + 14 │ + 15 │ /(?.)/u; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5.js:15:6] + 14 │ + 15 │ /(?.)/; + · ────── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6.js:15:6] + 14 │ + 15 │ /(?.)/; + · ───────── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7.js:15:6] + 14 │ + 15 │ /(?.)/; + · ────────── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u.js:15:4] + 14 │ + 15 │ /(?<\>.)/u; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8.js:15:4] + 14 │ + 15 │ /(?<\>.)/; + · ── + ╰──── - × Character class range out of order + × Invalid unicode escape sequence + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u.js:15:7] + 14 │ + 15 │ /(?.)/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u.js:15:4] + 14 │ + 15 │ /(?<❤>a)/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier.js:15:4] + 14 │ + 15 │ /(?<❤>a)/; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u.js:15:4] + 14 │ + 15 │ /(?<42a>a)/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-numeric-groupspecifier.js:15:4] + 14 │ + 15 │ /(?<42a>a)/; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u.js:15:4] + 14 │ + 15 │ /(?<:a>a)/u; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier.js:15:4] + 14 │ + 15 │ /(?<:a>a)/; + · ─ + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u.js:15:4] + 14 │ + 15 │ /(?a)/u; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.js:15:4] + 14 │ + 15 │ /(?a)/; + · ── + ╰──── - × Character class range out of order + × Unterminated capturing group name + ╭─[language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.js:15:4] + 14 │ + 15 │ /(?)\k/; + · ─────── + ╰──── + × Unexpected flag a in regular expression literal ╭─[compiler/regularExpressionScanning.ts:3:12] 2 │ // Flags @@ -10329,6 +10516,178 @@ Expect to Parse: "conformance/salsa/typeFromPropertyAssignmentWithExport.ts" 4 │ // Pattern modifiers ╰──── + × Capturing group name is missing + ╭─[compiler/regularExpressionScanning.ts:5:3] + 4 │ // Pattern modifiers + 5 │ /(?med-ium:bar)/, + · ── + 6 │ // Capturing groups + ╰──── + + × Invalid indexed reference + ╭─[compiler/regularExpressionScanning.ts:13:8] + 12 │ /\2()(\12)(foo)\1\0[\0\1\01\123\08\8](\3\03)\5\005\9\009/, + 13 │ /\2()(\12)(foo)\1\0[\0\1\01\123\08\8](\3\03)\5\005\9\009/u, + · ─── + 14 │ /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, + ╰──── + + × Duplicated group name + + × Duplicated group name + + × Numbers out of order in braced quantifier + ╭─[compiler/regularExpressionScanning.ts:17:31] + 16 │ // Quantifiers + 17 │ /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, + · ─────── + 18 │ // Character classes + ╰──── + + × Character class range out of order + ╭─[compiler/regularExpressionScanning.ts:19:13] + 18 │ // Character classes + 19 │ /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, + · ── + 20 │ /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, + ╰──── + + × Invalid unicode property name or value + ╭─[compiler/regularExpressionScanning.ts:21:28] + 20 │ /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, + 21 │ /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, + · ─────── + 22 │ /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, + ╰──── + + × Invalid unicode property name or value + ╭─[compiler/regularExpressionScanning.ts:22:28] + 21 │ /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, + 22 │ /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, + · ─────── + 23 │ /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, + ╰──── + + × Invalid unicode property name + ╭─[compiler/regularExpressionScanning.ts:24:22] + 23 │ /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, + 24 │ /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, + · ───── + 25 │ /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, + ╰──── + + × Invalid unicode property name + ╭─[compiler/regularExpressionScanning.ts:25:22] + 24 │ /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, + 25 │ /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, + · ───── + 26 │ /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, + ╰──── + + × `UnicodeSetsMode` is required for binary property of strings + ╭─[compiler/regularExpressionScanning.ts:27:6] + 26 │ /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, + 27 │ /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, + · ───────── + 28 │ /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, + ╰──── + + × Invalid property name(negative + property of strings) + ╭─[compiler/regularExpressionScanning.ts:28:16] + 27 │ /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, + 28 │ /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, + · ───────────── + 29 │ // Character escapes + ╰──── + + × Invalid atom escape + ╭─[compiler/regularExpressionScanning.ts:30:3] + 29 │ // Character escapes + 30 │ /\c[\c0\ca\cQ\c\C]\c1\C/, + · ─ + 31 │ /\c[\c0\ca\cQ\c\C]\c1\C/u, + ╰──── + + × Invalid atom escape + ╭─[compiler/regularExpressionScanning.ts:31:3] + 30 │ /\c[\c0\ca\cQ\c\C]\c1\C/, + 31 │ /\c[\c0\ca\cQ\c\C]\c1\C/u, + · ─ + 32 │ /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, + ╰──── + + × Invalid atom escape + ╭─[compiler/regularExpressionScanning.ts:33:3] + 32 │ /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, + 33 │ /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, + · ─ + 34 │ /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, + ╰──── + + × Invalid atom escape + ╭─[compiler/regularExpressionScanning.ts:34:3] + 33 │ /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, + 34 │ /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, + · ─ + 35 │ // Unicode sets notation + ╰──── + + × Character class range out of order + ╭─[compiler/regularExpressionScanning.ts:36:5] + 35 │ // Unicode sets notation + 36 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, + · ── + 37 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, + ╰──── + + × Character class range out of order + ╭─[compiler/regularExpressionScanning.ts:37:5] + 36 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, + 37 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, + · ── + 38 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, + ╰──── + + × Invalid character in character class set subtraction + ╭─[compiler/regularExpressionScanning.ts:38:8] + 37 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, + 38 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, + · ▲ + 39 │ /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, + ╰──── + + × Invalid character in character class set interseciton + ╭─[compiler/regularExpressionScanning.ts:39:56] + 38 │ /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, + 39 │ /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, + · ▲ + 40 │ /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, + ╰──── + + × Invalid character class + ╭─[compiler/regularExpressionScanning.ts:40:3] + 39 │ /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, + 40 │ /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, + · ───────────────────────── + 41 │ /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, + ╰──── + + × Invalid character class + ╭─[compiler/regularExpressionScanning.ts:41:3] + 40 │ /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, + 41 │ /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, + · ───────────────────────── + 42 │ /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, + ╰──── + + × Invalid character class + ╭─[compiler/regularExpressionScanning.ts:42:3] + 41 │ /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, + 42 │ /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, + · ─────────────────────── + 43 │ /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, + ╰──── + × The 'u' and 'v' regular expression flags cannot be enabled at the same time ╭─[compiler/regularExpressionScanning.ts:3:2] 2 │ // Flags @@ -10337,6 +10696,19 @@ Expect to Parse: "conformance/salsa/typeFromPropertyAssignmentWithExport.ts" 4 │ // Pattern modifiers ╰──── + × Invalid unicode property name or value + ╭─[compiler/regularExpressionUnicodePropertyValueExpressionSuggestions.ts:1:19] + 1 │ const regex = /\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}\p{Script_Declensions=Inherited}\p{scx=inherit}/u; + · ───── + ╰──── + + × Capturing group name is missing + ╭─[compiler/regularExpressionWithNonBMPFlags.ts:7:31] + 6 │ // See https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols + 7 │ const 𝘳𝘦𝘨𝘦𝘹 = /(?𝘴𝘪-𝘮:^𝘧𝘰𝘰.)/𝘨𝘮𝘶; + · ── + ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[compiler/regularExpressionWithNonBMPFlags.ts:7:63] 6 │ // See https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols @@ -15412,6 +15784,38 @@ Expect to Parse: "conformance/salsa/typeFromPropertyAssignmentWithExport.ts" 2 │ // Once this is supported, yield *must* be parenthesized. ╰──── + × Invalid unicode escape sequence + ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07.ts:3:11] + 2 │ // 1. Assert: 0 ≤ cp ≤ 0x10FFFF. + 3 │ var x = /\u{110000}/gu; + · ─ + ╰──── + + × Invalid unicode escape sequence + ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions12.ts:1:11] + 1 │ var x = /\u{FFFFFFFF}/gu; + · ─ + ╰──── + + × Invalid unicode escape sequence + ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions14.ts:2:11] + 1 │ // Shouldn't work, negatives are not allowed. + 2 │ var x = /\u{-DDDD}/gu; + · ─ + ╰──── + + × Invalid unicode escape sequence + ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions17.ts:1:11] + 1 │ var x = /\u{r}\u{n}\u{t}/gu; + · ─ + ╰──── + + × Invalid unicode escape sequence + ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions19.ts:1:11] + 1 │ var x = /\u{}/gu; + · ─ + ╰──── + × Invalid escape sequence ╭─[conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings07.ts:3:10] 2 │ // 1. Assert: 0 ≤ cp ≤ 0x10FFFF. @@ -17859,6 +18263,8 @@ Expect to Parse: "conformance/salsa/typeFromPropertyAssignmentWithExport.ts" · ╰── `,` expected ╰──── + × Too many capturing groups + × A rest parameter must be last in a parameter list ╭─[conformance/functions/functionOverloadErrorsSyntax.ts:9:25] 8 │ //Function overload signature with rest param followed by non-optional parameter @@ -19900,6 +20306,12 @@ Expect to Parse: "conformance/salsa/typeFromPropertyAssignmentWithExport.ts" · ── ╰──── + × Unterminated capturing group + ╭─[conformance/parser/ecmascript5/RegressionTests/parser579071.ts:1:12] + 1 │ var x = /fo(o/; + · ── + ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[conformance/parser/ecmascript5/RegressionTests/parser585151.ts:2:6] 1 │ class Foo2 { @@ -19958,6 +20370,12 @@ Expect to Parse: "conformance/salsa/typeFromPropertyAssignmentWithExport.ts" · ──────────── ╰──── + × Could not parse the entire pattern + ╭─[conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity4.ts:1:15] + 1 │ foo(/notregexp); + · ▲ + ╰──── + × Expected `)` but found `EOF` ╭─[conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity4.ts:1:17] 1 │ foo(/notregexp); From 653b2e8f9ae1b8170a99e267efc633b7c19bb2ec Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 14 Aug 2024 15:02:59 +0900 Subject: [PATCH 137/143] Refactor class_strings_disjunction --- crates/oxc_regexp_parser/src/ast.rs | 2 + .../src/body_parser/parser.rs | 47 ++++++++++++------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 3a872d9764c78..9ae4a5fa6ddeb 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -204,6 +204,8 @@ pub struct CharacterClassRange { #[derive(Debug)] pub struct ClassStringDisjunction<'a> { pub span: Span, + /// `true` if body is empty or contain 2 more characters. + pub strings: bool, pub body: Vec<'a, ClassString<'a>>, } /// Single unit of [`ClassStringDisjunction`]. diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 4329f98cbe7ee..4f803c121b695 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -1209,13 +1209,14 @@ impl<'a> PatternParser<'a> { let span_start = self.reader.span_position(); if self.reader.eat3('\\', 'q', '{') { - let class_string_disjunction_contents = + let (class_string_disjunction_contents, strings) = self.parse_class_string_disjunction_contents()?; if self.reader.eat('}') { return Ok(Some(ast::CharacterClassContents::ClassStringDisjunction(Box::new_in( ast::ClassStringDisjunction { span: self.span_factory.create(span_start, self.reader.span_position()), + strings, body: class_string_disjunction_contents, }, self.allocator, @@ -1246,8 +1247,6 @@ impl<'a> PatternParser<'a> { // [^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] if self.reader.eat('[') { let negative = self.reader.eat('^'); - // NOTE: This can be recursive as the name suggests! - // e.g. `/[a[b[c[d[e]f]g]h]i]j]/v` let (kind, body) = self.parse_class_contents()?; if self.reader.eat(']') { @@ -1269,13 +1268,7 @@ impl<'a> PatternParser<'a> { // - || ClassString contains 2 more ClassSetCharacters ast::CharacterClassContents::ClassStringDisjunction( class_string_disjunction, - ) => { - class_string_disjunction.body.is_empty() - || class_string_disjunction - .body - .iter() - .any(|class_string| class_string.body.len() != 1) - } + ) => class_string_disjunction.strings, _ => false, }; @@ -1352,19 +1345,30 @@ impl<'a> PatternParser<'a> { // ClassString // ClassString | ClassStringDisjunctionContents // ``` - fn parse_class_string_disjunction_contents(&mut self) -> Result>> { + // Returns: (ClassStringDisjunctionContents, contain_strings) + fn parse_class_string_disjunction_contents( + &mut self, + ) -> Result<(Vec<'a, ast::ClassString<'a>>, bool)> { let mut body = Vec::new_in(self.allocator); + let mut strings = false; loop { - let class_string = self.parse_class_string()?; + let (class_string, contain_strings) = self.parse_class_string()?; body.push(class_string); + if contain_strings { + strings = true; + } if !self.reader.eat('|') { break; } } - Ok(body) + if body.is_empty() { + strings = true; + } + + Ok((body, strings)) } // ``` @@ -1375,7 +1379,8 @@ impl<'a> PatternParser<'a> { // NonEmptyClassString :: // ClassSetCharacter NonEmptyClassString[opt] // ``` - fn parse_class_string(&mut self) -> Result> { + // Returns (ClassString, contain_strings) + fn parse_class_string(&mut self) -> Result<(ast::ClassString<'a>, bool)> { let span_start = self.reader.span_position(); let mut body = Vec::new_in(self.allocator); @@ -1383,10 +1388,16 @@ impl<'a> PatternParser<'a> { body.push(class_set_character); } - Ok(ast::ClassString { - span: self.span_factory.create(span_start, self.reader.span_position()), - body, - }) + // True if empty or contains 2 or more characters + let contain_strings = body.len() != 1; + + Ok(( + ast::ClassString { + span: self.span_factory.create(span_start, self.reader.span_position()), + body, + }, + contain_strings, + )) } // ``` From 1c2c91f91025b721ee5ec8f23a787f18df0dc72c Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 14 Aug 2024 15:06:35 +0900 Subject: [PATCH 138/143] Fix `\b` value --- crates/oxc_regexp_parser/src/body_parser/parser.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index 4f803c121b695..ec6529f21f453 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -653,7 +653,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), kind: ast::CharacterKind::Null, - value: 0x0000, + value: 0x00, })); } @@ -953,8 +953,8 @@ impl<'a> PatternParser<'a> { if self.reader.eat('b') { return Ok(Some(ast::CharacterClassContents::Character(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::CharacterKind::Symbol, - value: 'b' as u32, + kind: ast::CharacterKind::SingleEscape, + value: 0x08, }))); } @@ -1444,8 +1444,8 @@ impl<'a> PatternParser<'a> { if self.reader.eat('b') { return Ok(Some(ast::Character { span: self.span_factory.create(span_start, self.reader.span_position()), - kind: ast::CharacterKind::Symbol, - value: 'b' as u32, + kind: ast::CharacterKind::SingleEscape, + value: 0x08, })); } From 719acbc6483f5a54ac0e4ec2b238a131cb3a0fe9 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 14 Aug 2024 15:09:45 +0900 Subject: [PATCH 139/143] Diff --- Cargo.lock | 2 +- crates/oxc_regexp_parser/examples/parse_literal.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 1d604b8aca376..8b36b2fde6a51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1830,7 +1830,7 @@ dependencies = [ "oxc_allocator", "oxc_diagnostics", "oxc_span", - "phf", + "phf 0.11.2", "rustc-hash", "unicode-id-start", ] diff --git a/crates/oxc_regexp_parser/examples/parse_literal.rs b/crates/oxc_regexp_parser/examples/parse_literal.rs index 74fb259f3a1db..7d76d87be4f6f 100644 --- a/crates/oxc_regexp_parser/examples/parse_literal.rs +++ b/crates/oxc_regexp_parser/examples/parse_literal.rs @@ -40,6 +40,7 @@ fn main() { r"/[[^\q{}]]/v", // Error r"/(?)(?)/", // Error r"/(?noname)/v", // Error + r"/[\bb]/", ] { println!("Parse: {source_text}"); let parser = Parser::new(&allocator, source_text, ParserOptions::default()); From f7ea71e89db9a375ef1da8826b70e368ee1f2ba3 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 14 Aug 2024 15:25:01 +0900 Subject: [PATCH 140/143] Rename span_position > offset --- .../src/body_parser/parser.rs | 276 ++++++++---------- .../src/body_parser/reader.rs | 20 +- .../src/body_parser/state.rs | 4 +- 3 files changed, 134 insertions(+), 166 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/parser.rs b/crates/oxc_regexp_parser/src/body_parser/parser.rs index ec6529f21f453..4ab0307f7db34 100644 --- a/crates/oxc_regexp_parser/src/body_parser/parser.rs +++ b/crates/oxc_regexp_parser/src/body_parser/parser.rs @@ -60,7 +60,7 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if self.reader.peek().is_some() { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); return Err(OxcDiagnostic::error("Could not parse the entire pattern") .with_label(self.span_factory.create(span_start, span_start))); } @@ -77,7 +77,7 @@ impl<'a> PatternParser<'a> { // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] | Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] // ``` fn parse_disjunction(&mut self) -> Result> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let mut body = Vec::new_in(self.allocator); loop { @@ -89,7 +89,7 @@ impl<'a> PatternParser<'a> { } Ok(ast::Disjunction { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), body, }) } @@ -100,7 +100,7 @@ impl<'a> PatternParser<'a> { // Alternative[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] Term[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] // ``` fn parse_alternative(&mut self) -> Result> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let mut body = Vec::new_in(self.allocator); while let Some(term) = self.parse_term()? { @@ -108,7 +108,7 @@ impl<'a> PatternParser<'a> { } Ok(ast::Alternative { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), body, }) } @@ -133,12 +133,12 @@ impl<'a> PatternParser<'a> { return Ok(Some(assertion)); } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); return match (self.parse_atom()?, self.consume_quantifier()?) { (Some(atom), Some(((min, max), greedy))) => { Ok(Some(ast::Term::Quantifier(Box::new_in( ast::Quantifier { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), greedy, min, max, @@ -150,9 +150,7 @@ impl<'a> PatternParser<'a> { (Some(atom), None) => Ok(Some(atom)), (None, Some(_)) => { Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `Atom`") - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )) + .with_label(self.span_factory.create(span_start, self.reader.offset()))) } (None, None) => Ok(None), }; @@ -162,7 +160,7 @@ impl<'a> PatternParser<'a> { // [~UnicodeMode] Assertion // [~UnicodeMode] ExtendedAtom Quantifier // [~UnicodeMode] ExtendedAtom - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if let Some(assertion) = self.parse_assertion()? { // `QuantifiableAssertion` = (Negative)Lookahead: `(?=...)` or `(?!...)` if let ast::Term::LookAroundAssertion(look_around) = &assertion { @@ -174,9 +172,7 @@ impl<'a> PatternParser<'a> { if let Some(((min, max), greedy)) = self.consume_quantifier()? { return Ok(Some(ast::Term::Quantifier(Box::new_in( ast::Quantifier { - span: self - .span_factory - .create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), greedy, min, max, @@ -195,7 +191,7 @@ impl<'a> PatternParser<'a> { (Some(extended_atom), Some(((min, max), greedy))) => { Ok(Some(ast::Term::Quantifier(Box::new_in( ast::Quantifier { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), min, max, greedy, @@ -207,7 +203,7 @@ impl<'a> PatternParser<'a> { (Some(extended_atom), None) => Ok(Some(extended_atom)), (None, Some(_)) => { Err(OxcDiagnostic::error("Lone `Quantifier` found, expected with `ExtendedAtom`") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))) + .with_label(self.span_factory.create(span_start, self.reader.offset()))) } (None, None) => Ok(None), } @@ -231,7 +227,7 @@ impl<'a> PatternParser<'a> { // ``` // (Annex B) fn parse_assertion(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let kind = if self.reader.eat('^') { Some(ast::BoundaryAssertionKind::Start) @@ -247,7 +243,7 @@ impl<'a> PatternParser<'a> { if let Some(kind) = kind { return Ok(Some(ast::Term::BoundaryAssertion(ast::BoundaryAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind, }))); } @@ -268,14 +264,13 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated lookaround assertion").with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Unterminated lookaround assertion") + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(ast::Term::LookAroundAssertion(Box::new_in( ast::LookAroundAssertion { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind, body: disjunction, }, @@ -296,14 +291,14 @@ impl<'a> PatternParser<'a> { // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` fn parse_atom(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); // PatternCharacter if let Some(cp) = self.reader.peek().filter(|&cp| !unicode::is_syntax_character(cp)) { self.reader.advance(); return Ok(Some(ast::Term::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: cp, }))); @@ -312,7 +307,7 @@ impl<'a> PatternParser<'a> { // . if self.reader.eat('.') { return Ok(Some(ast::Term::Dot(ast::Dot { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), }))); } @@ -360,12 +355,12 @@ impl<'a> PatternParser<'a> { // ExtendedPatternCharacter // ``` fn parse_extended_atom(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); // . if self.reader.eat('.') { return Ok(Some(ast::Term::Dot(ast::Dot { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), }))); } @@ -378,14 +373,14 @@ impl<'a> PatternParser<'a> { // \ [lookahead = c] if self.reader.peek().filter(|&cp| cp == 'c' as u32).is_some() { return Ok(Some(ast::Term::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: '\\' as u32, }))); } return Err(OxcDiagnostic::error("Invalid escape") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } // CharacterClass[~UnicodeMode, ~UnicodeSetsMode] @@ -411,19 +406,19 @@ impl<'a> PatternParser<'a> { } // InvalidBracedQuantifier - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.consume_quantifier()?.is_some() { // [SS:EE] ExtendedAtom :: InvalidBracedQuantifier // It is a Syntax Error if any source text is matched by this production. // (Annex B) return Err(OxcDiagnostic::error("Invalid braced quantifier") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } // ExtendedPatternCharacter if let Some(cp) = self.consume_extended_pattern_character() { return Ok(Some(ast::Term::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: cp, }))); @@ -450,20 +445,19 @@ impl<'a> PatternParser<'a> { // [SS:EE] AtomEscape :: DecimalEscape // It is a Syntax Error if the CapturingGroupNumber of DecimalEscape is strictly greater than CountLeftCapturingParensWithin(the Pattern containing AtomEscape). if self.state.num_of_capturing_groups < index { - return Err(OxcDiagnostic::error("Invalid indexed reference").with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Invalid indexed reference") + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), index, }))); } if index <= self.state.num_of_capturing_groups { return Ok(Some(ast::Term::IndexedReference(ast::IndexedReference { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), index, }))); } @@ -495,14 +489,13 @@ impl<'a> PatternParser<'a> { // [SS:EE] AtomEscape :: k GroupName // It is a Syntax Error if GroupSpecifiersThatMatch(GroupName) is empty. if !self.state.found_group_names.contains(name.as_str()) { - return Err(OxcDiagnostic::error("Group specifier is empty").with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Group specifier is empty") + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(ast::Term::NamedReference(Box::new_in( ast::NamedReference { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), name, }, self.allocator, @@ -510,11 +503,11 @@ impl<'a> PatternParser<'a> { } return Err(OxcDiagnostic::error("Invalid named reference") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Err(OxcDiagnostic::error("Invalid atom escape") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))) + .with_label(self.span_factory.create(span_start, self.reader.offset()))) } // ``` @@ -547,7 +540,7 @@ impl<'a> PatternParser<'a> { }; Some(ast::CharacterClassEscape { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind, }) } @@ -586,13 +579,11 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error( "Invalid property name(negative + property of strings)", ) - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(ast::UnicodePropertyEscape { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), negative, strings: is_strings_related, name, @@ -603,7 +594,7 @@ impl<'a> PatternParser<'a> { } Err(OxcDiagnostic::error("Unterminated unicode property escape") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))) + .with_label(self.span_factory.create(span_start, self.reader.offset()))) } // ``` @@ -623,7 +614,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::SingleEscape, value: cp, })); @@ -636,7 +627,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::ControlLetter, value: cp, })); @@ -651,7 +642,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Null, value: 0x00, })); @@ -661,20 +652,20 @@ impl<'a> PatternParser<'a> { if self.reader.eat('x') { if let Some(cp) = self.consume_fixed_hex_digits(2) { return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::HexadecimalEscape, value: cp, })); } return Err(OxcDiagnostic::error("Invalid hexadecimal escape") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } // e.g. \u{1f600} if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(self.state.unicode_mode)? { return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::UnicodeEscape, value: cp, })); @@ -684,7 +675,7 @@ impl<'a> PatternParser<'a> { if !self.state.unicode_mode { if let Some(cp) = self.consume_legacy_octal_escape_sequence() { return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Octal, value: cp, })); @@ -694,7 +685,7 @@ impl<'a> PatternParser<'a> { // e.g. \. if let Some(cp) = self.consume_identity_escape() { return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Identifier, value: cp, })); @@ -709,7 +700,7 @@ impl<'a> PatternParser<'a> { // [^ ClassContents[?UnicodeMode, ?UnicodeSetsMode] ] // ``` fn parse_character_class(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat('[') { let negative = self.reader.eat('^'); @@ -730,13 +721,12 @@ impl<'a> PatternParser<'a> { _ => false, }) { - return Err(OxcDiagnostic::error("Invalid character class").with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Invalid character class") + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(ast::CharacterClass { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), negative, kind, body, @@ -744,7 +734,7 @@ impl<'a> PatternParser<'a> { } return Err(OxcDiagnostic::error("Unterminated character class") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Ok(None) @@ -790,13 +780,13 @@ impl<'a> PatternParser<'a> { let mut body = Vec::new_in(self.allocator); loop { - let range_span_start = self.reader.span_position(); + let range_span_start = self.reader.offset(); let Some(class_atom) = self.parse_class_atom()? else { break; }; - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if !self.reader.eat('-') { // ClassAtom[?UnicodeMode] body.push(class_atom); @@ -804,7 +794,7 @@ impl<'a> PatternParser<'a> { } let dash = ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: '-' as u32, }); @@ -830,9 +820,7 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if IsCharacterClass of the first ClassAtom is false, IsCharacterClass of the second ClassAtom is false, and the CharacterValue of the first ClassAtom is strictly greater than the CharacterValue of the second ClassAtom. if to.value < from.value { return Err(OxcDiagnostic::error("Character class range out of order") - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } body.push(ast::CharacterClassContents::CharacterClassRange(Box::new_in( @@ -853,9 +841,8 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if IsCharacterClass of the first ClassAtom is true or IsCharacterClass of the second ClassAtom is true and this production has a [UnicodeMode] parameter. // (Annex B) if self.state.unicode_mode { - return Err(OxcDiagnostic::error("Invalid character class range").with_label( - self.span_factory.create(range_span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Invalid character class range") + .with_label(self.span_factory.create(range_span_start, self.reader.offset()))); } body.push(class_atom); @@ -875,11 +862,11 @@ impl<'a> PatternParser<'a> { // ClassAtomNoDash[?UnicodeMode] // ``` fn parse_class_atom(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat('-') { return Ok(Some(ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: '-' as u32, }))); @@ -896,7 +883,7 @@ impl<'a> PatternParser<'a> { // ``` // (Annex B) fn parse_class_atom_no_dash(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if let Some(cp) = self .reader @@ -906,7 +893,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Ok(Some(ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: cp, }))); @@ -915,7 +902,7 @@ impl<'a> PatternParser<'a> { if self.reader.eat('\\') { if self.reader.peek().filter(|&cp| cp == 'c' as u32).is_some() { return Ok(Some(ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: '\\' as u32, }))); @@ -926,7 +913,7 @@ impl<'a> PatternParser<'a> { } return Err(OxcDiagnostic::error("Invalid class atom") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Ok(None) @@ -952,7 +939,7 @@ impl<'a> PatternParser<'a> { // b if self.reader.eat('b') { return Ok(Some(ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::SingleEscape, value: 0x08, }))); @@ -961,7 +948,7 @@ impl<'a> PatternParser<'a> { // [+UnicodeMode] - if self.state.unicode_mode && self.reader.eat('-') { return Ok(Some(ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: '-' as u32, }))); @@ -980,7 +967,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Ok(Some(ast::CharacterClassContents::Character(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::ControlLetter, value: cp, }))); @@ -1045,9 +1032,9 @@ impl<'a> PatternParser<'a> { return self.parse_class_set_union(class_set_operand); } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); Err(OxcDiagnostic::error("Expected nonempty class set expression") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))) + .with_label(self.span_factory.create(span_start, self.reader.offset()))) } // ``` @@ -1096,14 +1083,12 @@ impl<'a> PatternParser<'a> { } if self.reader.eat2('&', '&') { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat('&') { return Err(OxcDiagnostic::error( "Unexpected `&` inside of class interseciton", // spellchecker:disable-line ) - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } if let Some(class_set_operand) = self.parse_class_set_operand()? { @@ -1112,11 +1097,11 @@ impl<'a> PatternParser<'a> { } } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); return Err(OxcDiagnostic::error( "Invalid character in character class set interseciton", // spellchecker:disable-line ) - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Ok((ast::CharacterClassContentsKind::Intersection, body)) @@ -1146,11 +1131,11 @@ impl<'a> PatternParser<'a> { } } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); return Err(OxcDiagnostic::error( "Invalid character in character class set subtraction", ) - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Ok((ast::CharacterClassContentsKind::Subtraction, body)) @@ -1207,7 +1192,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(nested_class)); } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat3('\\', 'q', '{') { let (class_string_disjunction_contents, strings) = self.parse_class_string_disjunction_contents()?; @@ -1215,7 +1200,7 @@ impl<'a> PatternParser<'a> { if self.reader.eat('}') { return Ok(Some(ast::CharacterClassContents::ClassStringDisjunction(Box::new_in( ast::ClassStringDisjunction { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), strings, body: class_string_disjunction_contents, }, @@ -1224,7 +1209,7 @@ impl<'a> PatternParser<'a> { } return Err(OxcDiagnostic::error("Unterminated class string disjunction") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } if let Some(class_set_character) = self.parse_class_set_character()? { @@ -1241,7 +1226,7 @@ impl<'a> PatternParser<'a> { // \ CharacterClassEscape[+UnicodeMode] // ``` fn parse_nested_class(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); // [ [lookahead ≠ ^] ClassContents[+UnicodeMode, +UnicodeSetsMode] ] // [^ ClassContents[+UnicodeMode, +UnicodeSetsMode] ] @@ -1296,14 +1281,14 @@ impl<'a> PatternParser<'a> { } } { return Err(OxcDiagnostic::error("Invalid character class").with_label( - self.span_factory.create(span_start, self.reader.span_position()), + self.span_factory.create(span_start, self.reader.offset()), )); } } return Ok(Some(ast::CharacterClassContents::NestedCharacterClass(Box::new_in( ast::CharacterClass { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), negative, kind, body, @@ -1313,11 +1298,11 @@ impl<'a> PatternParser<'a> { } return Err(OxcDiagnostic::error("Unterminated nested class") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } // \ CharacterClassEscape[+UnicodeMode] - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let checkpoint = self.reader.checkpoint(); if self.reader.eat('\\') { if let Some(character_class_escape) = self.parse_character_class_escape(span_start) { @@ -1381,7 +1366,7 @@ impl<'a> PatternParser<'a> { // ``` // Returns (ClassString, contain_strings) fn parse_class_string(&mut self) -> Result<(ast::ClassString<'a>, bool)> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let mut body = Vec::new_in(self.allocator); while let Some(class_set_character) = self.parse_class_set_character()? { @@ -1393,7 +1378,7 @@ impl<'a> PatternParser<'a> { Ok(( ast::ClassString { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), body, }, contain_strings, @@ -1408,7 +1393,7 @@ impl<'a> PatternParser<'a> { // \b // ``` fn parse_class_set_character(&mut self) -> Result> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if let (Some(cp1), Some(cp2)) = (self.reader.peek(), self.reader.peek2()) { if !unicode::is_class_set_reserved_double_punctuator(cp1, cp2) @@ -1417,7 +1402,7 @@ impl<'a> PatternParser<'a> { self.reader.advance(); return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Symbol, value: cp1, })); @@ -1435,7 +1420,7 @@ impl<'a> PatternParser<'a> { { self.reader.advance(); return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::Identifier, value: cp, })); @@ -1443,7 +1428,7 @@ impl<'a> PatternParser<'a> { if self.reader.eat('b') { return Ok(Some(ast::Character { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), kind: ast::CharacterKind::SingleEscape, value: 0x08, })); @@ -1462,7 +1447,7 @@ impl<'a> PatternParser<'a> { // ? GroupName[?UnicodeMode] // ``` fn parse_capturing_group(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat('(') { let mut group_name = None; @@ -1471,9 +1456,7 @@ impl<'a> PatternParser<'a> { if self.reader.eat('?') { let Some(name) = self.consume_group_name()? else { return Err(OxcDiagnostic::error("Capturing group name is missing") - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); }; group_name = Some(name); } @@ -1481,14 +1464,14 @@ impl<'a> PatternParser<'a> { let disjunction = self.parse_disjunction()?; if self.reader.eat(')') { return Ok(Some(ast::CapturingGroup { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), name: group_name, body: disjunction, })); } return Err(OxcDiagnostic::error("Unterminated capturing group") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Ok(None) @@ -1498,19 +1481,18 @@ impl<'a> PatternParser<'a> { // (?: Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] ) // ``` fn parse_ignore_group(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat3('(', '?', ':') { let disjunction = self.parse_disjunction()?; if !self.reader.eat(')') { - return Err(OxcDiagnostic::error("Unterminated ignore group").with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Unterminated ignore group") + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(ast::IgnoreGroup { - span: self.span_factory.create(span_start, self.reader.span_position()), + span: self.span_factory.create(span_start, self.reader.offset()), // TODO: Stage3 ModifierFlags enabling_modifiers: None, disabling_modifiers: None, @@ -1551,7 +1533,7 @@ impl<'a> PatternParser<'a> { return Ok(Some(((0, Some(1)), is_greedy(&mut self.reader)))); } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let checkpoint = self.reader.checkpoint(); if self.reader.eat('{') { if let Some(min) = self.consume_decimal_digits() { @@ -1573,8 +1555,7 @@ impl<'a> PatternParser<'a> { "Numbers out of order in braced quantifier", ) .with_label( - self.span_factory - .create(span_start, self.reader.span_position()), + self.span_factory.create(span_start, self.reader.offset()), )); } @@ -1647,7 +1628,7 @@ impl<'a> PatternParser<'a> { // UnicodePropertyName=UnicodePropertyValue if let Some(name) = self.consume_unicode_property_name() { if self.reader.eat('=') { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if let Some(value) = self.consume_unicode_property_value() { // [SS:EE] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue // It is a Syntax Error if the source text matched by UnicodePropertyName is not a Unicode property name or property alias listed in the “Property name and aliases” column of Table 65. @@ -1656,7 +1637,7 @@ impl<'a> PatternParser<'a> { if !unicode_property::is_valid_unicode_property(&name, &value) { return Err(OxcDiagnostic::error("Invalid unicode property name") .with_label( - self.span_factory.create(span_start, self.reader.span_position()), + self.span_factory.create(span_start, self.reader.offset()), )); } @@ -1666,7 +1647,7 @@ impl<'a> PatternParser<'a> { } self.reader.rewind(checkpoint); - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); // LoneUnicodePropertyNameOrValue if let Some(name_or_value) = self.consume_unicode_property_value() { // [SS:EE] UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue @@ -1684,23 +1665,21 @@ impl<'a> PatternParser<'a> { return Err(OxcDiagnostic::error( "`UnicodeSetsMode` is required for binary property of strings", ) - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some((name_or_value, None, true))); } return Err(OxcDiagnostic::error("Invalid unicode property name or value") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } Ok(None) } fn consume_unicode_property_name(&mut self) -> Option> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let checkpoint = self.reader.checkpoint(); while unicode::is_unicode_property_name_character(self.reader.peek()?) { @@ -1711,11 +1690,11 @@ impl<'a> PatternParser<'a> { return None; } - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + Some(SpanAtom::from(&self.source_text[span_start..self.reader.offset()])) } fn consume_unicode_property_value(&mut self) -> Option> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let checkpoint = self.reader.checkpoint(); while unicode::is_unicode_property_value_character(self.reader.peek()?) { @@ -1726,7 +1705,7 @@ impl<'a> PatternParser<'a> { return None; } - Some(SpanAtom::from(&self.source_text[span_start..self.reader.span_position()])) + Some(SpanAtom::from(&self.source_text[span_start..self.reader.offset()])) } // ``` @@ -1734,7 +1713,7 @@ impl<'a> PatternParser<'a> { // < RegExpIdentifierName[?UnicodeMode] > // ``` fn consume_group_name(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if !self.reader.eat('<') { return Ok(None); @@ -1747,7 +1726,7 @@ impl<'a> PatternParser<'a> { } Err(OxcDiagnostic::error("Unterminated capturing group name") - .with_label(self.span_factory.create(span_start, self.reader.span_position()))) + .with_label(self.span_factory.create(span_start, self.reader.offset()))) } // ``` @@ -1756,14 +1735,12 @@ impl<'a> PatternParser<'a> { // RegExpIdentifierName[?UnicodeMode] RegExpIdentifierPart[?UnicodeMode] // ``` fn consume_reg_exp_idenfigier_name(&mut self) -> Result>> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.consume_reg_exp_idenfigier_start()?.is_some() { while self.consume_reg_exp_idenfigier_part()?.is_some() {} - return Ok(Some(SpanAtom::from( - &self.source_text[span_start..self.reader.span_position()], - ))); + return Ok(Some(SpanAtom::from(&self.source_text[span_start..self.reader.offset()]))); } Ok(None) @@ -1781,16 +1758,14 @@ impl<'a> PatternParser<'a> { return Ok(Some(cp)); } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat('\\') { if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(true)? { // [SS:EE] RegExpIdentifierStart :: \ RegExpUnicodeEscapeSequence // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierStartChar lexical grammar production. if !unicode::is_identifier_start_char(cp) { return Err(OxcDiagnostic::error("Invalid unicode escape sequence") - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(cp)); @@ -1798,7 +1773,7 @@ impl<'a> PatternParser<'a> { } if !self.state.unicode_mode { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if let Some(lead_surrogate) = self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) @@ -1814,7 +1789,7 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if the RegExpIdentifierCodePoint of RegExpIdentifierStart is not matched by the UnicodeIDStart lexical grammar production. if !unicode::is_unicode_id_start(cp) { return Err(OxcDiagnostic::error("Invalid surrogate pair").with_label( - self.span_factory.create(span_start, self.reader.span_position()), + self.span_factory.create(span_start, self.reader.offset()), )); } @@ -1840,16 +1815,14 @@ impl<'a> PatternParser<'a> { } } - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if self.reader.eat('\\') { if let Some(cp) = self.consume_reg_exp_unicode_escape_sequence(true)? { // [SS:EE] RegExpIdentifierPart :: \ RegExpUnicodeEscapeSequence // It is a Syntax Error if the CharacterValue of RegExpUnicodeEscapeSequence is not the numeric value of some code point matched by the IdentifierPartChar lexical grammar production. if !unicode::is_identifier_part_char(cp) { return Err(OxcDiagnostic::error("Invalid unicode escape sequence") - .with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } return Ok(Some(cp)); @@ -1857,7 +1830,7 @@ impl<'a> PatternParser<'a> { } if !self.state.unicode_mode { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); if let Some(lead_surrogate) = self.reader.peek().filter(|&cp| unicode::is_lead_surrogate(cp)) @@ -1873,7 +1846,7 @@ impl<'a> PatternParser<'a> { // It is a Syntax Error if the RegExpIdentifierCodePoint of RegExpIdentifierPart is not matched by the UnicodeIDContinue lexical grammar production. if !unicode::is_unicode_id_continue(cp) { return Err(OxcDiagnostic::error("Invalid surrogate pair").with_label( - self.span_factory.create(span_start, self.reader.span_position()), + self.span_factory.create(span_start, self.reader.offset()), )); } @@ -1898,7 +1871,7 @@ impl<'a> PatternParser<'a> { &mut self, unicode_mode: bool, ) -> Result> { - let span_start = self.reader.span_position(); + let span_start = self.reader.offset(); let checkpoint = self.reader.checkpoint(); if self.reader.eat('u') { @@ -1962,9 +1935,8 @@ impl<'a> PatternParser<'a> { } if self.state.unicode_mode { - return Err(OxcDiagnostic::error("Invalid unicode escape sequence").with_label( - self.span_factory.create(span_start, self.reader.span_position()), - )); + return Err(OxcDiagnostic::error("Invalid unicode escape sequence") + .with_label(self.span_factory.create(span_start, self.reader.offset()))); } self.reader.rewind(checkpoint); } diff --git a/crates/oxc_regexp_parser/src/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs index 48f085b7f2cce..99c5e31988412 100644 --- a/crates/oxc_regexp_parser/src/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/body_parser/reader.rs @@ -11,17 +11,13 @@ impl<'a> Reader<'a> { Self { source, char_indices: source.char_indices(), unicode_mode, index: 0 } } - // NOTE: Should be decoupled from the reader...? - // ``` - // let reader_idx = reader.index; - // SpanPosition::new(source, unicode_mode).get(reader_idx); - // ```` - pub fn span_position(&self) -> usize { + pub fn offset(&self) -> usize { let mut char_indices = self.char_indices.clone(); if self.unicode_mode { char_indices.nth(self.index).map_or(self.source.len(), |(i, _)| i) } else { + // TODO: This has a bug when called for surrogate pairs... let mut utf16_units = 0; let mut byte_index = 0; for (idx, ch) in char_indices { @@ -213,23 +209,23 @@ mod test { while reader.peek() != Some('^' as u32) { reader.advance(); } - let s1 = reader.span_position(); + let s1 = reader.offset(); assert!(reader.eat('^')); - let e1 = reader.span_position(); + let e1 = reader.offset(); while reader.peek() != Some('@' as u32) { reader.advance(); } - let s2 = reader.span_position(); + let s2 = reader.offset(); assert!(reader.eat('@')); - let e2 = reader.span_position(); + let e2 = reader.offset(); while reader.peek() != Some('$' as u32) { reader.advance(); } - let s3 = reader.span_position(); + let s3 = reader.offset(); assert!(reader.eat('$')); - let e3 = reader.span_position(); + let e3 = reader.offset(); assert_eq!(&source_text[s1..e1], "^"); assert_eq!(&source_text[s2..e2], "@"); diff --git a/crates/oxc_regexp_parser/src/body_parser/state.rs b/crates/oxc_regexp_parser/src/body_parser/state.rs index 7a1df8dbefab8..cc6f21f134b35 100644 --- a/crates/oxc_regexp_parser/src/body_parser/state.rs +++ b/crates/oxc_regexp_parser/src/body_parser/state.rs @@ -88,14 +88,14 @@ fn parse_capturing_groups(source_text: &str) -> (u32, u32, FxHashSet<&str>) { // Named capturing group if reader.eat2('?', '<') { - let span_start = reader.span_position(); + let span_start = reader.offset(); while let Some(ch) = reader.peek() { if ch == '>' as u32 { break; } reader.advance(); } - let span_end = reader.span_position(); + let span_end = reader.offset(); if reader.eat('>') { let group_name = &source_text[span_start..span_end]; From bdbffa9624952a517df575aefb8294a3466e65b5 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 14 Aug 2024 15:41:46 +0900 Subject: [PATCH 141/143] Check collect Vec perf --- .../src/body_parser/reader.rs | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs index 99c5e31988412..4d9d6f71f819f 100644 --- a/crates/oxc_regexp_parser/src/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/body_parser/reader.rs @@ -1,28 +1,30 @@ pub struct Reader<'a> { source: &'a str, - // NOTE: For now, this exists only for `span_position()` method. - char_indices: std::str::CharIndices<'a>, unicode_mode: bool, index: usize, + u8_units: Vec<(usize, char)>, + u16_units: Vec, } impl<'a> Reader<'a> { pub fn new(source: &'a str, unicode_mode: bool) -> Self { - Self { source, char_indices: source.char_indices(), unicode_mode, index: 0 } + // TODO: This may not be efficient in some cases. + // Implements lookahead cache with `VecDeque`? + let u8_units = source.char_indices().collect::>(); + let u16_units = if unicode_mode { "" } else { source }.encode_utf16().collect::>(); + Self { source, unicode_mode, index: 0, u8_units, u16_units } } pub fn offset(&self) -> usize { - let mut char_indices = self.char_indices.clone(); - if self.unicode_mode { - char_indices.nth(self.index).map_or(self.source.len(), |(i, _)| i) + self.u8_units.get(self.index).map_or(self.source.len(), |(i, _)| *i) } else { - // TODO: This has a bug when called for surrogate pairs... + // TODO: This has a bug(start>end) when called for surrogate pairs... let mut utf16_units = 0; let mut byte_index = 0; - for (idx, ch) in char_indices { + for (idx, ch) in &self.u8_units { if utf16_units == self.index { - return idx; + return *idx; } utf16_units += ch.len_utf16(); @@ -46,13 +48,11 @@ impl<'a> Reader<'a> { fn peek_nth(&self, n: usize) -> Option { let nth = self.index + n; - // TODO: This is not efficient. - // Refs oxc_parser/src/lexer/mod.rs using `VecDeque` for this? if self.unicode_mode { - self.source.chars().nth(nth).map(|c| c as u32) + self.u8_units.get(nth).map(|&(_, ch)| ch as u32) } else { #[allow(clippy::cast_lossless)] - self.source.encode_utf16().nth(nth).map(|u| u as u32) + self.u16_units.get(nth).map(|&cu| cu as u32) } } @@ -63,8 +63,6 @@ impl<'a> Reader<'a> { self.peek_nth(1) } - // NOTE: Consider `peek_char(): Option` style API? - pub fn eat(&mut self, ch: char) -> bool { if self.peek_nth(0) == Some(ch as u32) { self.advance(); From 43814e9755bf680095f0b734565c6ba18fa04b39 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Wed, 14 Aug 2024 22:05:06 +0900 Subject: [PATCH 142/143] Fix u16 offset issue partially --- crates/oxc_regexp_parser/src/ast.rs | 3 +-- .../src/body_parser/reader.rs | 18 ++++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/crates/oxc_regexp_parser/src/ast.rs b/crates/oxc_regexp_parser/src/ast.rs index 9ae4a5fa6ddeb..b3f605e09a59f 100644 --- a/crates/oxc_regexp_parser/src/ast.rs +++ b/crates/oxc_regexp_parser/src/ast.rs @@ -3,8 +3,6 @@ use oxc_span::{Atom as SpanAtom, Span}; // NOTE: Should keep all `enum` size <= 16 -// TODO: `Disjunction` may be redundant, `Vec` may be enough. - #[derive(Debug)] pub struct RegExpLiteral<'a> { pub span: Span, @@ -112,6 +110,7 @@ pub struct Quantifier<'a> { /// Single character. #[derive(Debug, Copy, Clone)] pub struct Character { + /// This will be invalid position when `UnicodeMode` is disabled and `value` is a surrogate pair. pub span: Span, pub kind: CharacterKind, /// Unicode code point or UTF-16 code unit. diff --git a/crates/oxc_regexp_parser/src/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs index 4d9d6f71f819f..4c35d507c7306 100644 --- a/crates/oxc_regexp_parser/src/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/body_parser/reader.rs @@ -8,8 +8,8 @@ pub struct Reader<'a> { impl<'a> Reader<'a> { pub fn new(source: &'a str, unicode_mode: bool) -> Self { - // TODO: This may not be efficient in some cases. - // Implements lookahead cache with `VecDeque`? + // NOTE: This may not be efficient if the source is too large. + // Implements lookahead cache with `VecDeque` is better...? let u8_units = source.char_indices().collect::>(); let u16_units = if unicode_mode { "" } else { source }.encode_utf16().collect::>(); Self { source, unicode_mode, index: 0, u8_units, u16_units } @@ -17,20 +17,18 @@ impl<'a> Reader<'a> { pub fn offset(&self) -> usize { if self.unicode_mode { - self.u8_units.get(self.index).map_or(self.source.len(), |(i, _)| *i) + self.u8_units.get(self.index).map_or(self.source.len(), |(idx, _)| *idx) } else { - // TODO: This has a bug(start>end) when called for surrogate pairs... - let mut utf16_units = 0; - let mut byte_index = 0; + // NOTE: This can be optimized by saving the last idx? + let mut u16_idx = 0; for (idx, ch) in &self.u8_units { - if utf16_units == self.index { + if self.index <= u16_idx { return *idx; } - utf16_units += ch.len_utf16(); - byte_index = idx + ch.len_utf8(); + u16_idx += ch.len_utf16(); } - byte_index + self.source.len() } } From c3c4ec289f0c8560e3974dcc63ed22277f34f667 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Thu, 15 Aug 2024 21:15:35 +0900 Subject: [PATCH 143/143] Perf non-unicode offset --- .../src/body_parser/reader.rs | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/crates/oxc_regexp_parser/src/body_parser/reader.rs b/crates/oxc_regexp_parser/src/body_parser/reader.rs index 4c35d507c7306..7828d9b7ffb7c 100644 --- a/crates/oxc_regexp_parser/src/body_parser/reader.rs +++ b/crates/oxc_regexp_parser/src/body_parser/reader.rs @@ -1,42 +1,53 @@ pub struct Reader<'a> { source: &'a str, unicode_mode: bool, + /// Current index for `u8_units`(unicode mode) or `u16_units`(non-unicode mode). index: usize, + /// Even in non-unicode mode, used for `Span` offset calculation. u8_units: Vec<(usize, char)>, u16_units: Vec, + /// Last offset caches for non-unicode mode. + last_offset_indices: (usize, usize), } impl<'a> Reader<'a> { pub fn new(source: &'a str, unicode_mode: bool) -> Self { - // NOTE: This may not be efficient if the source is too large. + // NOTE: Distinguish these 2 units looks cleaner, but it may not be necessary. + // As as a parser, AST `Character[kind=Symbol]` only needs to be aware of this for surrogate pairs. + // NOTE: Collecting `Vec` may not be efficient if the source is too large. // Implements lookahead cache with `VecDeque` is better...? let u8_units = source.char_indices().collect::>(); let u16_units = if unicode_mode { "" } else { source }.encode_utf16().collect::>(); - Self { source, unicode_mode, index: 0, u8_units, u16_units } + + Self { source, unicode_mode, index: 0, u8_units, u16_units, last_offset_indices: (0, 0) } } - pub fn offset(&self) -> usize { + pub fn offset(&mut self) -> usize { if self.unicode_mode { self.u8_units.get(self.index).map_or(self.source.len(), |(idx, _)| *idx) } else { - // NOTE: This can be optimized by saving the last idx? - let mut u16_idx = 0; - for (idx, ch) in &self.u8_units { + let (mut u16_idx, mut u8_idx) = self.last_offset_indices; + for (idx, ch) in &self.u8_units[u8_idx..] { if self.index <= u16_idx { + self.last_offset_indices = (u16_idx, u8_idx); return *idx; } u16_idx += ch.len_utf16(); + u8_idx += 1; } self.source.len() } } + // NOTE: For now, `usize` is enough for the checkpoint. + // But `last_offset_indices` should be stored as well for more performance? pub fn checkpoint(&self) -> usize { self.index } pub fn rewind(&mut self, checkpoint: usize) { self.index = checkpoint; + self.last_offset_indices = (0, 0); } pub fn advance(&mut self) {