-
Notifications
You must be signed in to change notification settings - Fork 237
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
Limit the depth of the binary numeric expression in Python #57
Conversation
afce3de
to
e01c63d
Compare
e01c63d
to
a7fe5fb
Compare
e1acc4d
to
24770bb
Compare
|
||
from m2cgen import ast | ||
|
||
|
||
class BaseInterpreter: | ||
class BaseAstInterpreter: |
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.
I really don't like Ast
prefix here. It's kind of obvious what's being interpreted. Same true for AstToCode...
why not just CodeGenInterpreter
? Or even just ToCodeInterpreter
?
|
||
expected_code = """ | ||
def score(input): | ||
var0 = (1) + ((1) + (1)) |
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.
Can we add a test case where BinExpr
are diluted with some other exprs?
Like BinNumExpr
-> BinNumExpr
-> SubroutineExpr
-> BinNumExpr
-> IfExpr
-> BinNumExpr
. Something along those lines.
Closed in favor of #60 |
No description provided.