feat(codegen): align operator precedence with esbuild (#4509)

closes #4339
This commit is contained in:
Boshen committed 2024-07-28 11:48:51 +00:00
1 parent 6a94e3f573
commit 35654e665c
14 files changed
+448 -446

No files matched your search

+6 -18
View File
@@ -1,11 +1,10 @@
use oxc_syntax::precedence::{GetPrecedence, Precedence};
use crate::ast::{
match_member_expression, ArrowFunctionExpression, AssignmentExpression, AwaitExpression,
BinaryExpression, CallExpression, ComputedMemberExpression, ConditionalExpression, Expression,
ImportExpression, LogicalExpression, MemberExpression, NewExpression, PrivateFieldExpression,
SequenceExpression, StaticMemberExpression, TSTypeAssertion, UnaryExpression, UpdateExpression,
YieldExpression,
match_member_expression, AssignmentExpression, AwaitExpression, BinaryExpression,
CallExpression, ComputedMemberExpression, ConditionalExpression, Expression, ImportExpression,
LogicalExpression, MemberExpression, NewExpression, PrivateFieldExpression, SequenceExpression,
StaticMemberExpression, TSTypeAssertion, UnaryExpression, UpdateExpression, YieldExpression,
};
impl<'a> GetPrecedence for Expression<'a> {
@@ -14,7 +13,6 @@ impl<'a> GetPrecedence for Expression<'a> {
Self::SequenceExpression(expr) => expr.precedence(),
Self::AssignmentExpression(expr) => expr.precedence(),
Self::YieldExpression(expr) => expr.precedence(),
Self::ArrowFunctionExpression(expr) => expr.precedence(),
Self::ConditionalExpression(expr) => expr.precedence(),
Self::LogicalExpression(expr) => expr.precedence(),
Self::BinaryExpression(expr) => expr.precedence(),
@@ -41,12 +39,6 @@ impl<'a> GetPrecedence for YieldExpression<'a> {
}
}
impl<'a> GetPrecedence for ArrowFunctionExpression<'a> {
fn precedence(&self) -> Precedence {
Precedence::Arrow
}
}
impl<'a> GetPrecedence for ConditionalExpression<'a> {
fn precedence(&self) -> Precedence {
Precedence::Conditional
@@ -107,11 +99,7 @@ impl<'a> GetPrecedence for ImportExpression<'a> {
impl<'a> GetPrecedence for NewExpression<'a> {
fn precedence(&self) -> Precedence {
if self.arguments.is_empty() {
Precedence::NewWithoutArgs
} else {
Precedence::Call
}
Precedence::Call
}
}
@@ -141,6 +129,6 @@ impl<'a> GetPrecedence for PrivateFieldExpression<'a> {
impl<'a> GetPrecedence for TSTypeAssertion<'a> {
fn precedence(&self) -> Precedence {
Precedence::lowest()
Precedence::Lowest
}
}
@@ -13,6 +13,9 @@ impl<'a, const MINIFY: bool> Codegen<'a, MINIFY> {
pub(crate) fn get_leading_annotate_comment(&mut self, node_start: u32) -> Option<Comment> {
let maybe_leading_comment = self.try_get_leading_comment(node_start);
let comment = maybe_leading_comment?;
if self.latest_consumed_comment_end >= comment.span.end {
return None;
}
let real_end = match comment.kind {
CommentKind::SingleLine => comment.span.end,
CommentKind::MultiLine => comment.span.end + 2,
@@ -67,6 +70,8 @@ impl<'a, const MINIFY: bool> Codegen<'a, MINIFY> {
self.print_soft_space();
}
}
// FIXME: esbuild function `restoreExprStartFlags`
self.start_of_default_export = self.code_len();
}
pub(crate) fn gen_comment(&mut self, node_start: u32) {
+7 -27
View File
@@ -1,35 +1,29 @@
use bitflags::bitflags;
bitflags! {
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Default, Clone, Copy)]
pub struct Context: u8 {
/// [In]
const In = 1 << 0;
const FORBID_IN = 1 << 0;
const FORBID_CALL = 1 << 1;
}
}
impl Default for Context {
fn default() -> Self {
Self::In
}
}
impl Context {
#[inline]
pub fn has_in(self) -> bool {
self.contains(Self::In)
pub fn forbid_in(self) -> bool {
self.contains(Self::FORBID_IN)
}
#[inline]
pub fn has_forbid_call(self) -> bool {
pub fn forbid_call(self) -> bool {
self.contains(Self::FORBID_CALL)
}
#[inline]
#[must_use]
pub fn and_in(self, include: bool) -> Self {
self.and(Self::In, include)
pub fn and_forbid_in(self, include: bool) -> Self {
self.and(Self::FORBID_IN, include)
}
#[inline]
@@ -46,18 +40,4 @@ impl Context {
self - flag
}
}
#[inline]
pub(crate) fn union_in_if(self, include: bool) -> Self {
self.union_if(Self::In, include)
}
#[inline]
fn union_if(self, other: Self, include: bool) -> Self {
if include {
self.union(other)
} else {
self
}
}
}
+115 -90
View File
@@ -1,3 +1,5 @@
use std::ops::Not;
use oxc_allocator::{Box, Vec};
#[allow(clippy::wildcard_imports)]
use oxc_ast::ast::*;
@@ -268,15 +270,8 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ForStatement<'a> {
p.print_soft_space();
p.print_char(b'(');
if let Some(init) = self.init.as_ref() {
let ctx = Context::empty();
match init {
ForStatementInit::UsingDeclaration(decl) => decl.gen(p, ctx),
match_expression!(ForStatementInit) => {
init.to_expression().gen_expr(p, Precedence::lowest(), ctx);
}
ForStatementInit::VariableDeclaration(var) => var.gen(p, ctx),
}
if let Some(init) = &self.init {
init.gen(p, Context::FORBID_IN);
}
p.print_semicolon();
@@ -305,7 +300,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ForInStatement<'a> {
p.print_str("for");
p.print_soft_space();
p.print_char(b'(');
self.left.gen(p, ctx);
self.left.gen(p, Context::empty().and_forbid_in(false));
p.print_soft_space();
p.print_space_before_identifier();
p.print_str("in");
@@ -330,12 +325,24 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ForOfStatement<'a> {
p.print_soft_space();
p.print_space_before_identifier();
p.print_str("of ");
self.right.gen_expr(p, Precedence::Assign, Context::default());
self.right.gen_expr(p, Precedence::Comma, Context::empty());
p.print_char(b')');
p.print_body(&self.body, false, ctx);
}
}
impl<'a, const MINIFY: bool> Gen<MINIFY> for ForStatementInit<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
match self {
Self::UsingDeclaration(decl) => decl.gen(p, ctx),
match_expression!(ForStatementInit) => {
self.to_expression().gen_expr(p, Precedence::Lowest, ctx);
}
Self::VariableDeclaration(var) => var.gen(p, ctx),
}
}
}
impl<'a, const MINIFY: bool> Gen<MINIFY> for ForStatementLeft<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
match self {
@@ -613,7 +620,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for VariableDeclarator<'a> {
p.print_soft_space();
p.print_equal();
p.print_soft_space();
init.gen_expr(p, Precedence::Assign, ctx);
init.gen_expr(p, Precedence::Comma, ctx);
}
}
}
@@ -621,8 +628,8 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for VariableDeclarator<'a> {
impl<'a, const MINIFY: bool> Gen<MINIFY> for Function<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
p.add_source_mapping(self.span.start);
p.gen_comment(self.span.start);
let n = p.code_len();
p.gen_comment(self.span.start);
let wrap = self.is_expression() && (p.start_of_stmt == n || p.start_of_default_export == n);
p.wrap(wrap, |p| {
if self.declare {
@@ -929,7 +936,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSExportAssignment<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
p.print_indent();
p.print_str("export = ");
self.expression.gen_expr(p, Precedence::lowest(), ctx);
self.expression.gen_expr(p, Precedence::Lowest, ctx);
p.print_semicolon_after_statement();
}
}
@@ -1004,7 +1011,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ExportDefaultDeclarationKind<'a> {
match self {
match_expression!(Self) => {
p.start_of_default_export = p.code_len();
self.to_expression().gen_expr(p, Precedence::Assign, Context::default());
self.to_expression().gen_expr(p, Precedence::Comma, Context::empty());
p.print_semicolon_after_statement();
}
Self::FunctionDeclaration(fun) => {
@@ -1375,31 +1382,29 @@ impl<const MINIFY: bool> Gen<MINIFY> for ThisExpression {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for MemberExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence > self.precedence(), |p| match self {
Self::ComputedMemberExpression(expr) => {
expr.gen_expr(p, self.precedence(), ctx.and_in(true));
}
Self::StaticMemberExpression(expr) => expr.gen_expr(p, self.precedence(), ctx),
Self::PrivateFieldExpression(expr) => expr.gen_expr(p, self.precedence(), ctx),
});
match self {
Self::ComputedMemberExpression(expr) => expr.gen_expr(p, precedence, ctx),
Self::StaticMemberExpression(expr) => expr.gen_expr(p, precedence, ctx),
Self::PrivateFieldExpression(expr) => expr.gen_expr(p, precedence, ctx),
}
}
}
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ComputedMemberExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, _precedence: Precedence, ctx: Context) {
self.object.gen_expr(p, self.precedence(), ctx);
self.object.gen_expr(p, Precedence::Prefix, ctx.intersection(Context::FORBID_CALL));
if self.optional {
p.print_str("?.");
}
p.print_char(b'[');
self.expression.gen_expr(p, Precedence::lowest(), ctx);
self.expression.gen_expr(p, Precedence::Lowest, Context::empty());
p.print_char(b']');
}
}
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for StaticMemberExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, _precedence: Precedence, ctx: Context) {
self.object.gen_expr(p, self.precedence(), ctx);
self.object.gen_expr(p, Precedence::Postfix, ctx.intersection(Context::FORBID_CALL));
if self.optional {
p.print_char(b'?');
} else if p.need_space_before_dot == p.code_len() {
@@ -1413,7 +1418,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for StaticMemberExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for PrivateFieldExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, _precedence: Precedence, ctx: Context) {
self.object.gen_expr(p, self.precedence(), ctx);
self.object.gen_expr(p, Precedence::Prefix, ctx.intersection(Context::FORBID_CALL));
if self.optional {
p.print_str("?");
}
@@ -1424,12 +1429,17 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for PrivateFieldExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for CallExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
let wrap = precedence > self.precedence() || ctx.has_forbid_call();
let ctx = ctx.and_forbid_call(false);
let mut wrap = precedence >= Precedence::New || ctx.intersects(Context::FORBID_CALL);
let annotate_comment = p.get_leading_annotate_comment(self.span.start);
if annotate_comment.is_some() && precedence >= Precedence::Postfix {
wrap = true;
}
p.wrap(wrap, |p| {
p.gen_comment(self.span.start);
if let Some(comment) = annotate_comment {
p.print_comment(comment);
}
p.add_source_mapping(self.span.start);
self.callee.gen_expr(p, self.precedence(), ctx);
self.callee.gen_expr(p, Precedence::Postfix, Context::empty());
if self.optional {
p.print_str("?.");
}
@@ -1449,7 +1459,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for Argument<'a> {
match self {
Self::SpreadElement(elem) => elem.gen(p, ctx),
match_expression!(Self) => {
self.to_expression().gen_expr(p, Precedence::Assign, Context::default());
self.to_expression().gen_expr(p, Precedence::Comma, Context::empty());
}
}
}
@@ -1459,7 +1469,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ArrayExpressionElement<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
match self {
match_expression!(Self) => {
self.to_expression().gen_expr(p, Precedence::Assign, Context::default());
self.to_expression().gen_expr(p, Precedence::Comma, Context::empty());
}
Self::SpreadElement(elem) => elem.gen(p, ctx),
Self::Elision(_span) => {}
@@ -1471,7 +1481,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for SpreadElement<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) {
p.add_source_mapping(self.span.start);
p.print_ellipsis();
self.argument.gen_expr(p, Precedence::Assign, Context::default());
self.argument.gen_expr(p, Precedence::Comma, Context::empty());
}
}
@@ -1601,7 +1611,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for ObjectProperty<'a> {
p.print_colon();
p.print_soft_space();
}
self.value.gen_expr(p, Precedence::Assign, Context::default());
self.value.gen_expr(p, Precedence::Comma, Context::empty());
}
}
@@ -1611,7 +1621,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for PropertyKey<'a> {
Self::StaticIdentifier(ident) => ident.gen(p, ctx),
Self::PrivateIdentifier(ident) => ident.gen(p, ctx),
match_expression!(Self) => {
self.to_expression().gen_expr(p, Precedence::Assign, Context::default());
self.to_expression().gen_expr(p, Precedence::Comma, Context::empty());
}
}
}
@@ -1619,7 +1629,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for PropertyKey<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ArrowFunctionExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence > Precedence::Assign, |p| {
p.wrap(precedence >= Precedence::Assign, |p| {
p.gen_comment(self.span.start);
if self.r#async {
p.add_source_mapping(self.span.start);
@@ -1648,7 +1658,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ArrowFunctionExpression<'a> {
if self.expression {
if let Statement::ExpressionStatement(stmt) = &self.body.statements[0] {
p.start_of_arrow_expr = p.code_len();
stmt.expression.gen_expr(p, Precedence::Assign, ctx);
stmt.expression.gen_expr(p, Precedence::Comma, ctx.and_forbid_in(true));
}
} else {
self.body.gen(p, ctx);
@@ -1658,8 +1668,8 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ArrowFunctionExpression<'a> {
}
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for YieldExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence >= self.precedence(), |p| {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, _ctx: Context) {
p.wrap(precedence >= Precedence::Assign, |p| {
p.add_source_mapping(self.span.start);
p.print_space_before_identifier();
p.print_str("yield");
@@ -1671,7 +1681,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for YieldExpression<'a> {
if !self.delegate {
p.print_hard_space();
}
argument.gen_expr(p, Precedence::Assign, ctx);
argument.gen_expr(p, Precedence::Yield, Context::empty());
}
});
}
@@ -1680,7 +1690,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for YieldExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for UpdateExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
let operator = self.operator.as_str();
p.wrap(precedence > self.precedence(), |p| {
p.wrap(precedence >= self.precedence(), |p| {
if self.prefix {
p.add_source_mapping(self.span.start);
p.print_space_before_operator(self.operator.into());
@@ -1701,7 +1711,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for UpdateExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for UnaryExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence > self.precedence() || precedence == Precedence::Exponential, |p| {
p.wrap(precedence >= self.precedence(), |p| {
let operator = self.operator.as_str();
if self.operator.is_keyword() {
p.print_space_before_identifier();
@@ -1713,18 +1723,27 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for UnaryExpression<'a> {
p.prev_op = Some(self.operator.into());
p.prev_op_end = p.code().len();
}
self.argument.gen_expr(p, Precedence::Prefix, ctx);
self.argument.gen_expr(p, Precedence::Exponentiation, ctx);
});
}
}
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for BinaryExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
let wrap_in = self.operator == BinaryOperator::In && !ctx.has_in();
let mut ctx = ctx;
let wrap_in = self.operator == BinaryOperator::In && ctx.intersects(Context::FORBID_IN);
let wrap = precedence >= self.precedence() || wrap_in;
if wrap {
ctx &= Context::FORBID_IN.not();
}
p.wrap(wrap, |p| {
let left_precedence = if self.precedence().is_right_associative() {
self.precedence()
let left_precedence = if self.operator.precedence().is_right_associative() {
// "**" can't contain certain unary expressions
if matches!(self.left.without_parenthesized(), Expression::UnaryExpression(_)) {
Precedence::Call
} else {
self.precedence()
}
} else {
self.operator.lower_precedence()
};
@@ -1735,12 +1754,12 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for BinaryExpression<'a> {
p.print_soft_space();
}
self.operator.gen(p, ctx);
let right_precedence = if self.precedence().is_left_associative() {
let right_precedence = if self.operator.precedence().is_left_associative() {
self.precedence()
} else {
self.operator.lower_precedence()
};
self.right.gen_expr(p, right_precedence, ctx.union_in_if(wrap));
self.right.gen_expr(p, right_precedence, ctx & Context::FORBID_IN);
});
}
}
@@ -1766,7 +1785,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for PrivateInExpression<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
self.left.gen(p, ctx);
p.print_str(" in ");
self.right.gen_expr(p, Precedence::Shift, Context::default());
self.right.gen_expr(p, Precedence::Shift, Context::empty());
}
}
@@ -1775,9 +1794,9 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for LogicalExpression<'a> {
// Logical expressions and coalesce expressions cannot be mixed (Syntax Error).
let mixed = matches!(
(precedence, self.precedence()),
(Precedence::Coalesce, Precedence::LogicalAnd | Precedence::LogicalOr)
(Precedence::NullishCoalescing, Precedence::LogicalAnd | Precedence::LogicalOr)
);
p.wrap(mixed || (precedence > self.precedence()), |p| {
p.wrap(mixed || (precedence >= self.precedence()), |p| {
self.left.gen_expr(p, self.precedence(), ctx);
p.print_soft_space();
p.print_str(self.operator.as_str());
@@ -1789,17 +1808,21 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for LogicalExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ConditionalExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
let wrap = precedence > self.precedence();
let mut ctx = ctx;
let wrap = precedence >= self.precedence();
if wrap {
ctx &= Context::FORBID_IN.not();
}
p.wrap(wrap, |p| {
self.test.gen_expr(p, self.precedence(), ctx);
self.test.gen_expr(p, Precedence::Conditional, ctx & Context::FORBID_IN);
p.print_soft_space();
p.print_char(b'?');
p.print_soft_space();
self.consequent.gen_expr(p, Precedence::Assign, ctx.and_in(true));
self.consequent.gen_expr(p, Precedence::Yield, Context::empty());
p.print_soft_space();
p.print_colon();
p.print_soft_space();
self.alternate.gen_expr(p, Precedence::Assign, ctx.union_in_if(wrap));
self.alternate.gen_expr(p, Precedence::Yield, ctx & Context::FORBID_IN);
});
}
}
@@ -1831,12 +1854,12 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for AssignmentExpression<'a> {
let wrap = ((p.start_of_stmt == n || p.start_of_arrow_expr == n)
&& matches!(self.left, AssignmentTarget::ObjectAssignmentTarget(_)))
|| identifier_is_keyword;
p.wrap(wrap || precedence > self.precedence(), |p| {
p.wrap(wrap || precedence >= self.precedence(), |p| {
self.left.gen(p, ctx);
p.print_soft_space();
p.print_str(self.operator.as_str());
p.print_soft_space();
self.right.gen_expr(p, Precedence::Assign, ctx);
self.right.gen_expr(p, Precedence::Comma, ctx);
});
}
}
@@ -1845,11 +1868,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AssignmentTarget<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
match self {
match_simple_assignment_target!(Self) => {
self.to_simple_assignment_target().gen_expr(
p,
Precedence::Assign,
Context::default(),
);
self.to_simple_assignment_target().gen_expr(p, Precedence::Comma, Context::empty());
}
match_assignment_target_pattern!(Self) => {
self.to_assignment_target_pattern().gen(p, ctx);
@@ -1943,7 +1962,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AssignmentTargetWithDefault<'a> {
p.print_soft_space();
p.print_equal();
p.print_soft_space();
self.init.gen_expr(p, Precedence::Assign, Context::default());
self.init.gen_expr(p, Precedence::Comma, Context::empty());
}
}
@@ -1972,7 +1991,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AssignmentTargetPropertyIdentifier<
p.print_soft_space();
p.print_equal();
p.print_soft_space();
expr.gen_expr(p, Precedence::Assign, Context::default());
expr.gen_expr(p, Precedence::Comma, Context::empty());
}
}
}
@@ -1988,7 +2007,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AssignmentTargetPropertyProperty<'a
}
key @ match_expression!(PropertyKey) => {
p.print_char(b'[');
key.to_expression().gen_expr(p, Precedence::Assign, Context::default());
key.to_expression().gen_expr(p, Precedence::Comma, Context::empty());
p.print_char(b']');
}
}
@@ -2007,23 +2026,22 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AssignmentTargetRest<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for SequenceExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, _ctx: Context) {
p.wrap(precedence > self.precedence(), |p| {
p.print_expressions(&self.expressions, Precedence::Comma, Context::default());
p.wrap(precedence >= self.precedence(), |p| {
p.print_expressions(&self.expressions, Precedence::Lowest, Context::empty());
});
}
}
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ImportExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
let wrap = precedence > self.precedence() || ctx.has_forbid_call();
let ctx = ctx.and_forbid_call(false);
let wrap = precedence >= Precedence::New || ctx.intersects(Context::FORBID_CALL);
p.wrap(wrap, |p| {
p.add_source_mapping(self.span.start);
p.print_str("import(");
self.source.gen_expr(p, Precedence::Assign, ctx);
self.source.gen_expr(p, Precedence::Comma, Context::empty());
if !self.arguments.is_empty() {
p.print_comma();
p.print_expressions(&self.arguments, Precedence::Assign, ctx);
p.print_expressions(&self.arguments, Precedence::Comma, Context::empty());
}
p.print_char(b')');
});
@@ -2053,7 +2071,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TemplateLiteral<'a> {
impl<'a, const MINIFY: bool> Gen<MINIFY> for TaggedTemplateExpression<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
p.add_source_mapping(self.span.start);
self.tag.gen_expr(p, Precedence::Postfix, Context::default());
self.tag.gen_expr(p, Precedence::Postfix, Context::empty());
self.quasi.gen(p, ctx);
}
}
@@ -2067,10 +2085,10 @@ impl<const MINIFY: bool> Gen<MINIFY> for Super {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for AwaitExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence > self.precedence(), |p| {
p.wrap(precedence >= self.precedence(), |p| {
p.add_source_mapping(self.span.start);
p.print_str("await ");
self.argument.gen_expr(p, self.precedence(), ctx);
self.argument.gen_expr(p, Precedence::Exponentiation, ctx);
});
}
}
@@ -2088,11 +2106,18 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ChainExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for NewExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence > self.precedence(), |p| {
p.gen_comment(self.span.start);
let mut wrap = precedence >= self.precedence();
let annotate_comment = p.get_leading_annotate_comment(self.span.start);
if annotate_comment.is_some() && precedence >= Precedence::Postfix {
wrap = true;
}
p.wrap(wrap, |p| {
if let Some(comment) = annotate_comment {
p.print_comment(comment);
}
p.add_source_mapping(self.span.start);
p.print_str("new ");
self.callee.gen_expr(p, Precedence::NewWithoutArgs, ctx.and_forbid_call(true));
self.callee.gen_expr(p, Precedence::New, Context::FORBID_CALL);
p.print_char(b'(');
p.print_list(&self.arguments, ctx);
p.print_char(b')');
@@ -2132,7 +2157,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for Class<'a> {
}
if let Some(super_class) = self.super_class.as_ref() {
p.print_str(" extends ");
super_class.gen_expr(p, Precedence::Call, Context::default());
super_class.gen_expr(p, Precedence::Call, Context::empty());
if let Some(super_type_parameters) = &self.super_type_parameters {
super_type_parameters.gen(p, ctx);
}
@@ -2288,7 +2313,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for JSXAttributeValue<'a> {
impl<'a, const MINIFY: bool> Gen<MINIFY> for JSXSpreadAttribute<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) {
p.print_str("{...");
self.argument.gen_expr(p, Precedence::Assign, Context::default());
self.argument.gen_expr(p, Precedence::Comma, Context::empty());
p.print_char(b'}');
}
}
@@ -2503,7 +2528,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for PropertyDefinition<'a> {
p.print_soft_space();
p.print_equal();
p.print_soft_space();
value.gen_expr(p, Precedence::Assign, Context::default());
value.gen_expr(p, Precedence::Comma, Context::empty());
}
}
}
@@ -2530,7 +2555,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AccessorProperty<'a> {
}
if let Some(value) = &self.value {
p.print_equal();
value.gen_expr(p, Precedence::Assign, Context::default());
value.gen_expr(p, Precedence::Comma, Context::empty());
}
}
}
@@ -2661,7 +2686,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for AssignmentPattern<'a> {
p.print_soft_space();
p.print_equal();
p.print_soft_space();
self.right.gen_expr(p, Precedence::Assign, Context::default());
self.right.gen_expr(p, Precedence::Comma, Context::empty());
}
}
@@ -2696,7 +2721,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for Decorator<'a> {
p.print_char(b'@');
let wrap = need_wrap(&self.expression);
p.wrap(wrap, |p| {
self.expression.gen_expr(p, Precedence::Assign, Context::default());
self.expression.gen_expr(p, Precedence::Lowest, Context::empty());
});
}
}
@@ -3043,7 +3068,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSLiteral<'a> {
Self::RegExpLiteral(decl) => decl.gen(p, ctx),
Self::StringLiteral(decl) => decl.gen(p, ctx),
Self::TemplateLiteral(decl) => decl.gen(p, ctx),
Self::UnaryExpression(decl) => decl.gen_expr(p, Precedence::Assign, ctx),
Self::UnaryExpression(decl) => decl.gen_expr(p, Precedence::Comma, ctx),
}
}
}
@@ -3118,7 +3143,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSSignature<'a> {
p.print_str(key.name.as_str());
}
key @ match_expression!(PropertyKey) => {
key.to_expression().gen_expr(p, Precedence::Assign, ctx);
key.to_expression().gen_expr(p, Precedence::Comma, ctx);
}
}
}
@@ -3184,7 +3209,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSSignature<'a> {
p.print_str(key.name.as_str());
}
key @ match_expression!(PropertyKey) => {
key.to_expression().gen_expr(p, Precedence::Assign, ctx);
key.to_expression().gen_expr(p, Precedence::Comma, ctx);
}
}
}
@@ -3502,7 +3527,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSEnumMember<'a> {
TSEnumMemberName::StaticNumericLiteral(decl) => decl.gen(p, ctx),
decl @ match_expression!(TSEnumMemberName) => {
p.print_str("[");
decl.to_expression().gen_expr(p, Precedence::lowest(), ctx);
decl.to_expression().gen_expr(p, Precedence::Lowest, ctx);
p.print_str("]");
}
}
@@ -3510,7 +3535,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSEnumMember<'a> {
p.print_soft_space();
p.print_equal();
p.print_soft_space();
init.gen_expr(p, Precedence::lowest(), ctx);
init.gen_expr(p, Precedence::Lowest, ctx);
}
}
}
@@ -3558,7 +3583,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSModuleReference<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for TSTypeAssertion<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.wrap(precedence > self.precedence(), |p| {
p.wrap(precedence >= self.precedence(), |p| {
p.print_str("<");
// var r = < <T>(x: T) => T > ((x) => { return null; });
// ^ make sure space is printed here.
@@ -3567,7 +3592,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for TSTypeAssertion<'a> {
}
self.type_annotation.gen(p, ctx);
p.print_str(">");
self.expression.gen_expr(p, Precedence::Grouping, ctx);
self.expression.gen_expr(p, Precedence::Member, ctx);
});
}
}
+1 -1
View File
@@ -409,7 +409,7 @@ impl<'a, const MINIFY: bool> Codegen<'a, MINIFY> {
#[inline]
pub fn print_expression(&mut self, expr: &Expression<'_>) {
expr.gen_expr(self, Precedence::lowest(), Context::default());
expr.gen_expr(self, Precedence::Lowest, Context::empty());
}
fn print_expressions<T: GenExpr<MINIFY>>(
+55 -57
View File
@@ -146,11 +146,10 @@ fn test_array() {
fn test_splat() {
test("[...(a, b)]", "[...(a, b)];\n");
test("x(...(a, b))", "x(...(a, b));\n");
// test("({...(a, b)})", "({ ...(a, b) });\n");
test("({...(a, b)})", "({ ...(a, b) });\n");
}
#[test]
#[ignore]
fn test_new() {
test("new x", "new x();\n");
test("new x()", "new x();\n");
@@ -167,49 +166,48 @@ fn test_new() {
test("new (foo()[bar])", "new (foo())[bar]();\n");
test("new (foo())[bar]", "new (foo())[bar]();\n");
test("new (import('foo').bar)", "new (import(\"foo\");).bar();\n");
test("new (import('foo')).bar", "new (import(\"foo\");).bar();\n");
test("new (import('foo')[bar])", "new (import(\"foo\");)[bar]();\n");
test("new (import('foo'))[bar]", "new (import(\"foo\");)[bar]();\n");
test("new (import('foo').bar)", "new (import(\"foo\")).bar();\n");
test("new (import('foo')).bar", "new (import(\"foo\")).bar();\n");
test("new (import('foo')[bar])", "new (import(\"foo\"))[bar]();\n");
test("new (import('foo'))[bar]", "new (import(\"foo\"))[bar]();\n");
test_minify("new x", "new x;");
test_minify("new x.y", "new x.y;");
test_minify("(new x).y", "new x().y;");
test_minify("new x().y", "new x().y;");
test_minify("new x() + y", "new x+y;");
test_minify("new x() ** 2", "new x**2;");
// test_minify("new x", "new x;");
// test_minify("new x.y", "new x.y;");
// test_minify("(new x).y", "new x().y;");
// test_minify("new x().y", "new x().y;");
// test_minify("new x() + y", "new x+y;");
// test_minify("new x() ** 2", "new x**2;");
// Test preservation of Webpack-specific comments
test(
"new Worker(// webpackFoo: 1\n // webpackBar: 2\n 'path');",
"new Worker(\n // webpackFoo: 1\n // webpackBar: 2\n \"path\"\n);\n",
);
test(
"new Worker(/* webpackFoo: 1 */ /* webpackBar: 2 */ 'path');",
"new Worker(\n /* webpackFoo: 1 */\n /* webpackBar: 2 */\n \"path\"\n);\n",
);
test(
"new Worker(\n /* multi\n * line\n * webpackBar: */ 'path');",
"new Worker(\n /* multi\n * line\n * webpackBar: */\n \"path\"\n);\n",
);
test(
"new Worker(/* webpackFoo: 1 */ 'path' /* webpackBar:2 */);",
"new Worker(\n /* webpackFoo: 1 */\n \"path\"\n /* webpackBar:2 */\n);\n",
);
test(
"new Worker(/* webpackFoo: 1 */ 'path' /* webpackBar:2 */ ,);",
"new Worker(\n /* webpackFoo: 1 */\n \"path\"\n);\n",
); // Not currently handled
test(
"new Worker(/* webpackFoo: 1 */ 'path', /* webpackBar:2 */ );",
"new Worker(\n /* webpackFoo: 1 */\n \"path\"\n /* webpackBar:2 */\n);\n",
);
test( "new Worker(new URL('path', /* webpackFoo: these can go anywhere */ import.meta.url))",
"new Worker(new URL(\n \"path\",\n /* webpackFoo: these can go anywhere */\n import.meta.url\n));\n");
// test(
// "new Worker(// webpackFoo: 1\n // webpackBar: 2\n 'path');",
// "new Worker(\n // webpackFoo: 1\n // webpackBar: 2\n \"path\"\n);\n",
// );
// test(
// "new Worker(/* webpackFoo: 1 */ /* webpackBar: 2 */ 'path');",
// "new Worker(\n /* webpackFoo: 1 */\n /* webpackBar: 2 */\n \"path\"\n);\n",
// );
// test(
// "new Worker(\n /* multi\n * line\n * webpackBar: */ 'path');",
// "new Worker(\n /* multi\n * line\n * webpackBar: */\n \"path\"\n);\n",
// );
// test(
// "new Worker(/* webpackFoo: 1 */ 'path' /* webpackBar:2 */);",
// "new Worker(\n /* webpackFoo: 1 */\n \"path\"\n /* webpackBar:2 */\n);\n",
// );
// test(
// "new Worker(/* webpackFoo: 1 */ 'path' /* webpackBar:2 */ ,);",
// "new Worker(\n /* webpackFoo: 1 */\n \"path\"\n);\n",
// ); // Not currently handled
// test(
// "new Worker(/* webpackFoo: 1 */ 'path', /* webpackBar:2 */ );",
// "new Worker(\n /* webpackFoo: 1 */\n \"path\"\n /* webpackBar:2 */\n);\n",
// );
// test( "new Worker(new URL('path', /* webpackFoo: these can go anywhere */ import.meta.url))",
// "new Worker(new URL(\n \"path\",\n /* webpackFoo: these can go anywhere */\n import.meta.url\n));\n");
}
#[test]
#[ignore]
fn test_call() {
test("x()()()", "x()()();\n");
test("x().y()[z]()", "x().y()[z]();\n");
@@ -354,19 +352,19 @@ fn test_template() {
test("await (tag`${x}`)", "await tag`${x}`;\n");
test("(await tag)`${x}`", "(await tag)`${x}`;\n");
// test("new tag`x`", "new tag`x`();\n");
// test("new (tag`x`)", "new tag`x`();\n");
// test("new tag()`x`", "new tag()`x`;\n");
// test("(new tag)`x`", "new tag()`x`;\n");
test("new tag`x`", "new tag`x`();\n");
test("new (tag`x`)", "new tag`x`();\n");
test("new tag()`x`", "new tag()`x`;\n");
test("(new tag)`x`", "new tag()`x`;\n");
// test_minify("new tag`x`", "new tag`x`;");
// test_minify("new (tag`x`)", "new tag`x`;");
// test_minify("new tag()`x`", "new tag()`x`;");
// test_minify("(new tag)`x`", "new tag()`x`;");
// test("new tag`${x}`", "new tag`${x}`();\n");
// test("new (tag`${x}`)", "new tag`${x}`();\n");
// test("new tag()`${x}`", "new tag()`${x}`;\n");
// test("(new tag)`${x}`", "new tag()`${x}`;\n");
test("new tag`${x}`", "new tag`${x}`();\n");
test("new (tag`${x}`)", "new tag`${x}`();\n");
test("new tag()`${x}`", "new tag()`${x}`;\n");
test("(new tag)`${x}`", "new tag()`${x}`;\n");
// test_minify("new tag`${x}`", "new tag`${x}`;");
// test_minify("new (tag`${x}`)", "new tag`${x}`;");
// test_minify("new tag()`${x}`", "new tag()`${x}`;");
@@ -497,17 +495,17 @@ fn test_pure_comment() {
test("new (function() {})", "new function() {}();\n");
test("new (function() {})()", "new function() {}();\n");
// test("/*@__PURE__*/new (function() {})()", "/* @__PURE__ */ new function() {}();\n");
test("/*@__PURE__*/new (function() {})()", "/*@__PURE__*/ new function() {}();\n");
// test("export default (function() { foo() })", "export default (function() {\n foo();\n});\n");
// test(
// "export default (function() { foo() })()",
// "export default (function() {\n foo();\n})();\n",
// );
// test(
// "export default /*@__PURE__*/(function() { foo() })()",
// "export default /* @__PURE__ */ (function() {\n foo();\n})();\n",
// );
test("export default (function() { foo() })", "export default (function() {\n\tfoo();\n});\n");
test(
"export default (function() { foo() })()",
"export default (function() {\n\tfoo();\n})();\n",
);
test(
"export default /*@__PURE__*/(function() { foo() })()",
"export default /*@__PURE__*/ (function() {\n\tfoo();\n})();\n",
);
}
#[test]
@@ -178,7 +178,7 @@ const builtInSymbols = new Set(
Object.getOwnPropertyNames(Symbol)
.filter(key => key !== "arguments" && key !== "caller")
)"#,
"const builtInSymbols = new Set(/*#__PURE__*/ (Object.getOwnPropertyNames(Symbol)).filter((key) => key !== \"arguments\" && key !== \"caller\"));\n",
"const builtInSymbols = new Set(/*#__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\"));\n",
);
test("(/* @__PURE__ */ new Foo()).bar();\n", "(/* @__PURE__ */ new Foo()).bar();\n");
+1 -1
View File
@@ -34,7 +34,7 @@ impl<'a> ParserImpl<'a> {
{
let span = self.start_span();
self.bump_any(); // bump `async`
let expr = self.parse_binary_expression_or_higher(Precedence::lowest())?;
let expr = self.parse_binary_expression_or_higher(Precedence::Comma)?;
return self
.parse_simple_arrow_function_expression(span, expr, /* async */ true)
.map(Some);
+1 -1
View File
@@ -1032,7 +1032,7 @@ impl<'a> ParserImpl<'a> {
}
let span = self.start_span();
let lhs = self.parse_binary_expression_or_higher(Precedence::lowest())?;
let lhs = self.parse_binary_expression_or_higher(Precedence::Comma)?;
let kind = self.cur_kind();
// `x => {}`
+4 -4
View File
@@ -9,13 +9,13 @@ use crate::lexer::Kind;
pub fn kind_to_precedence(kind: Kind) -> Option<Precedence> {
match kind {
Kind::Question2 => Some(Precedence::Coalesce),
Kind::Question2 => Some(Precedence::NullishCoalescing),
Kind::Pipe2 => Some(Precedence::LogicalOr),
Kind::Amp2 => Some(Precedence::LogicalAnd),
Kind::Pipe => Some(Precedence::BitwiseOr),
Kind::Caret => Some(Precedence::BitwiseXor),
Kind::Amp => Some(Precedence::BitwiseAnd),
Kind::Eq2 | Kind::Eq3 | Kind::Neq | Kind::Neq2 => Some(Precedence::Equality),
Kind::Eq2 | Kind::Eq3 | Kind::Neq | Kind::Neq2 => Some(Precedence::Equals),
Kind::LAngle
| Kind::RAngle
| Kind::LtEq
@@ -23,11 +23,11 @@ pub fn kind_to_precedence(kind: Kind) -> Option<Precedence> {
| Kind::Instanceof
| Kind::In
| Kind::As
| Kind::Satisfies => Some(Precedence::Relational),
| Kind::Satisfies => Some(Precedence::Compare),
Kind::ShiftLeft | Kind::ShiftRight | Kind::ShiftRight3 => Some(Precedence::Shift),
Kind::Plus | Kind::Minus => Some(Precedence::Add),
Kind::Star | Kind::Slash | Kind::Percent => Some(Precedence::Multiply),
Kind::Star2 => Some(Precedence::Exponential),
Kind::Star2 => Some(Precedence::Exponentiation),
_ => None,
}
}
+6 -6
View File
@@ -241,8 +241,8 @@ impl BinaryOperator {
| Self::GreaterThan
| Self::GreaterEqualThan
| Self::Instanceof
| Self::In => Precedence::Equality,
Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill => Precedence::Relational,
| Self::In => Precedence::Equals,
Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill => Precedence::Compare,
Self::Addition | Self::Subtraction => Precedence::Shift,
Self::Multiplication | Self::Remainder | Self::Division => Precedence::Add,
Self::Exponential => Precedence::Multiply,
@@ -257,18 +257,18 @@ impl GetPrecedence for BinaryOperator {
Self::BitwiseXOR => Precedence::BitwiseXor,
Self::BitwiseAnd => Precedence::BitwiseAnd,
Self::Equality | Self::Inequality | Self::StrictEquality | Self::StrictInequality => {
Precedence::Equality
Precedence::Equals
}
Self::LessThan
| Self::LessEqualThan
| Self::GreaterThan
| Self::GreaterEqualThan
| Self::Instanceof
| Self::In => Precedence::Relational,
| Self::In => Precedence::Compare,
Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill => Precedence::Shift,
Self::Subtraction | Self::Addition => Precedence::Add,
Self::Multiplication | Self::Remainder | Self::Division => Precedence::Multiply,
Self::Exponential => Precedence::Exponential,
Self::Exponential => Precedence::Exponentiation,
}
}
}
@@ -300,7 +300,7 @@ impl GetPrecedence for LogicalOperator {
match self {
Self::Or => Precedence::LogicalOr,
Self::And => Precedence::LogicalAnd,
Self::Coalesce => Precedence::Coalesce,
Self::Coalesce => Precedence::NullishCoalescing,
}
}
}
+31 -25
View File
@@ -10,59 +10,65 @@ pub trait GetPrecedence {
/// Note: This differs from the the operator precedence table
/// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table>
/// but the relative positions are the same, as both are derived from the ECMA specification.
///
/// The values are the same as
/// [esbuild](https://github.com/evanw/esbuild/blob/78f89e41d5e8a7088f4820351c6305cc339f8820/internal/js_ast/js_ast.go#L28)
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
#[repr(u8)]
pub enum Precedence {
Lowest,
Comma,
Assign,
Arrow,
Spread,
Yield,
Assign,
Conditional,
Coalesce,
NullishCoalescing,
LogicalOr,
LogicalAnd,
BitwiseOr,
BitwiseXor,
BitwiseAnd,
Equality,
Relational,
Equals,
Compare,
Shift,
Add,
Multiply,
Exponential,
Exponentiation,
Prefix,
Postfix,
NewWithoutArgs,
New,
Call,
Member,
Grouping,
}
impl Precedence {
pub fn lowest() -> Self {
Self::Comma
}
pub fn is_right_associative(&self) -> bool {
matches!(self, Self::Exponential | Self::Conditional | Self::Arrow | Self::Assign)
matches!(self, Self::Exponentiation | Self::Conditional | Self::Assign)
}
pub fn is_left_associative(&self) -> bool {
matches!(
self,
Self::Member
| Self::Multiply
| Self::Add
| Self::Shift
| Self::Relational
| Self::Equality
| Self::BitwiseAnd
| Self::BitwiseXor
| Self::BitwiseOr
| Self::LogicalAnd
| Self::LogicalOr
| Self::Coalesce
Self::Lowest
| Self::Comma
| Self::Spread
| Self::Yield
| Self::NullishCoalescing
| Self::LogicalOr
| Self::LogicalAnd
| Self::BitwiseOr
| Self::BitwiseXor
| Self::BitwiseAnd
| Self::Equals
| Self::Compare
| Self::Shift
| Self::Add
| Self::Multiply
| Self::Prefix
| Self::Postfix
| Self::New
| Self::Call
| Self::Member
)
}
}
+204 -204
View File
@@ -55,9 +55,9 @@ Unexpected token
(0:0-1:0) "foo;" --> (0:0-1:0) "foo;"
(1:0-1:5) "\nfoo(" --> (1:0-1:5) "\nfoo("
(1:5-2:0) ");" --> (1:5-2:0) ");"
(2:0-2:5) "\nfoo(" --> (2:0-2:6) "\n(foo("
(2:5-2:6) ")" --> (2:6-2:8) "))"
(2:6-3:0) ".bar;" --> (2:8-3:0) ".bar;"
(2:0-2:5) "\nfoo(" --> (2:0-2:5) "\nfoo("
(2:5-2:6) ")" --> (2:5-2:6) ")"
(2:6-3:0) ".bar;" --> (2:6-3:0) ".bar;"
(3:0-3:4) "\nobj" --> (3:0-3:4) "\nobj"
(3:4-4:0) ".foo;" --> (3:4-4:0) ".foo;"
(4:0-4:4) "\nobj" --> (4:0-4:4) "\nobj"
@@ -66,17 +66,17 @@ Unexpected token
(5:0-5:4) "\nobj" --> (5:0-5:4) "\nobj"
(5:4-5:8) ".foo" --> (5:4-5:8) ".foo"
(5:8-6:0) ".bar;" --> (5:8-6:0) ".bar;"
(6:0-6:4) "\nobj" --> (6:0-6:5) "\n(obj"
(6:4-6:9) ".foo(" --> (6:5-6:10) ".foo("
(6:9-6:10) ")" --> (6:10-6:12) "))"
(6:10-7:0) ".bar;" --> (6:12-7:0) ".bar;"
(6:0-6:4) "\nobj" --> (6:0-6:4) "\nobj"
(6:4-6:9) ".foo(" --> (6:4-6:9) ".foo("
(6:9-6:10) ")" --> (6:9-6:10) ")"
(6:10-7:0) ".bar;" --> (6:10-7:0) ".bar;"
(7:0-8:2) "\n{\n " --> (7:0-8:0) "\n{"
(8:2-9:2) " foo;\n " --> (8:0-9:0) "\n\tfoo;"
(9:2-9:7) " foo(" --> (9:0-9:6) "\n\tfoo("
(9:7-10:2) ");\n " --> (9:6-10:0) ");"
(10:2-10:7) " foo(" --> (10:0-10:7) "\n\t(foo("
(10:7-10:8) ")" --> (10:7-10:9) "))"
(10:8-11:2) ".bar;\n " --> (10:9-11:0) ".bar;"
(10:2-10:7) " foo(" --> (10:0-10:6) "\n\tfoo("
(10:7-10:8) ")" --> (10:6-10:7) ")"
(10:8-11:2) ".bar;\n " --> (10:7-11:0) ".bar;"
(11:2-11:6) " obj" --> (11:0-11:5) "\n\tobj"
(11:6-12:2) ".foo;\n " --> (11:5-12:0) ".foo;"
(12:2-12:6) " obj" --> (12:0-12:5) "\n\tobj"
@@ -85,10 +85,10 @@ Unexpected token
(13:2-13:6) " obj" --> (13:0-13:5) "\n\tobj"
(13:6-13:10) ".foo" --> (13:5-13:9) ".foo"
(13:10-14:2) ".bar;\n " --> (13:9-14:0) ".bar;"
(14:2-14:6) " obj" --> (14:0-14:6) "\n\t(obj"
(14:6-14:11) ".foo(" --> (14:6-14:11) ".foo("
(14:11-14:12) ")" --> (14:11-14:13) "))"
(14:12-15:1) ".bar;\n" --> (14:13-15:0) ".bar;"
(14:2-14:6) " obj" --> (14:0-14:5) "\n\tobj"
(14:6-14:11) ".foo(" --> (14:5-14:10) ".foo("
(14:11-14:12) ")" --> (14:10-14:11) ")"
(14:12-15:1) ".bar;\n" --> (14:11-15:0) ".bar;"
(15:1-16:1) "}\n" --> (15:0-16:1) "\n}\n"
@@ -993,14 +993,14 @@ Invalid Character `[`
(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"
(358:2-358:15) " if (!(typeof" --> (171:0-171:17) "\n\t\t\tif (!((typeof"
(358:15-358:32) " partialState ===" --> (171:17-171:34) " partialState ==="
(358:32-358:51) " 'object' || typeof" --> (171:34-171:53) " \"object\" || typeof"
(358:51-358:68) " partialState ===" --> (171:53-171:70) " partialState ==="
(358:68-358:82) " 'function' ||" --> (171:70-171:85) " \"function\") ||"
(358:82-358:98) " partialState ==" --> (171:85-171:101) " partialState =="
(358:98-358:105) " null))" --> (171:101-171:108) " null))"
(358:105-359:4) " {\n " --> (171:108-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"
@@ -1165,12 +1165,12 @@ Invalid Character `[`
(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) " \"\";"
(451:6-451:21) " functionName =" --> (218:7-218:23) " functionName = "
(451:21-451:31) " innerType" --> (218:23-218:33) "(innerType"
(451:31-451:46) ".displayName ||" --> (218:33-218:48) ".displayName ||"
(451:46-451:56) " innerType" --> (218:48-218:58) " innerType"
(451:56-451:64) ".name ||" --> (218:58-218:67) ".name) ||"
(451:64-452:2) " '';\n " --> (218:67-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 || "
@@ -1218,12 +1218,12 @@ Invalid Character `[`
(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"
(472:4-472:11) " return" --> (234:0-234:12) "\n\t\t\t\treturn "
(472:11-472:16) " type" --> (234:12-234:17) "(type"
(472:16-472:31) ".displayName ||" --> (234:17-234:32) ".displayName ||"
(472:31-472:36) " type" --> (234:32-234:37) " type"
(472:36-472:44) ".name ||" --> (234:37-234:46) ".name) ||"
(472:44-473:3) " null;\n " --> (234:46-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 ==="
@@ -1389,13 +1389,13 @@ Invalid Character `[`
(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:19) " getter = "
(552:19-552:26) " Object" --> (286:19-286:26) "(Object"
(552:26-552:51) ".getOwnPropertyDescriptor" --> (286:26-286:51) ".getOwnPropertyDescriptor"
(552:51-552:59) "(config," --> (286:51-286:59) "(config,"
(552:59-552:65) " 'ref'" --> (286:59-286:65) " \"ref\""
(552:65-552:66) ")" --> (286:65-286:67) "))"
(552:66-554:6) ".get;\n\n " --> (286:67-287:0) ".get;"
(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"
@@ -1424,13 +1424,13 @@ Invalid Character `[`
(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:19) " getter = "
(566:19-566:26) " Object" --> (297:19-297:26) "(Object"
(566:26-566:51) ".getOwnPropertyDescriptor" --> (297:26-297:51) ".getOwnPropertyDescriptor"
(566:51-566:59) "(config," --> (297:51-297:59) "(config,"
(566:59-566:65) " 'key'" --> (297:59-297:65) " \"key\""
(566:65-566:66) ")" --> (297:65-297:67) "))"
(566:66-568:6) ".get;\n\n " --> (297:67-298:0) ".get;"
(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"
@@ -1531,20 +1531,20 @@ Invalid Character `[`
(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"
(615:4-615:15) " if (typeof" --> (337:0-337:17) "\n\t\t\t\tif (((typeof"
(615:15-615:22) " config" --> (337:17-337:24) " config"
(615:22-615:30) ".ref ===" --> (337:24-337:32) ".ref ==="
(615:30-615:42) " 'string' &&" --> (337:32-337:44) " \"string\" &&"
(615:42-615:60) " ReactCurrentOwner" --> (337:44-337:62) " ReactCurrentOwner"
(615:60-615:71) ".current &&" --> (337:62-337:74) ".current) &&"
(615:71-615:78) " config" --> (337:74-337:81) " config"
(615:78-615:88) ".__self &&" --> (337:81-337:92) ".__self) &&"
(615:88-615:106) " ReactCurrentOwner" --> (337:92-337:110) " ReactCurrentOwner"
(615:106-615:114) ".current" --> (337:110-337:118) ".current"
(615:114-615:128) ".stateNode !==" --> (337:118-337:132) ".stateNode !=="
(615:128-615:135) " config" --> (337:132-337:139) " config"
(615:135-615:143) ".__self)" --> (337:139-337:147) ".__self)"
(615:143-616:6) " {\n " --> (337:147-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"
@@ -1837,13 +1837,13 @@ Invalid Character `[`
(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;"
(773:40-773:53) " 'function' ?" --> (432:39-432:53) " \"function\" ? "
(773:53-773:58) " type" --> (432:53-432:58) "(type"
(773:58-773:73) ".displayName ||" --> (432:58-432:73) ".displayName ||"
(773:73-773:78) " type" --> (432:73-432:78) " type"
(773:78-773:86) ".name ||" --> (432:78-432:87) ".name) ||"
(773:86-773:98) " 'Unknown' :" --> (432:87-432:99) " \"Unknown\" :"
(773:98-775:6) " type;\n\n " --> (432:99-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) " {"
@@ -2081,14 +2081,14 @@ Invalid Character `[`
(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"
(876:2-876:16) " return typeof" --> (495:0-495:18) "\n\t\t\treturn (typeof"
(876:16-876:27) " object ===" --> (495:18-495:29) " object ==="
(876:27-876:39) " 'object' &&" --> (495:29-495:41) " \"object\" &&"
(876:39-876:50) " object !==" --> (495:41-495:52) " object !=="
(876:50-876:58) " null &&" --> (495:52-495:61) " null) &&"
(876:58-876:65) " object" --> (495:61-495:68) " object"
(876:65-876:78) ".$$typeof ===" --> (495:68-495:81) ".$$typeof ==="
(876:78-877:1) " REACT_ELEMENT_TYPE;\n" --> (495:81-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 ="
@@ -2150,15 +2150,15 @@ Invalid Character `[`
(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) " {"
(923:2-923:13) " if (typeof" --> (516:0-516:15) "\n\t\t\tif ((typeof"
(923:13-923:25) " element ===" --> (516:15-516:27) " element ==="
(923:25-923:37) " 'object' &&" --> (516:27-516:39) " \"object\" &&"
(923:37-923:49) " element !==" --> (516:39-516:51) " element !=="
(923:49-923:57) " null &&" --> (516:51-516:60) " null) &&"
(923:57-923:65) " element" --> (516:60-516:68) " element"
(923:65-923:72) ".key !=" --> (516:68-516:75) ".key !="
(923:72-923:78) " null)" --> (516:75-516:81) " null)"
(923:78-925:4) " {\n // Explicit key\n " --> (516:81-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) "(\"\" +"
@@ -2449,17 +2449,17 @@ Invalid Character `[`
(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:142) " (Object"
(1036:145-1036:150) ".keys" --> (595:142-595:147) ".keys"
(1036:150-1036:159) "(children" --> (595:147-595:156) "(children"
(1036:159-1036:160) ")" --> (595:156-595:158) "))"
(1036:160-1036:165) ".join" --> (595:158-595:163) ".join"
(1036:165-1036:170) "(', '" --> (595:163-595:168) "(\", \""
(1036:170-1036:173) ") +" --> (595:168-595:171) ") +"
(1036:173-1036:179) " '}' :" --> (595:171-595:177) " \"}\" :"
(1036:179-1036:197) " childrenString) +" --> (595:177-595:195) " childrenString) +"
(1036:197-1036:274) " \"). If you meant to render a collection of children, use an array instead.\" " --> (595:195-595:271) " \"). If you meant to render a collection of children, use an array instead.\""
(1036:274-1037:9) ");\n " --> (595:271-596:6) ");\n\t\t\t\t\t"
(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"
@@ -3147,27 +3147,27 @@ Invalid Character `[`
(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) " {"
(1423:2-1423:6) " if " --> (855:0-855:13) "\n\t\t\tif (((((("
(1423:6-1423:15) "(type ===" --> (855:13-855:22) "(type ==="
(1423:15-1423:23) " exports" --> (855:22-855:30) " exports"
(1423:23-1423:35) ".Fragment ||" --> (855:30-855:42) ".Fragment ||"
(1423:35-1423:44) " type ===" --> (855:42-855:51) " type ==="
(1423:44-1423:52) " exports" --> (855:51-855:59) " exports"
(1423:52-1423:64) ".Profiler ||" --> (855:59-855:72) ".Profiler) ||"
(1423:64-1423:73) " type ===" --> (855:72-855:81) " type ==="
(1423:73-1423:106) " REACT_DEBUG_TRACING_MODE_TYPE ||" --> (855:81-855:115) " REACT_DEBUG_TRACING_MODE_TYPE) ||"
(1423:106-1423:115) " type ===" --> (855:115-855:124) " type ==="
(1423:115-1423:123) " exports" --> (855:124-855:132) " exports"
(1423:123-1423:137) ".StrictMode ||" --> (855:132-855:147) ".StrictMode) ||"
(1423:137-1423:146) " type ===" --> (855:147-855:156) " type ==="
(1423:146-1423:154) " exports" --> (855:156-855:164) " exports"
(1423:154-1423:166) ".Suspense ||" --> (855:164-855:177) ".Suspense) ||"
(1423:166-1423:175) " type ===" --> (855:177-855:186) " type ==="
(1423:175-1423:203) " REACT_SUSPENSE_LIST_TYPE ||" --> (855:186-855:215) " REACT_SUSPENSE_LIST_TYPE) ||"
(1423:203-1423:212) " type ===" --> (855:215-855:224) " type ==="
(1423:212-1423:240) " REACT_LEGACY_HIDDEN_TYPE ||" --> (855:224-855:253) " REACT_LEGACY_HIDDEN_TYPE) ||"
(1423:240-1423:257) " enableScopeAPI )" --> (855:253-855:269) " enableScopeAPI)"
(1423:257-1424:4) " {\n " --> (855:269-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}"
@@ -3177,32 +3177,32 @@ Invalid Character `[`
(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) " {"
(1428:4-1428:8) " if " --> (859:0-859:14) "\n\t\t\t\tif (((((("
(1428:8-1428:13) "(type" --> (859:14-859:19) "(type"
(1428:13-1428:26) ".$$typeof ===" --> (859:19-859:32) ".$$typeof ==="
(1428:26-1428:45) " REACT_LAZY_TYPE ||" --> (859:32-859:51) " REACT_LAZY_TYPE ||"
(1428:45-1428:50) " type" --> (859:51-859:56) " type"
(1428:50-1428:63) ".$$typeof ===" --> (859:56-859:69) ".$$typeof ==="
(1428:63-1428:82) " REACT_MEMO_TYPE ||" --> (859:69-859:89) " REACT_MEMO_TYPE) ||"
(1428:82-1428:87) " type" --> (859:89-859:94) " type"
(1428:87-1428:100) ".$$typeof ===" --> (859:94-859:107) ".$$typeof ==="
(1428:100-1428:123) " REACT_PROVIDER_TYPE ||" --> (859:107-859:131) " REACT_PROVIDER_TYPE) ||"
(1428:123-1428:128) " type" --> (859:131-859:136) " type"
(1428:128-1428:141) ".$$typeof ===" --> (859:136-859:149) ".$$typeof ==="
(1428:141-1428:163) " REACT_CONTEXT_TYPE ||" --> (859:149-859:172) " REACT_CONTEXT_TYPE) ||"
(1428:163-1428:168) " type" --> (859:172-859:177) " type"
(1428:168-1428:181) ".$$typeof ===" --> (859:177-859:190) ".$$typeof ==="
(1428:181-1428:207) " REACT_FORWARD_REF_TYPE ||" --> (859:190-859:217) " REACT_FORWARD_REF_TYPE) ||"
(1428:207-1428:212) " type" --> (859:217-859:222) " type"
(1428:212-1428:225) ".$$typeof ===" --> (859:222-859:235) ".$$typeof ==="
(1428:225-1428:251) " REACT_FUNDAMENTAL_TYPE ||" --> (859:235-859:262) " REACT_FUNDAMENTAL_TYPE) ||"
(1428:251-1428:256) " type" --> (859:262-859:267) " type"
(1428:256-1428:269) ".$$typeof ===" --> (859:267-859:280) ".$$typeof ==="
(1428:269-1428:289) " REACT_BLOCK_TYPE ||" --> (859:280-859:301) " REACT_BLOCK_TYPE) ||"
(1428:289-1428:294) " type" --> (859:301-859:306) " type"
(1428:294-1428:301) "[0] ===" --> (859:306-859:313) "[0] ==="
(1428:301-1428:326) " REACT_SERVER_BLOCK_TYPE)" --> (859:313-859:338) " REACT_SERVER_BLOCK_TYPE)"
(1428:326-1429:6) " {\n " --> (859:338-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"
@@ -3742,13 +3742,13 @@ Invalid Character `[`
(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:21) " (x"
(1647:22-1647:28) ".stack" --> (1029:21-1029:27) ".stack"
(1647:28-1647:34) ".trim(" --> (1029:27-1029:33) ".trim("
(1647:34-1647:35) ")" --> (1029:33-1029:35) "))"
(1647:35-1647:41) ".match" --> (1029:35-1029:41) ".match"
(1647:41-1647:56) "(/\\n( *(at )?)/" --> (1029:41-1029:56) "(/\\n( *(at )?)/"
(1647:56-1648:8) ");\n " --> (1029:56-1030:0) ");"
(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"
@@ -3921,13 +3921,13 @@ Invalid Character `[`
(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"
(1740:4-1740:8) " if " --> (1094:0-1094:9) "\n\t\t\t\tif ("
(1740:8-1740:18) "(sample &&" --> (1094:9-1094:19) "(sample &&"
(1740:18-1740:36) " control && typeof" --> (1094:19-1094:38) " control) && typeof"
(1740:36-1740:43) " sample" --> (1094:38-1094:45) " sample"
(1740:43-1740:53) ".stack ===" --> (1094:45-1094:55) ".stack ==="
(1740:53-1740:63) " 'string')" --> (1094:55-1094:65) " \"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:65-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"
@@ -3952,16 +3952,16 @@ Invalid Character `[`
(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) " {"
(1748:6-1748:13) " while " --> (1099:0-1099:13) "\n\t\t\t\t\twhile ("
(1748:13-1748:18) "(s >=" --> (1099:13-1099:18) "(s >="
(1748:18-1748:23) " 1 &&" --> (1099:18-1099:23) " 1 &&"
(1748:23-1748:28) " c >=" --> (1099:23-1099:28) " c >="
(1748:28-1748:33) " 0 &&" --> (1099:28-1099:34) " 0) &&"
(1748:33-1748:45) " sampleLines" --> (1099:34-1099:46) " sampleLines"
(1748:45-1748:52) "[s] !==" --> (1099:46-1099:53) "[s] !=="
(1748:52-1748:65) " controlLines" --> (1099:53-1099:66) " controlLines"
(1748:65-1748:69) "[c])" --> (1099:66-1099:70) "[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:70-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 (;"
@@ -4552,16 +4552,16 @@ Invalid Character `[`
(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) " {"
(2026:2-2026:7) " if (" --> (1277:0-1277:9) "\n\t\t\tif (("
(2026:7-2026:15) "!element" --> (1277:9-1277:17) "!element"
(2026:15-2026:25) "._store ||" --> (1277:17-1277:27) "._store ||"
(2026:25-2026:33) " element" --> (1277:27-1277:35) " element"
(2026:33-2026:40) "._store" --> (1277:35-1277:42) "._store"
(2026:40-2026:53) ".validated ||" --> (1277:42-1277:56) ".validated) ||"
(2026:53-2026:61) " element" --> (1277:56-1277:64) " element"
(2026:61-2026:68) ".key !=" --> (1277:64-1277:71) ".key !="
(2026:68-2026:74) " null)" --> (1277:71-1277:77) " null)"
(2026:74-2027:4) " {\n " --> (1277:77-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"
@@ -4585,15 +4585,15 @@ Invalid Character `[`
(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) " {"
(2043:2-2043:6) " if " --> (1287:0-1287:8) "\n\t\t\tif ("
(2043:6-2043:17) "(element &&" --> (1287:8-1287:19) "(element &&"
(2043:17-2043:25) " element" --> (1287:19-1287:27) " element"
(2043:25-2043:35) "._owner &&" --> (1287:27-1287:38) "._owner) &&"
(2043:35-2043:43) " element" --> (1287:38-1287:46) " element"
(2043:43-2043:54) "._owner !==" --> (1287:46-1287:57) "._owner !=="
(2043:54-2043:72) " ReactCurrentOwner" --> (1287:57-1287:75) " ReactCurrentOwner"
(2043:72-2043:81) ".current)" --> (1287:75-1287:84) ".current)"
(2043:81-2045:4) " {\n // Give the component that originally created this child.\n " --> (1287:84-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"
@@ -4731,14 +4731,14 @@ Invalid Character `[`
(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) " {"
(2116:4-2116:8) " if " --> (1329:0-1329:9) "\n\t\t\t\tif ("
(2116:8-2116:17) "(type ===" --> (1329:9-1329:18) "(type ==="
(2116:17-2116:25) " null ||" --> (1329:18-1329:26) " null ||"
(2116:25-2116:34) " type ===" --> (1329:26-1329:35) " type ==="
(2116:34-2116:54) " undefined || typeof" --> (1329:35-1329:56) " undefined) || typeof"
(2116:54-2116:63) " type ===" --> (1329:56-1329:65) " type ==="
(2116:63-2116:73) " 'string')" --> (1329:65-1329:75) " \"string\")"
(2116:73-2117:6) " {\n " --> (1329:75-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"
@@ -4898,15 +4898,15 @@ Invalid Character `[`
(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:76) " null && "
(2188:75-2188:82) " Object" --> (1376:76-1376:83) "(Object"
(2188:82-2188:87) ".keys" --> (1376:83-1376:88) ".keys"
(2188:87-2188:92) "(type" --> (1376:88-1376:93) "(type"
(2188:92-2188:93) ")" --> (1376:93-1376:95) "))"
(2188:17-2188:37) " undefined || typeof" --> (1376:17-1376:38) " undefined || (typeof"
(2188:37-2188:46) " type ===" --> (1376:38-1376:47) " type ==="
(2188:46-2188:58) " 'object' &&" --> (1376:47-1376:59) " \"object\" &&"
(2188:58-2188:67) " type !==" --> (1376:59-1376:68) " type !=="
(2188:67-2188:75) " null &&" --> (1376:68-1376:77) " null) &&"
(2188:75-2188:82) " Object" --> (1376:77-1376:84) " Object"
(2188:82-2188:87) ".keys" --> (1376:84-1376:89) ".keys"
(2188:87-2188:92) "(type" --> (1376:89-1376:94) "(type"
(2188:92-2188:93) ")" --> (1376:94-1376:95) ")"
(2188:93-2188:104) ".length ===" --> (1376:95-1376:106) ".length ==="
(2188:104-2188:107) " 0)" --> (1376:106-1376:109) " 0)"
(2188:107-2189:6) " {\n " --> (1376:109-1377:0) " {"
+11 -11
View File
@@ -1,26 +1,26 @@
Original | Minified | esbuild | Gzip | esbuild
72.14 kB | 24.33 kB | 23.70 kB | 8.72 kB | 8.54 kB | react.development.js
72.14 kB | 24.37 kB | 23.70 kB | 8.75 kB | 8.54 kB | react.development.js
173.90 kB | 62.11 kB | 59.82 kB | 19.66 kB | 19.33 kB | moment.js
173.90 kB | 61.92 kB | 59.82 kB | 19.63 kB | 19.33 kB | moment.js
287.63 kB | 93.15 kB | 90.07 kB | 32.46 kB | 31.95 kB | jquery.js
287.63 kB | 93.16 kB | 90.07 kB | 32.49 kB | 31.95 kB | jquery.js
342.15 kB | 123.07 kB | 118.14 kB | 45.15 kB | 44.37 kB | vue.js
342.15 kB | 123.22 kB | 118.14 kB | 45.26 kB | 44.37 kB | vue.js
544.10 kB | 74.78 kB | 72.48 kB | 26.28 kB | 26.20 kB | lodash.js
544.10 kB | 74.95 kB | 72.48 kB | 26.39 kB | 26.20 kB | lodash.js
555.77 kB | 275.81 kB | 270.13 kB | 91.78 kB | 90.80 kB | d3.js
555.77 kB | 275.03 kB | 270.13 kB | 91.56 kB | 90.80 kB | d3.js
1.01 MB | 472.11 kB | 458.89 kB | 127.75 kB | 126.71 kB | bundle.min.js
1.01 MB | 472.78 kB | 458.89 kB | 128.17 kB | 126.71 kB | bundle.min.js
1.25 MB | 674.52 kB | 646.76 kB | 167.14 kB | 163.73 kB | three.js
1.25 MB | 674.16 kB | 646.76 kB | 167.01 kB | 163.73 kB | three.js
2.14 MB | 744.72 kB | 724.14 kB | 182.44 kB | 181.07 kB | victory.js
2.14 MB | 743.99 kB | 724.14 kB | 182.43 kB | 181.07 kB | victory.js
3.20 MB | 1.03 MB | 1.01 MB | 333.51 kB | 331.56 kB | echarts.js
6.69 MB | 2.42 MB | 2.31 MB | 504.02 kB | 488.28 kB | antd.js
6.69 MB | 2.42 MB | 2.31 MB | 504.07 kB | 488.28 kB | antd.js
10.95 MB | 3.57 MB | 3.49 MB | 913.80 kB | 915.50 kB | typescript.js
10.95 MB | 3.57 MB | 3.49 MB | 916.72 kB | 915.50 kB | typescript.js