Skip to content

Luifegames/Lizard-Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦎 Lizard Language

Logo Lizard Language
**Lizard** is a small, C‑based interpreted language designed for learning and experimentation. It supports variables, arithmetic, comparisons, conditionals, and string concatenation in `print` statements.

Features

  • Variables – integers, float, boolean and strings
  • Assignment=
  • Logical Operatorand, or, not
  • Compound Assignment= += -= *= /=
  • Arithmetic+ - * / ++ -- and parentheses
  • Comparisons== != < > <= >= (return 1 or 0)
  • Printprint(...) with + concatenation (strings, ints, variables)
  • Conditionalsif, elif, else with { } blocks
  • Loopswhile
  • File extension.lzd
  • VersionLizard -v shows ASCII art

Building

Clone the repository and compile with make:

git clone https://github.com/Luifegames/Lizard-Language.git
cd lizard
make

The executable lizard (or Lizard.exe on Windows) will be created.

Usage

Run an Lizaes script:

./lizard script.lzd

Show version:

./lizard -v

Example

Create a file hello.lzd:

name = "Lizard"
size = 10

if (size >= 10) {
    print("Welcome to " + name + "!")
} else {
    print("too small")
}

print("2 + 2 = " + (2 + 2))
print("5 > 3 is " + (5 > 3))

Run it:

./lizard hello.lzd

Output:

Welcome to Lizard!
2 + 2 = 4
5 > 3 is 1

UTF‑8 Support

Lizard reads .lzd files in binary mode and preserves UTF‑8 byte sequences inside string literals. To display accented characters (á, é, í, ó, ú, ñ) correctly:

Project Structure

Lizard/
├── Makefile
├── include/          
│   ├── error.h
│   ├── lexer.h
│   ├── lizard.h
│   ├── parser.h
│   ├── variables.h
│   └── utils.h
└── src/
    ├── error.c
    ├── lexer.c
    ├── main.c
    ├── lexer.c
    ├── parser.c
    ├── variables.c
    └── utils.c

License

MIT – free to use and modify.

Installation Lizard Language for VS Code

  1. Download the latest .vsix file from the Releases page of this repository.

  2. Open VS Code.

  3. Go to the Extensions view:

    • Press Ctrl+Shift+X
    • Or click the Extensions icon in the Activity Bar.
  4. Click on the ... (More Actions) menu and select "Install from VSIX...".

  5. Choose the .vsix file you downloaded.

  6. Reload VS Code when prompted.

Usage

Once installed, the extension automatically activates when you open a .lzd file.

  • Keywords (if, else, while, print, and, or, not) will have syntax highlighting.
  • Strings, numbers, comments, and operators are also highlighted.

Example

Open a file named hello.lzd:

name = "Lizard"
size = 10

if (size >= 10) {
    print("Welcome to " + name + "!")
} else {
    print("too small")
}

print("2 + 2 = " + (2 + 2))
print("5 > 3 is " + (5 > 3))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors