feat(ast): remove expression property from Function (#2247)

This commit is contained in:
Dunqing 2024-02-01 15:23:27 +08:00 committed by GitHub
parent 02c18d8506
commit 165f948227
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 0 additions and 7 deletions

View file

@ -1683,7 +1683,6 @@ pub struct Function<'a> {
#[cfg_attr(feature = "serde", serde(flatten))] #[cfg_attr(feature = "serde", serde(flatten))]
pub span: Span, pub span: Span,
pub id: Option<BindingIdentifier>, pub id: Option<BindingIdentifier>,
pub expression: bool,
pub generator: bool, pub generator: bool,
pub r#async: bool, pub r#async: bool,
/// Declaring `this` in a Function <https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function> /// Declaring `this` in a Function <https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function>

View file

@ -773,7 +773,6 @@ impl<'a> AstBuilder<'a> {
r#type: FunctionType, r#type: FunctionType,
span: Span, span: Span,
id: Option<BindingIdentifier>, id: Option<BindingIdentifier>,
expression: bool,
generator: bool, generator: bool,
r#async: bool, r#async: bool,
this_param: Option<TSThisParameter<'a>>, this_param: Option<TSThisParameter<'a>>,
@ -787,7 +786,6 @@ impl<'a> AstBuilder<'a> {
r#type, r#type,
span, span,
id, id,
expression,
generator, generator,
r#async, r#async,
this_param, this_param,

View file

@ -125,7 +125,6 @@ impl<'a> Parser<'a> {
function_type, function_type,
self.end_span(span), self.end_span(span),
id, id,
false, // expression
generator, generator,
r#async, r#async,
this_param, this_param,

View file

@ -127,7 +127,6 @@ impl<'a> ArrowFunctions<'a> {
FunctionType::FunctionExpression, FunctionType::FunctionExpression,
SPAN, SPAN,
None, None,
false,
arrow_expr.generator, arrow_expr.generator,
arrow_expr.r#async, arrow_expr.r#async,
None, None,

View file

@ -612,7 +612,6 @@ impl<'a> Decorators<'a> {
None, None,
false, false,
false, false,
false,
None, None,
self.ast.formal_parameters( self.ast.formal_parameters(
SPAN, SPAN,

View file

@ -723,7 +723,6 @@ impl<'a> TypeScript<'a> {
None, None,
false, false,
false, false,
false,
None, None,
params, params,
Some(body), Some(body),