Unverified Commit 538f3f68 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Bump swc to v77 (#97407)

There have been breaking changes to the AST:
- `BlockStmtOrExpr` is now `ArrowFunctionBody`
- function bodies are `FunctionBody` instead of `BlockStmt`
- JSX text literals are `Wtf8Atom`, instead of `Atom`
parent ec847d82
This diff is collapsed.
......@@ -210,29 +210,29 @@ turbopack-trace-server = { path = "turbopack/crates/turbopack-trace-server" }
turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
turbopack-wasm = { path = "turbopack/crates/turbopack-wasm" }
swc_ecma_react_compiler = "23.0.0"
swc_ecma_react_compiler = "24.0.0"
react_compiler = { version = "0.2", package = "forked_react_compiler" }
# SWC crates
swc_core = { version = "76.0.0", default-features = false, features = [
swc_core = { version = "77.1.2", default-features = false, features = [
"ecma_loader_lru",
"ecma_loader_parking_lot",
"parallel_rayon",
] }
swc_plugin_backend_wasmtime = "15.0.0"
testing = "26.0.0"
swc_plugin_backend_wasmtime = "16.0.0"
testing = "27.0.0"
# Keep consistent with preset_env_base through swc_core
browserslist-rs = "0.20.0"
mdxjs = "1.0.4"
modularize_imports = "16.0.0"
styled_components = "16.0.0"
styled_jsx = "16.0.0"
swc_emotion = "16.0.0"
swc_relay = "16.0.0"
react_remove_properties = "16.0.0"
remove_console = "16.0.0"
modularize_imports = "17.0.0"
styled_components = "17.0.0"
styled_jsx = "17.0.0"
swc_emotion = "17.0.0"
swc_relay = "17.0.0"
react_remove_properties = "17.0.0"
remove_console = "17.0.0"
preset_env_base = "9.0.0"
......
......@@ -9,10 +9,10 @@ use swc_core::{
common::{DUMMY_SP, FileName, Span, errors::HANDLER},
ecma::{
ast::{
ArrayLit, ArrowExpr, BinExpr, BlockStmt, BlockStmtOrExpr, Bool, CallExpr, Callee, Expr,
ExprOrSpread, ExprStmt, Id, Ident, IdentName, ImportDecl, ImportNamedSpecifier,
ImportSpecifier, KeyValueProp, Lit, ModuleDecl, ModuleItem, ObjectLit, Pass, Prop,
PropName, PropOrSpread, Stmt, Str, Tpl, UnaryExpr, UnaryOp, op,
ArrayLit, ArrowExpr, ArrowFunctionBody, BinExpr, Bool, CallExpr, Callee, Expr,
ExprOrSpread, ExprStmt, FunctionBody, Id, Ident, IdentName, ImportDecl,
ImportNamedSpecifier, ImportSpecifier, KeyValueProp, Lit, ModuleDecl, ModuleItem,
ObjectLit, Pass, Prop, PropName, PropOrSpread, Stmt, Str, Tpl, UnaryExpr, UnaryOp, op,
},
utils::{ExprFactory, private_ident, prop_name_eq, quote_ident},
visit::{VisitMut, VisitMutWith, visit_mut_pass},
......@@ -328,7 +328,7 @@ impl VisitMut for NextDynamicPatcher {
let side_effect_free_loader_arg = Expr::Arrow(ArrowExpr {
span: DUMMY_SP,
params: vec![],
body: Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt {
body: Box::new(ArrowFunctionBody::FunctionBody(FunctionBody {
span: DUMMY_SP,
stmts: vec![Stmt::Expr(ExprStmt {
span: DUMMY_SP,
......@@ -336,7 +336,6 @@ impl VisitMut for NextDynamicPatcher {
&require_resolve_weak_expr,
)),
})],
..Default::default()
})),
is_async: true,
is_generator: false,
......@@ -360,10 +359,9 @@ impl VisitMut for NextDynamicPatcher {
let side_effect_free_loader_arg = Expr::Arrow(ArrowExpr {
span: DUMMY_SP,
params: vec![],
body: Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt {
body: Box::new(ArrowFunctionBody::FunctionBody(FunctionBody {
span: DUMMY_SP,
stmts: vec![],
..Default::default()
})),
is_async: true,
is_generator: false,
......@@ -447,7 +445,7 @@ fn webpack_options(module_id: Expr) -> Vec<PropOrSpread> {
key: PropName::Ident(IdentName::new(atom!("webpack"), DUMMY_SP)),
value: Box::new(Expr::Arrow(ArrowExpr {
params: vec![],
body: Box::new(BlockStmtOrExpr::Expr(Box::new(Expr::Array(ArrayLit {
body: Box::new(ArrowFunctionBody::Expr(Box::new(Expr::Array(ArrayLit {
elems: vec![Some(ExprOrSpread {
expr: Box::new(module_id),
spread: None,
......
......@@ -89,7 +89,7 @@ impl Visit for ReturnCollector {
// an empty result can only have come from it. With other returns present we
// can't tell which produced the empty result, so this returns None and the
// caller falls back to the declaration.
fn find_error_anchor_in_body(body: &BlockStmt) -> Option<Span> {
fn find_error_anchor_in_body(body: &FunctionBody) -> Option<Span> {
let mut returns = ReturnCollector::default();
body.visit_with(&mut returns);
if returns.count == 1 {
......@@ -104,8 +104,8 @@ fn find_error_anchor_in_body(body: &BlockStmt) -> Option<Span> {
fn find_error_anchor_in_initializer(initializer: &Expr) -> Option<Span> {
match initializer {
Expr::Arrow(arrow) => match &*arrow.body {
BlockStmtOrExpr::BlockStmt(body) => find_error_anchor_in_body(body),
BlockStmtOrExpr::Expr(expr) => match &**expr {
ArrowFunctionBody::FunctionBody(body) => find_error_anchor_in_body(body),
ArrowFunctionBody::Expr(expr) => match &**expr {
Expr::Array(array) if array.elems.is_empty() => Some(array.span()),
_ => None,
},
......
......@@ -202,9 +202,9 @@ impl Fold for OptimizeServerReact {
Some(
Expr::Arrow(ArrowExpr {
span: DUMMY_SP,
body: Box::new(BlockStmtOrExpr::Expr(Box::new(Expr::Lit(
Lit::Null(Null { span: DUMMY_SP }),
)))),
body: Box::new(ArrowFunctionBody::Expr(Box::new(
Expr::Lit(Lit::Null(Null { span: DUMMY_SP })),
))),
is_async: false,
is_generator: false,
params: vec![],
......
......@@ -414,7 +414,7 @@ impl<C: Comments> ServerActions<C> {
// and remove any server function directive.
fn get_directive_for_function(
&mut self,
maybe_body: Option<&mut BlockStmt>,
maybe_body: Option<&mut FunctionBody>,
) -> Option<Directive> {
let mut directive: Option<Directive> = None;
......@@ -520,14 +520,14 @@ impl<C: Comments> ServerActions<C> {
.swap_remove(&arrow_ident.to_id());
}
if let BlockStmtOrExpr::BlockStmt(block) = &mut *arrow.body {
if let ArrowFunctionBody::FunctionBody(block) = &mut *arrow.body {
block.visit_mut_with(&mut ClosureReplacer {
used_ids: &ids_from_closure,
private_ctxt: self.private_ctxt,
});
}
let mut new_body: BlockStmtOrExpr = *arrow.body.clone();
let mut new_body: ArrowFunctionBody = *arrow.body.clone();
if !ids_from_closure.is_empty() {
// Prepend the decryption declaration to the body.
......@@ -555,11 +555,11 @@ impl<C: Comments> ServerActions<C> {
};
match &mut new_body {
BlockStmtOrExpr::BlockStmt(body) => {
ArrowFunctionBody::FunctionBody(body) => {
body.stmts.insert(0, decryption_decl.into());
}
BlockStmtOrExpr::Expr(body_expr) => {
new_body = BlockStmtOrExpr::BlockStmt(BlockStmt {
ArrowFunctionBody::Expr(body_expr) => {
new_body = ArrowFunctionBody::FunctionBody(FunctionBody {
span: DUMMY_SP,
stmts: vec![
decryption_decl.into(),
......@@ -568,7 +568,6 @@ impl<C: Comments> ServerActions<C> {
arg: Some(body_expr.take()),
}),
],
..Default::default()
});
}
}
......@@ -591,14 +590,13 @@ impl<C: Comments> ServerActions<C> {
function: Box::new(Function {
params: new_params,
body: match new_body {
BlockStmtOrExpr::BlockStmt(body) => Some(body),
BlockStmtOrExpr::Expr(expr) => Some(BlockStmt {
ArrowFunctionBody::FunctionBody(body) => Some(body),
ArrowFunctionBody::Expr(expr) => Some(FunctionBody {
span: DUMMY_SP,
stmts: vec![Stmt::Return(ReturnStmt {
span: DUMMY_SP,
arg: Some(expr),
})],
..Default::default()
}),
},
is_async: true,
......@@ -691,7 +689,7 @@ impl<C: Comments> ServerActions<C> {
private_ctxt: self.private_ctxt,
});
let mut new_body: Option<BlockStmt> = function.body.clone();
let mut new_body: Option<FunctionBody> = function.body.clone();
if !ids_from_closure.is_empty() {
// Prepend the decryption declaration to the body.
......@@ -720,10 +718,9 @@ impl<C: Comments> ServerActions<C> {
if let Some(body) = &mut new_body {
body.stmts.insert(0, decryption_decl.into());
} else {
new_body = Some(BlockStmt {
new_body = Some(FunctionBody {
span: DUMMY_SP,
stmts: vec![decryption_decl.into()],
..Default::default()
});
}
}
......@@ -828,7 +825,7 @@ impl<C: Comments> ServerActions<C> {
.swap_remove(&arrow_ident.to_id());
}
if let BlockStmtOrExpr::BlockStmt(block) = &mut *arrow.body {
if let ArrowFunctionBody::FunctionBody(block) = &mut *arrow.body {
block.visit_mut_with(&mut ClosureReplacer {
used_ids: &ids_from_closure,
private_ctxt: self.private_ctxt,
......@@ -836,8 +833,8 @@ impl<C: Comments> ServerActions<C> {
}
let inner_fn_body = match *arrow.body.take() {
BlockStmtOrExpr::BlockStmt(body) => Some(body),
BlockStmtOrExpr::Expr(expr) => Some(BlockStmt {
ArrowFunctionBody::FunctionBody(body) => Some(body),
ArrowFunctionBody::Expr(expr) => Some(FunctionBody {
stmts: vec![Stmt::Return(ReturnStmt {
span: DUMMY_SP,
arg: Some(expr),
......@@ -1414,7 +1411,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
// Arrow expressions need to be visited in prepass to determine if it's
// an action function or not.
let directive = self.get_directive_for_function(
if let BlockStmtOrExpr::BlockStmt(block) = &mut *a.body {
if let ArrowFunctionBody::FunctionBody(block) = &mut *a.body {
Some(block)
} else {
None
......@@ -3046,7 +3043,7 @@ fn create_cache_wrapper(
let wrapper_fn_expr = Box::new(Expr::Fn(FnExpr {
ident: fn_ident,
function: Box::new(Function {
body: Some(BlockStmt {
body: Some(FunctionBody {
stmts: vec![Stmt::Return(ReturnStmt {
span: DUMMY_SP,
arg: Some(Box::new(Expr::Call(cache_call))),
......@@ -3073,7 +3070,7 @@ fn create_and_hoist_cache_function(
cache_name: Atom,
fn_ident: Option<Ident>,
params: Vec<Param>,
body: Option<BlockStmt>,
body: Option<FunctionBody>,
original_span: Span,
hoisted_extra_items: &mut Vec<ModuleItem>,
unresolved_ctxt: SyntaxContext,
......@@ -3293,7 +3290,7 @@ fn detect_similar_strings(a: &str, b: &str) -> bool {
// without mutating the function body or erroring out.
// This is used to quickly determine if we need to use the module-level
// directives for this function or not.
fn has_body_directive(maybe_body: &Option<BlockStmt>) -> (bool, bool) {
fn has_body_directive(maybe_body: &Option<FunctionBody>) -> (bool, bool) {
let mut is_action_fn = false;
let mut is_cache_fn = false;
......
......@@ -3,7 +3,7 @@ export function removeFunction() {
console.log(shouldBeRemoved)
}
let shouldBeKept = 'should be kept'
let usedByShouldBeKept = 'should be kept'
export default function shouldBeKept() {
console.log(shouldBeKept)
console.log(usedByShouldBeKept)
}
let shouldBeKept = 'should be kept';
let usedByShouldBeKept = 'should be kept';
export default function shouldBeKept() {
console.log(shouldBeKept);
console.log(usedByShouldBeKept);
}
This diff is collapsed.
# build using
# RUSTFLAGS= cargo build --target wasm32-wasip1 --release && cp target/wasm32-wasip1/release/swc_plugin_env_check.wasm ../
[package]
name = "swc-plugin-env-check"
version = "0.1.0"
......@@ -15,4 +18,6 @@ opt-level = "z"
[dependencies]
serde = "1.0.173"
serde_json = "1.0.103"
swc_core = { version = "63.1.1", features = ["ecma_plugin_transform"] }
swc_core = { version = "77", features = ["ecma_plugin_transform"] }
[workspace]
[toolchain]
channel = "stable"
profile = "minimal"
targets = ["wasm32-wasip1"]
......@@ -6,7 +6,7 @@ describe('swcPlugins', () => {
files: __dirname,
skipDeployment: true,
dependencies: {
'@swc/plugin-react-remove-properties': '11.1.0',
'@swc/plugin-react-remove-properties': '13.0.0',
},
})
if (skipped) return
......
......@@ -1123,7 +1123,7 @@ impl<'a> Analyzer<'a, '_> {
arrow_expr,
ArrowExprField::Body,
));
self.visit_block_stmt_or_expr(body, &mut ast_path);
self.visit_arrow_function_body(body, &mut ast_path);
}
{
......@@ -1157,8 +1157,9 @@ impl<'a> Analyzer<'a, '_> {
is_generator: _,
params,
return_type,
span: _,
type_params,
this_param: _,
span: _,
ctxt: _,
} = function;
for (i, param) in params.iter().enumerate() {
......@@ -1180,7 +1181,7 @@ impl<'a> Analyzer<'a, '_> {
let mut ast_path =
ast_path.with_guard(AstParentNodeRef::Function(function, FunctionField::Body));
self.visit_opt_block_stmt(body, &mut ast_path);
self.visit_opt_function_body(body, &mut ast_path);
}
{
......@@ -1259,27 +1260,29 @@ impl<'a> Analyzer<'a, '_> {
Some(path)
}
Expr::Arrow(ArrowExpr {
body: BlockStmtOrExpr::BlockStmt(_),
body: ArrowFunctionBody::FunctionBody(_),
..
}) => {
let mut path = as_parent_path(&ast_path);
path.push(AstParentKind::ExprOrSpread(ExprOrSpreadField::Expr));
path.push(AstParentKind::Expr(ExprField::Arrow));
path.push(AstParentKind::ArrowExpr(ArrowExprField::Body));
path.push(AstParentKind::BlockStmtOrExpr(
BlockStmtOrExprField::BlockStmt,
path.push(AstParentKind::ArrowFunctionBody(
ArrowFunctionBodyField::FunctionBody,
));
Some(path)
}
Expr::Arrow(ArrowExpr {
body: BlockStmtOrExpr::Expr(_),
body: ArrowFunctionBody::Expr(_),
..
}) => {
let mut path = as_parent_path(&ast_path);
path.push(AstParentKind::ExprOrSpread(ExprOrSpreadField::Expr));
path.push(AstParentKind::Expr(ExprField::Arrow));
path.push(AstParentKind::ArrowExpr(ArrowExprField::Body));
path.push(AstParentKind::BlockStmtOrExpr(BlockStmtOrExprField::Expr));
path.push(AstParentKind::ArrowFunctionBody(
ArrowFunctionBodyField::Expr,
));
Some(path)
}
_ => None,
......@@ -1932,7 +1935,7 @@ impl VisitAstPath for Analyzer<'_, '_> {
ast_path.with_guard(AstParentNodeRef::ArrowExpr(expr, ArrowExprField::Body));
expr.body.visit_with_ast_path(this, &mut ast_path);
// If body is a single expression treat it as a Block with an return statement
if let BlockStmtOrExpr::Expr(inner_expr) = &*expr.body {
if let ArrowFunctionBody::Expr(inner_expr) = &*expr.body {
let implicit_return_value = this.eval_context.eval(this.arena, inner_expr);
this.add_return_value(implicit_return_value);
}
......@@ -2691,32 +2694,37 @@ impl VisitAstPath for Analyzer<'_, '_> {
self.effects.extend(self.arena, take(&mut effects));
}
fn visit_function_body<'ast: 'r, 'r>(
&mut self,
n: &'ast FunctionBody,
ast_path: &mut swc_core::ecma::visit::AstNodePath<'r>,
) {
let mut effects = take(&mut self.effects);
let hoisted_effects = take(&mut self.hoisted_effects);
let (_, returns_unconditionally) = self.enter_block(LexicalContext::Block, |this| {
n.visit_children_with_ast_path(this, ast_path);
});
// By handling this logic here instead of in enter_fn, we naturally skip it
// for arrow functions with single expression bodies, since they just don't hit this
// path.
if !returns_unconditionally {
self.add_return_value(JsValue::Constant(ConstantValue::Undefined));
}
self.effects
.extend(self.arena, take(&mut self.hoisted_effects));
effects.extend(self.arena, take(&mut self.effects));
self.hoisted_effects = hoisted_effects;
self.effects = effects;
}
fn visit_block_stmt<'ast: 'r, 'r>(
&mut self,
n: &'ast BlockStmt,
ast_path: &mut swc_core::ecma::visit::AstNodePath<'r>,
) {
match self.cur_lexical_context() {
LexicalContext::Function { .. } => {
let mut effects = take(&mut self.effects);
let hoisted_effects = take(&mut self.hoisted_effects);
let (_, returns_unconditionally) =
self.enter_block(LexicalContext::Block, |this| {
n.visit_children_with_ast_path(this, ast_path);
});
// By handling this logic here instead of in enter_fn, we naturally skip it
// for arrow functions with single expression bodies, since they just don't hit this
// path.
if !returns_unconditionally {
self.add_return_value(JsValue::Constant(ConstantValue::Undefined));
}
self.effects
.extend(self.arena, take(&mut self.hoisted_effects));
effects.extend(self.arena, take(&mut self.effects));
self.hoisted_effects = hoisted_effects;
self.effects = effects;
}
LexicalContext::Function { .. } => unreachable!("function bodies use FunctionBody"),
LexicalContext::ControlFlow { .. } => {
self.with_block(LexicalContext::Block, |this| {
n.visit_children_with_ast_path(this, ast_path)
......
......@@ -270,7 +270,10 @@ impl From<Lit> for ConstantValue {
Lit::Num(v) => ConstantValue::Num(ConstantNumber(v.value)),
Lit::BigInt(v) => ConstantValue::BigInt(v.value),
Lit::Regex(v) => ConstantValue::Regex(Box::new((v.exp, v.flags))),
Lit::JSXText(v) => ConstantValue::Str(ConstantString::Atom(v.value)),
Lit::JSXText(v) => {
// TODO
ConstantValue::Str(ConstantString::Atom(v.value.to_atom_lossy().into_owned()))
}
}
}
}
......
......@@ -4,8 +4,8 @@ use swc_core::{
base::SwcComments,
ecma::{
ast::{
BlockStmt, CallExpr, Expr, Lit, MemberExpr, ModuleDecl, ModuleItem, Pat, Program, Prop,
SimpleAssignTarget, Stmt, Str, SwitchCase,
BlockStmt, CallExpr, Expr, FunctionBody, Lit, MemberExpr, ModuleDecl, ModuleItem, Pat,
Program, Prop, SimpleAssignTarget, Stmt, Str, SwitchCase,
},
visit::AstParentKind,
},
......@@ -144,6 +144,7 @@ pub trait AstModifier: Send + Sync {
method!(visit_mut_lit, Lit);
method!(visit_mut_str, Str);
method!(visit_mut_block_stmt, BlockStmt);
method!(visit_mut_function_body, FunctionBody);
method!(visit_mut_switch_case, SwitchCase);
method!(visit_mut_program, Program);
}
......@@ -174,6 +175,7 @@ impl_modify!(visit_mut_call_expr, CallExpr);
impl_modify!(visit_mut_lit, Lit);
impl_modify!(visit_mut_str, Str);
impl_modify!(visit_mut_block_stmt, BlockStmt);
impl_modify!(visit_mut_function_body, FunctionBody);
impl_modify!(visit_mut_switch_case, SwitchCase);
impl_modify!(visit_mut_program, Program);
......
......@@ -153,6 +153,7 @@ impl VisitMutAstPath for ApplyVisitors<'_, '_> {
method!(visit_mut_lit, Lit);
method!(visit_mut_str, Str);
method!(visit_mut_block_stmt, BlockStmt);
method!(visit_mut_function_body, FunctionBody);
method!(visit_mut_switch_case, SwitchCase);
}
......
......@@ -5,7 +5,7 @@ use bincode::{Decode, Encode};
use swc_core::{
common::{DUMMY_SP, SyntaxContext},
ecma::ast::{
ArrowExpr, BlockStmt, BlockStmtOrExpr, CallExpr, Callee, Expr, ExprOrSpread, ExprStmt,
ArrowExpr, ArrowFunctionBody, CallExpr, Callee, Expr, ExprOrSpread, ExprStmt, FunctionBody,
Ident, Stmt,
},
quote,
......@@ -244,10 +244,9 @@ impl ModuleHotReferenceCodeGen {
*call_expr.args[1].expr = Expr::Arrow(ArrowExpr {
span: DUMMY_SP,
params: vec![],
body: Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt {
body: Box::new(ArrowFunctionBody::FunctionBody(FunctionBody {
span: DUMMY_SP,
stmts: wrapper_stmts,
..Default::default()
})),
..Default::default()
});
......@@ -258,10 +257,9 @@ impl ModuleHotReferenceCodeGen {
expr: Box::new(Expr::Arrow(ArrowExpr {
span: DUMMY_SP,
params: vec![],
body: Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt {
body: Box::new(ArrowFunctionBody::FunctionBody(FunctionBody {
span: DUMMY_SP,
stmts: wrapper_stmts,
..Default::default()
})),
..Default::default()
})),
......
......@@ -13,12 +13,13 @@ use swc_core::{
ecma::{
ast::{
ArrayPat, ArrowExpr, AssignPat, AssignPatProp, BindingIdent, BlockStmt, ClassDecl,
Decl, EmptyStmt, Expr, FnDecl, Ident, KeyValuePatProp, Lit, ObjectPat, ObjectPatProp,
Pat, RestPat, Stmt, Str, SwitchCase, VarDecl, VarDeclKind, VarDeclarator,
Decl, EmptyStmt, Expr, FnDecl, FunctionBody, Ident, KeyValuePatProp, Lit, ObjectPat,
ObjectPatProp, Pat, RestPat, Stmt, Str, SwitchCase, VarDecl, VarDeclKind,
VarDeclarator,
},
visit::{
AstParentKind, VisitMut, VisitMutWith,
fields::{BlockStmtField, SwitchCaseField},
fields::{BlockStmtField, FunctionBodyField, SwitchCaseField},
},
},
quote,
......@@ -101,6 +102,10 @@ impl AstModifier for UnreachableRangeModifier {
self.replace(&mut block.stmts, self.start_index);
}
fn visit_mut_function_body(&self, body: &mut FunctionBody) {
self.replace(&mut body.stmts, self.start_index);
}
fn visit_mut_switch_case(&self, case: &mut SwitchCase) {
self.replace(&mut case.cons, self.start_index);
}
......@@ -182,6 +187,18 @@ impl RemovalCodeGen {
start_index,
}) as Box<dyn AstModifier>,
)]
} else if let &AstParentKind::FunctionBody(FunctionBodyField::Stmts(
start_index,
)) = last
{
vec![(
parent.to_vec(),
Box::new(UnreachableRangeModifier {
comment_replacement: comment_replacement.clone(),
comments: comments.clone(),
start_index,
}) as Box<dyn AstModifier>,
)]
} else if let &AstParentKind::SwitchCase(SwitchCaseField::Cons(start_index)) =
last
{
......
......@@ -9,7 +9,7 @@ use swc_core::{
common::{Mark, SourceMap, comments::Comments},
ecma::{
ast::{
ArrowExpr, BlockStmtOrExpr, Expr, ExprStmt, Function, Lit, ModuleItem, Pass, Program,
ArrowExpr, ArrowFunctionBody, Expr, ExprStmt, Function, Lit, ModuleItem, Pass, Program,
Stmt,
},
preset_env::{self, Feature, FeatureOrModule, Targets},
......@@ -488,7 +488,7 @@ impl Visit for ReactCompilerAnnotationFinder {
if self.found {
return;
}
if let BlockStmtOrExpr::BlockStmt(body) = &*node.body
if let ArrowFunctionBody::FunctionBody(body) = &*node.body
&& has_react_compiler_opt_in_directive(&body.stmts)
{
self.found = true;
......
......@@ -69,7 +69,7 @@ fn get_fn_body(expr: &Expr) -> Option<&Vec<Stmt>> {
return Some(&body.stmts);
}
if let Some(ArrowExpr { body, .. }) = expr.as_arrow()
&& let Some(block) = body.as_block_stmt()
&& let Some(block) = body.as_function_body()
{
return Some(&block.stmts);
}
......
......@@ -28,7 +28,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -95,7 +95,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -147,7 +147,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -386,7 +386,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -635,7 +635,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -706,7 +706,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -802,7 +802,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -865,7 +865,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -988,7 +988,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1037,7 +1037,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1111,7 +1111,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1152,7 +1152,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -29,10 +29,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -72,10 +72,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -118,7 +118,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -161,7 +161,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -193,7 +193,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -218,10 +218,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -253,7 +253,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
3,
),
......@@ -278,10 +278,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -313,7 +313,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
4,
),
......@@ -341,7 +341,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -373,7 +373,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
5,
),
......@@ -401,7 +401,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -24,7 +24,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -82,7 +82,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -150,7 +150,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -192,7 +192,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -234,7 +234,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -279,7 +279,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -331,7 +331,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -409,7 +409,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -476,7 +476,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -544,7 +544,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -586,7 +586,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -628,7 +628,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......
......@@ -846,7 +846,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -888,7 +888,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -932,7 +932,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -974,7 +974,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1018,7 +1018,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1070,7 +1070,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1121,7 +1121,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1175,7 +1175,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1226,7 +1226,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1271,7 +1271,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1316,7 +1316,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -58,7 +58,7 @@
Constructor(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -86,10 +86,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -171,7 +171,7 @@
Constructor(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -199,10 +199,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -255,7 +255,7 @@
Constructor(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -283,8 +283,8 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
],
),
......@@ -323,7 +323,7 @@
Constructor(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -1071,7 +1071,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1121,7 +1121,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1162,7 +1162,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1198,7 +1198,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1248,7 +1248,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -1296,7 +1296,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......
......@@ -105,10 +105,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -211,7 +211,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -241,7 +241,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -287,7 +287,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -344,7 +344,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
4,
),
......@@ -423,7 +423,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -482,7 +482,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -548,7 +548,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -657,7 +657,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -715,7 +715,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
3,
),
......
......@@ -79,7 +79,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......
......@@ -79,7 +79,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -49,7 +49,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -127,7 +127,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -230,7 +230,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -313,7 +313,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -388,7 +388,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -477,7 +477,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -558,7 +558,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -654,7 +654,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -741,7 +741,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -826,7 +826,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -957,7 +957,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1042,7 +1042,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1134,7 +1134,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1232,7 +1232,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1325,7 +1325,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1416,7 +1416,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1519,7 +1519,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1707,7 +1707,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1786,7 +1786,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......
......@@ -91,10 +91,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -165,10 +165,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -219,10 +219,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......
......@@ -31,7 +31,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -133,7 +133,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -169,7 +169,7 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
ArrowFunctionBody(
Expr,
),
Expr(
......@@ -209,7 +209,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -245,7 +245,7 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
ArrowFunctionBody(
Expr,
),
],
......@@ -287,7 +287,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -346,7 +346,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -413,7 +413,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -458,7 +458,7 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
ArrowFunctionBody(
Expr,
),
Expr(
......@@ -518,7 +518,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -563,7 +563,7 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
ArrowFunctionBody(
Expr,
),
Expr(
......@@ -674,7 +674,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -721,7 +721,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -789,7 +789,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -817,10 +817,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -886,7 +886,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -914,10 +914,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1013,7 +1013,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1041,10 +1041,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1143,7 +1143,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1171,10 +1171,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1230,7 +1230,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1258,8 +1258,8 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
],
),
......@@ -1301,7 +1301,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1363,7 +1363,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -1418,7 +1418,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -37,7 +37,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -144,7 +144,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -202,7 +202,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -252,7 +252,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -291,7 +291,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -331,7 +331,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -432,7 +432,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -488,7 +488,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -581,7 +581,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -625,7 +625,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
3,
),
......
......@@ -34,7 +34,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -91,7 +91,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -144,7 +144,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -188,7 +188,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
2,
),
......@@ -227,7 +227,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -266,7 +266,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......
......@@ -70,7 +70,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -90,7 +90,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -122,7 +122,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -293,7 +293,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -340,7 +340,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -406,7 +406,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -467,7 +467,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -514,7 +514,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -550,7 +550,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -586,7 +586,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -684,7 +684,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -725,7 +725,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -757,7 +757,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -774,7 +774,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
......@@ -170,8 +170,8 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
],
),
......
......@@ -36,6 +36,4 @@ named_let_export_not_const_after_eval_2 = (1 | 3)
setter_not_const_after_eval = (1 | 2)
v = ???*0*
- *0* v
⚠️ pattern without value
v = arguments[0]
......@@ -246,17 +246,9 @@
),
(
"v",
Unknown {
original_value: Some(
Variable(
(
"v",
#11,
),
),
),
reason: "pattern without value",
has_side_effects: false,
},
Argument(
1260,
0,
),
),
]
......@@ -37,5 +37,5 @@ named_let_export_not_const_after_eval_2 = (1 | 3)
setter_not_const_after_eval = (1 | 2)
v = ???*0*
- *0* v
⚠️ pattern without value
- *0* arguments[0]
⚠️ function calls are not analyzed yet
......@@ -53,10 +53,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -119,10 +119,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -201,10 +201,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -269,10 +269,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -329,10 +329,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -415,10 +415,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -498,10 +498,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -579,10 +579,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -749,10 +749,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......@@ -801,10 +801,10 @@
ArrowExpr(
Body,
),
BlockStmtOrExpr(
BlockStmt,
ArrowFunctionBody(
FunctionBody,
),
BlockStmt(
FunctionBody(
Stmts(
1,
),
......
......@@ -364,7 +364,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -425,7 +425,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -502,7 +502,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -592,7 +592,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......@@ -633,7 +633,7 @@
Function(
Body,
),
BlockStmt(
FunctionBody(
Stmts(
0,
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment