@jqassistant/ts-lce
Version:
Tool to extract language concepts from a TypeScript codebase and export them to a JSON file.
28 lines (27 loc) • 898 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Processor = void 0;
/**
* Extracts language concepts from a given node of an AST and its children.
*/
class Processor {
/**
* Function that is executed before the children of the current AST node are processed.
* Use to set up the local context.
*/
preChildrenProcessing(processingContext) {
return;
}
/**
* Function that is executed after the children of the current AST node have been processed.
* Use to integrate concepts generated for child nodes.
*
* NOTE: Remove child concepts from the Map, if they are no longer needed further up the tree!
*
* @returns new concept(s) created for the current node
*/
postChildrenProcessing(processingContext, childConcepts) {
return new Map();
}
}
exports.Processor = Processor;