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-based programming language that adds semicolons and curly braces to Python syntax.

It transpiles directly to Python and runs on the Python runtime.

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
  • Curly brace blocks ({})
  • Optional semicolons (;)
  • Direct transpilation to Python
  • Lightweight implementation
  • VSCode syntax highlighting support

Example

Lizard

def factorial(n) {
    if n <= 1 {
        return 1;
    }

    return n * factorial(n - 1);
}

print(factorial(5));

Generated Python

def factorial(n):
    if n <= 1:
        return 1

    return n * factorial(n - 1)

print(factorial(5))

Installation

Clone repository

git clone https://github.com/KaykCaputo/lizard-lang.git
cd lizard-lang

Install (CLI)

pip install lizard-lang

Run

lizard examples/hello.lz

VSCode Extension

Lizard includes a VSCode extension with:

  • syntax highlighting
  • bracket matching
  • .lz file support

To install locally:

vsce package
code --install-extension lizard-0.0.1.vsix

Current Status

Lizard is currently experimental.

Implemented:

  • semicolon removal
  • brace blocks
  • automatic indentation
  • Python transpilation

Planned:

  • lexer
  • parser
  • AST
  • formatter
  • LSP support
  • self-hosting experiments

Project Structure

lizard/
├── lizard/
│   ├── transpiler.py
│   ├── runner.py
│   └── cli.py
│
├── examples/
├── vscode-extension/
└── pyproject.toml

Why?

Because some developers prefer:

if (condition) {
    doSomething();
}

over:

if condition:
    do_something()

Lizard explores whether Python can support both styles while preserving readability and simplicity.


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.0.5.tar.gz (5.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.0.5-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lizard_lang-0.0.5.tar.gz
  • Upload date:
  • Size: 5.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.0.5.tar.gz
Algorithm Hash digest
SHA256 bc4eddbd8d42f44cba7b12f8ceab5137cbb980318ebc13844f46cd78f7158f5b
MD5 d7c59413d3cc294e28cb51df67055a6f
BLAKE2b-256 244ac39ce2598ed0dd557e46019853f196078800d10002090e0eba32d76f8463

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lizard_lang-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7004aa172a873e25686ad7a3f47e0a7e892882d0d952d3557fbdc6cd6c9fe2f6
MD5 2052244ced71708199c8306289352e1f
BLAKE2b-256 8280b8f0be0219e81c76d95a0034b85bb5abbf790be8fbed766436e74e6a9e24

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