-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fpp-to-json utilities #207
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…t/fpp-json-ast-parser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to add an entrypoint to fprime-util to have e.g. fprime-util fpp-to-json
? Or is the goal to generate the JSON stuff in the build cache as part of the build process?
So this utility is a parser and data type converter from the abstract syntax tree to Python. Because of this, it is not a CLI that you run to use fpp-to-json, rather you import the visitors and apply them to a given AST (which can be obtained any which way one wants). In general it may be nice to include a fpp-to-json entry point, which calculates dependencies alongside running the analysis. What use case are you thinking? |
I don't think fpp-to-json is a user-facing tool. It's a tool that developers can use to build other tools. |
Change Description
The following PR implements some utilities for using
fpp-to-json
with Python, specifically an abstract syntax tree (AST) converter and an FPP writer. The utilities have been made broad enough to be able to add visitors for different AST output types (i.e., XML).