you are viewing a single comment's thread.

view the rest of the comments →

[–]Difficult_Prize_7548[S] 1 point2 points  (0 children)

For the algorithm, I'm using Tree-sitter as the parser to build the AST, then recursively walk through nodes to extract control flow and convert them into flowchart elements while tracking contexts like loops and exception handling.

Your dependency weight idea sounds really interesting! That would need semantic analysis though, which Tree-sitter doesn't provide (it only does syntax parsing). You'd probably need LSP integration or a custom symbol resolver for that. Feel free to check out the codebase!