legopitstop / molang

Molang to Python Translator & interpreter written in pure Python.

Home Page:https://pypi.org/project/molang/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

molang

PyPI Python Downloads Status Issues

Molang to Python Translator & interpreter written in pure Python.

Documentation: https://molang.readthedocs.io/

Installation

Install the module with pip:

pip3 install molang

Update existing installation: pip3 install molang --upgrade

Features

  • 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.

Example

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

Command-line interface

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.

Road map

  • Python function to Molang
  • Interpreter
  • Lexer
  • Parser
  • cli to convert Python code to Molang code (vice versa)

About

Molang to Python Translator & interpreter written in pure Python.

https://pypi.org/project/molang/

License:MIT License


Languages

Language:Python 96.5%Language:Batchfile 3.5%