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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lizard_lang-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 a9db595fa3c3fe35e4495a4433e34d0df12e3f34069f30a9db4313d9672b6603
MD5 ceb39c96895110005d64a6aa865a4640
BLAKE2b-256 14606c8f95b7f74b442ac089c94e3db035910ae05e124cfe860ade2da9d4bf13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lizard_lang-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3f72fdb485f39912fb620e064ef7bcbe913b595added75a4a2a35e6d3c66b424
MD5 ffa182f4a45a84b91162c273f6f49abc
BLAKE2b-256 9037221e37f987bfb89bfb4e8f68d80377fb14be2a6ec279cca1f83a19fa4e9f

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