Skip to main content

Lizard is a python-based programming language that adds semicolons and curly braces to Python syntax

Project description

Lizard

Lizard icon Lizard is a Python‑compatible language that adds curly braces and optional semicolons to Python syntax, then compiles to 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
  • 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

Planned:

  • formatter
  • LSP support
  • self‑hosting (Lizard in Lizard)
  • 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

lizard_lang-0.5.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lizard_lang-0.5.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file lizard_lang-0.5.0.tar.gz.

File metadata

  • Download URL: lizard_lang-0.5.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lizard_lang-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0e2ae16cba56287dc52c068ba15c41712d4b986e82ba84c7226c1acc7ed1f96c
MD5 b2ddb399b07b3d22b928ab0536167578
BLAKE2b-256 7bf9d7c2747723ded51d22a20a545a5f124777e66d6602aa8666854953273161

See more details on using hashes here.

File details

Details for the file lizard_lang-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: lizard_lang-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lizard_lang-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4510aa6a2c2123cb2dbf3a4b70b6c8e001afafd0b248419228df6716720e07bf
MD5 807c14121fe9ca04c9a99b5e9a0ae439
BLAKE2b-256 da37d0587d9be7c5b3d8bfa9cc4d14e1f2e5d1b04e562c4e1632cc3d4583d7aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page