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.4.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.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lizard_lang-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 1288c547eab7cc3a3a214ccecff63a1fcb54b71fdf045ec1374d8f3277c80fb9
MD5 815488ac7ebc34cf8edf691997a37517
BLAKE2b-256 db3d917b9508b9f9b8983e7de67d62a3d33b82381a6a5b584ac602787fcaf672

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lizard_lang-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2a773c8914f473ab9cd9f6ffacdc2970b44be7994487e50242ef3d843cefb2fd
MD5 95e051d25608878895e10da86c1674ff
BLAKE2b-256 906ce335522cec8977dc1eeb3c457c39c185fa466558d5c2da00ade97bf9d141

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