Lizard is a python-based programming language that adds semicolons and curly braces to Python syntax
Project description
Lizard
Lizard is a Python‑compatible language that adds curly braces and optional semicolons to Python syntax, with a self‑hosted compiler that targets clean Python via the ast module. |
def hello_world() {
print("Hello World!");
}
if True {
hello_world();
}
Transpiled output:
def hello_world():
print('Hello World!')
if True:
hello_world()
Features
- Python‑compatible syntax with
{}blocks and optional; - Lexer → parser → AST →
ast.unparsepipeline (no text‑based indentation tricks) - Supports comprehensions, decorators, and triple‑quoted strings
- Runs on the standard Python runtime
- Self‑hosting compiler (Lizard in Lizard), bootstrapped from Python
- VSCode syntax highlighting support
Examples
- Hello world:
examples/hello.lz - Factorial:
examples/factorial.lz - Comprehensions + dict/set literals:
examples/comprehensions.lz - Decorators:
examples/decorators.lz - Multiline strings:
examples/multiline_strings.lz
Installation
- PyPI: lizard-lang
- VSCode Extension: Lizard Lang
pip install lizard-lang
Run:
lizard examples/hello.lz
Development
pytest
Current Status
Lizard is experimental.
Implemented:
- lexer + parser + AST pipeline
- brace blocks and semicolon‑optional syntax
- Python code generation via
ast.unparse - self‑hosting compiler (Lizard in Lizard)
Planned:
- formatter
- LSP support
- LLVM + hybrid FFI backend
Why?
Because some developers prefer:
if (condition) {
doSomething();
}
over:
if condition:
do_something()
Lizard explores whether Python can support both styles while staying fully compatible with Python semantics.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lizard_lang-1.0.0.tar.gz.
File metadata
- Download URL: lizard_lang-1.0.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4891ec6213f39bae57fa0bba750218cbc18c8328edf25c2bfaf644b9d7e99e
|
|
| MD5 |
f2d08724d5bee6ca7c5149f0fefd7e71
|
|
| BLAKE2b-256 |
a6e53f88f7d2f9447616e9ef9244c9872597be09ea5d529993b3555ee68d676a
|
File details
Details for the file lizard_lang-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lizard_lang-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a151131cb72b6cbb822cfd45b567241479f9d22c1a1c16c9ef7f906164ea36f7
|
|
| MD5 |
6549226ea30bdc23cbfce1818607539b
|
|
| BLAKE2b-256 |
e3cf05693581cfd4de5715473251d1333428b923d17e76dd58a62ba73d68014b
|