TypeScriptLanguageFrontend
This language frontend adds experimental support for TypeScript. It is definitely not feature complete, but can be used to parse simple typescript snippets through the official typescript parser written in TypeScript / nodejs. It includes a simple nodejs script that invokes this parser in src/main/nodejs
. It basically dumps the AST in a JSON structure on stdout and this input is parsed by this frontend.
Because TypeScript is a strict super-set of JavaScript, this frontend can also be used to parse JavaScript. However, this is not properly tested. Furthermore, the official TypeScript parser also has built-in support for React dialects TSX and JSX.
Properties
Functions
Extracts comments from the file with a regular expression and calls a best effort approach function that matches them to the closes ast node in the cpg.