Skip to main content

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

Project description

Lizard

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lizard_lang-0.0.2.tar.gz
  • Upload date:
  • Size: 4.9 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.2.tar.gz
Algorithm Hash digest
SHA256 080ab6906bb34b962321da0037122a6cb16f81268ee8f975f62d828e515afc9a
MD5 b3630cafca5ab3d708067e067d59adcf
BLAKE2b-256 dc41c466868d762841815cf8c5e02cf957d7662b0e691a1f40f9c45043845215

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lizard_lang-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 883c3a0bfcfa6b50f5dbfaa0ba5f905cbdb9f868a1e5ff5cc1ebfc5b904de62d
MD5 78859c522cae19bda2cf5b5593699ff8
BLAKE2b-256 6838d8ed90adba3039e10d5aafb3363333262c0d8d30d6fdff3cc7667e16dd94

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