Returns an array of SgNodes for class methods. The input node must represent a class.
This function finds all method definitions within a class node, including both regular methods and static methods.
The AST node representing a class to search for methods
Array of SgNodes representing method definitions within the class
const classNode = inspectClass(rootNode)if (classNode) { const methods = inspectClassMethods(classNode) methods.forEach(method => console.log('Method:', method.text()))} Copy
const classNode = inspectClass(rootNode)if (classNode) { const methods = inspectClassMethods(classNode) methods.forEach(method => console.log('Method:', method.text()))}
Returns an array of SgNodes for class methods. The input node must represent a class.
This function finds all method definitions within a class node, including both regular methods and static methods.