Molang to Python Translator & interpreter written in pure Python.
Documentation: https://molang.readthedocs.io/
Install the module with pip:
pip3 install molang
Update existing installation: pip3 install molang --upgrade
- Decorator to convert a Python function to Molang.
- Execute .molang files from the command line or using Python. See Road map
See the docs for more information.
Convert my_function
to Molang
from molang import molang
@molang
def my_function(a, b):
return a + b
print(my_function)
>> return t.a+t.b
usage: molang [-h] [-V]
Run molang files
options:
-h, --help show this help message and exit
-V, --version print the molang version number and exit.
- Python function to Molang
- Interpreter
- Lexer
- Parser
- cli to convert Python code to Molang code (vice versa)