-
Notifications
You must be signed in to change notification settings - Fork 10
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
How does it generate the python source from AST? #5
Comments
Try open Fable.Python.Ast
ast.unparse(ast.parse("42")) |
maybe this is out of scope of the current question, but I have the suggestion about getting base python |
Yes, the idea I had was to parse the |
Correct me if wrong,pyi files contains sometimes conditions, evaluations. How much deep |
Yes, we would need to create a mini Python to F# transpiler handling if statements as needed. The idea is not to generate perfect code, but something that can be manually edited and fixed before making a PR. |
I have played a little bit with parsing definitions of function. It looks ugly for now (i'm newbie in F# yet). But It could the start for making some helptool for generating files based on pyi's. @dbrattli could you pleasecheck it out? |
Very nice that you want to try and build a Python type-hint parser. I would probably use the Ast-module myself, but I currently have more than enough with the Fable2Python parser. If you could make it work, then it would be really great! |
Question mostly. How does it generate the python source from AST? Or it's not ready yet? Sorry, I can't find it.
The text was updated successfully, but these errors were encountered: