Currently, epScript emits Python source code and replaces co_lnotab or co_linetable attributes of the resulting CodeObject to map line numbers. This approach is CPython-specific and incompatible across multiple Python versions and Python implementations. (such as PyPy, GraalPy, etc.) This is super hacky and has been major obstacles when upgrading to newer CPython releases.
Hy language, a Lisp dialect on Python uses Python AST instead, using Python's native ast module:
https://github.com/hylang/hy/blob/master/hy/compiler.py
https://github.com/hylang/hy/blob/master/hy/importer.py
Hy also runs test on multiple python versions and pypy3 as well.
We need to be cautious about potential regressions on Python interoperability; it could alter how eval() and exec() behave.
Currently,
epScriptemits Python source code and replacesco_lnotaborco_linetableattributes of the resultingCodeObjectto map line numbers. This approach is CPython-specific and incompatible across multiple Python versions and Python implementations. (such as PyPy, GraalPy, etc.) This is super hacky and has been major obstacles when upgrading to newer CPython releases.Hylanguage, a Lisp dialect on Python uses Python AST instead, using Python's nativeastmodule:https://github.com/hylang/hy/blob/master/hy/compiler.py
https://github.com/hylang/hy/blob/master/hy/importer.py
Hyalso runs test on multiple python versions and pypy3 as well.We need to be cautious about potential regressions on Python interoperability; it could alter how
eval()andexec()behave.