Notes and ideas taken while working on Complexity.
Abstract Syntax Trees
More complex source code analysis requires the use of π³ Abstract Syntax Trees, which is language-dependent.
AST Explorer is a tool to play around with ASTs from different languages.
TypeScript AST
- TypeScript Compiler API
- TypeScript ASTs: Introduction to TypeScript ASTs
- typescript4j: Java library to compile TypeScript files. Has been archived since 2021.
Concept
Since it doesnβt seem to be possible to run through the AST from within Kotlin (or Java), Iβm thinking of running the TypeScript compiler in a TypeScript program and outputting the data in JSON format to be parsed by the main Kotlin program.
Charts
As part of my Design Principle βVisualβ, I think itβs important to visualise data to simplify interpretation.
Considered options:
- π§βπ»οΈ Charts in Kotlin, but I donβt want to immediately start with a heavy-weight library like JavaFX
- π Python as a post-processing script
- π§βπ»οΈ Frontend Development, JavaScript/TypeScript Charting libraries