Open lee-sony opened 1 week ago
Not sure if you want to try another tool. Antlr provide a generic solution. Can support countless number of language (with grammar files included). Also worked with dot (graphviz) generation. The only concern is it written by Java. But you can read 10 minutes tutorial and can compile and run.
I was working in this (code2flow) project but thinking again now.
The project github: https://github.com/antlr/antlr4 There is a repo for grammar. Look at the owner repos for that one.
@patfinder Antlr looks a little too generic for my usecase 😅 I don't think a parser builder is what I'm looking for.
Background
Given a typical application based on the repository pattern, I want to map function calls to make sure that data access is properly controlled.
I have a setup a project as such
With the following source code (for minimal reproduction)
Logs
Expected behavior
When I run
code2flow ./**/*.py
, I expect to see mappings for all function calls for something like this:Actual behavior
However, I can only seem to get mappings that are imported directly:
Is this expected behavior? Or am I missing something here?