@@ -175,7 +175,6 @@ const nodeMatchers: Partial<
175175 patternMatcher ( "yield_expression.~yield!" ) ,
176176 ) ,
177177 ifStatement : "if_statement" ,
178- anonymousFunction : [ "arrow_function" , "function" ] ,
179178 comment : "comment" ,
180179 regularExpression : "regex" ,
181180 className : [ "class_declaration[name]" , "class[name]" ] ,
@@ -226,59 +225,6 @@ const nodeMatchers: Partial<
226225 "export_statement?.abstract_class_declaration" , // export abstract class | abstract class
227226 "export_statement.class" , // export default class
228227 ] ,
229- functionName : [
230- // function
231- "function_declaration[name]" ,
232- // generator function
233- "generator_function_declaration[name]" ,
234- // export default function
235- "function[name]" ,
236- // class method
237- "method_definition[name]" ,
238- // abstract class method
239- "abstract_method_signature[name]" ,
240- // class arrow method
241- "public_field_definition[name].arrow_function" ,
242- // const foo = function() { }
243- "variable_declarator[name].function" ,
244- // const foo = () => { }
245- "variable_declarator[name].arrow_function" ,
246- // foo = function() { }
247- "assignment_expression[left].function" ,
248- // foo = () => { }
249- "assignment_expression[left].arrow_function" ,
250- ] ,
251- namedFunction : cascadingMatcher (
252- patternMatcher (
253- // [export] function
254- "export_statement?.function_declaration" ,
255- // export default function
256- // NB: We require export statement because otherwise it is an anonymous
257- // function
258- "export_statement.function" ,
259- // export default arrow
260- "export_statement.arrow_function" ,
261- // class method
262- "method_definition" ,
263- // class arrow method
264- "public_field_definition.arrow_function" ,
265- // [export] const foo = function() { }
266- "export_statement?.lexical_declaration.variable_declarator.function" ,
267- // [export] const foo = () => { }
268- "export_statement?.lexical_declaration.variable_declarator.arrow_function" ,
269- // foo = function() { }
270- "assignment_expression.function" ,
271- // foo = () => { }
272- "assignment_expression.arrow_function" ,
273- // foo = function*() { }
274- "generator_function_declaration" ,
275- ) ,
276- // abstract class method
277- matcher (
278- patternFinder ( "abstract_method_signature" ) ,
279- extendForwardPastOptional ( ";" ) ,
280- ) ,
281- ) ,
282228 type : cascadingMatcher (
283229 // Typed parameters, properties, and functions
284230 typeMatcher ( ) ,
0 commit comments