Okay devlog time :>
So far I’ve been really focused on accurate symbol extraction from the AST, I need to have enough information extraction about what functions are actually useful enough to qualify as a symbol, because I don’t want a symbol for some random .map() callback function!
Anyways, the image i’ve attached below is a dual view of the symbols im extracting. On the left, I’ve only got ids (for a quicker glance) and on the right I’ve got the full symbols for each id!
Also, after the first devlog, I realized the complexity of the project and instantly decided to write tests, so I’ve been doing that as well :> I don’t want to break something accidentally in the future without even knowing smh
So far, im creating a symbol for:
- non-exported variables that contain a function
- exported variables
- named classes
- named class’s methods
- named function declarations and arrow functions
- nested function declarations and arrow functions
- an object’s properties that are arrow functions/function expressions
- intermediate objects of a parent object that contains at least one callable descendant, that act as namespaces
- a function’s methods
Right now, I still need to collect a symbol for:
- default exports, whether named or not
- types
- enums
- interfaces
- Anonymous classes stored in a variable
After that, I need to write a couple of more tests, refactor my code a little (it’s pretty messy right now), and then move on to the call graph, where I’ll have to extract CallFacts (basically whenever a symbol is being called/referred to)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.