-
Notifications
You must be signed in to change notification settings - Fork 40
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
allow users to evaluate an AST directly #51
Conversation
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
+ Coverage 91.44% 91.52% +0.08%
==========================================
Files 4 4
Lines 736 743 +7
==========================================
+ Hits 673 680 +7
Misses 63 63
Continue to review full report at Codecov.
|
Why not just pass the ast to Don't know anything about |
Hy parses its code into the same ast as python. If a program can evaluate the output from On the other hand I don't mind waiting with this until the refactoring of the exception handling. I think that would already fix a lot of the issues here. |
I would say to try to fix
Uh, well maybe. First, why does
Changing
I'm pretty sure we do not want two methods that can evaluate AST. |
@jmdejong closing this. I don't think we want to try to evaluate AST produced by some other module without carefully identifying the source of that code. |
Sometimes the AST will come from a different source (for example when using hy ).
Calling
run
directly misses some initialization and error handling.This adds the
eval_ast
function which is likeeval
, but takes an AST instead of a string.