Closed rinz13r closed 5 years ago
I certainly agree, that it doesn't pass the test cases because of the way the current tests are evaluated.
I would like to point out that elif (...) :
in Python is translated to else {if (...) {}}
in C++. It should make no difference to the C++ compiler.
As demonstrated in issue #17, the parentheses were not balanced. I've added a fix for balancing the parentheses out. We should probably start using
visit
rather thangeneric_visit
, which calls the visitor on all children, in such cases. Finally, we should eliminate the use of globals (vars.is_if), to conditionally append to the generated code.Other changes: Added
__init__.py
for modules, and corrected a directory name.