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, 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

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-1.0.0.tar.gz (15.3 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-1.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

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

Hashes for lizard_lang-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ad4891ec6213f39bae57fa0bba750218cbc18c8328edf25c2bfaf644b9d7e99e
MD5 f2d08724d5bee6ca7c5149f0fefd7e71
BLAKE2b-256 a6e53f88f7d2f9447616e9ef9244c9872597be09ea5d529993b3555ee68d676a

See more details on using hashes here.

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

Hashes for lizard_lang-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a151131cb72b6cbb822cfd45b567241479f9d22c1a1c16c9ef7f906164ea36f7
MD5 6549226ea30bdc23cbfce1818607539b
BLAKE2b-256 e3cf05693581cfd4de5715473251d1333428b923d17e76dd58a62ba73d68014b

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