oxc icon indicating copy to clipboard operation
oxc copied to clipboard

Change order of fields in `CallExpression`

Open overlookmotel opened this issue 6 months ago • 2 comments

CallExpression currently has arguments before callee:

https://github.com/oxc-project/oxc/blob/4e818a434ccc9100c4b28591e56166304fa590bc/crates/oxc_ast/src/ast/js.rs#L601-L608

Is there a reason for this? It seems like this field order would make more sense:

pub struct CallExpression<'a> { 
     #[serde(flatten)] 
     pub span: Span, 
     pub callee: Expression<'a>, 
     pub type_parameters: Option<Box<'a, TSTypeParameterInstantiation<'a>>>, 
     pub arguments: Vec<'a, Argument<'a>>, 
     pub optional: bool, // for optional chaining 
 } 

overlookmotel avatar Aug 11 '24 13:08 overlookmotel