macropy
macropy copied to clipboard
Macros in Python: quasiquotes, case classes, LINQ and more!
The default python AST objects are clunky and annoying: - They don't have nice `__str__`s or `__repr__`s - They don't have a constructor that will work with pattern matching -...
The tests under core/test/exporters/**init**.py fail for me under python2.7. ``` ====================================================================== ERROR: test_pyc_exporter (macropy.core.test.exporters.Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/macobo/projects/macropy/macropy/core/test/exporters/__init__.py", line 33, in test_pyc_exporter f = open(__file__ +...
`expand_if_in_registry` calls itself recursively when a macro is used with arguments, but it doesn't preserve `**kwargs`. This means that you cannot use both `args` and `target` at the same time...
So after reading the reasons why my first proposal of a single Optimization Macro parsing the entire file was unfeasible, I got to thinking of better (and possibly more pythonic)...
Replaced paths in style of **file** + '../folder' ones gotten from os.path module, since those tests caused IOErrors for me. Also see #57.
This should also include instructions on setting up development environment and running tests, coding style.
Generators can handle this particular example, but it would be nice if we could use this style of programming: ``` python @closures def makeCounter(): x = 0 def foo(): x...
A lot of our transformers could use pattern matching. It would make our code nicer.
I made changes to comply with the following runtime changes. In Python 3.8+, lineno/col_offset became required, as part of the adoption of the peg_parser. In Python 3.8+, arguments has a...