Skip to content

Latest commit

Β 

History

History
35 lines (23 loc) Β· 1.08 KB

README.md

File metadata and controls

35 lines (23 loc) Β· 1.08 KB

Pint 🍺

A programming language brewed 🍺 with love ❀ and the finest emojis πŸ˜€

The language

Pint is a statically typed programming language using emojis as keywords with a syntax inspired by Python (with some twists).

Examples

πŸ’¬ An infinite loop

πŸ” {
    πŸ–¨οΈ("🍺")
}

The transpiler

Pint's transpiler is called Debrewer. Its output is Python.

It is implemented in Python and uses PLY (Python Lex-Yacc) to tokenize and parse the input file.

File extensions

The transpiler supports files with the .pint or .🍺 extension.

How to use

To transpile a Pint file to python, run python debrewer.py <input> [-o <output>] [-t].

Without specifying flags the result will be saved in a file with the same name as the input file, but with the .py extension. The -o flag specifies the output file, and the -t flag specifies that the output file should be checked against typing consistency using mypy.

Testing

Simple tests compare translated files to model ones from the examples directory.

Use: python -m unittest