Skip to main content

Lizard

Lizard icon 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.unparse pipeline (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

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

Metadata

Release files for lizard-lang 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lizard-lang 1.0.0
File Size Uploaded
lizard_lang-1.0.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lizard-lang 1.0.0
File Interpreter ABI Platform
lizard_lang-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 kB

Release files / lizard_lang-1.0.0.tar.gz

Download URL lizard_lang-1.0.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ad4891ec6213f39bae57fa0bba750218cbc18c8328edf25c2bfaf644b9d7e99e
BLAKE2b-256 checksum
How to use checksums
a6e53f88f7d2f9447616e9ef9244c9872597be09ea5d529993b3555ee68d676a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / lizard_lang-1.0.0-py3-none-any.whl

Download URL lizard_lang-1.0.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a151131cb72b6cbb822cfd45b567241479f9d22c1a1c16c9ef7f906164ea36f7
BLAKE2b-256 checksum
How to use checksums
e3cf05693581cfd4de5715473251d1333428b923d17e76dd58a62ba73d68014b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.5.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page