Skip to content

πŸŒ• A simple toy language similar to Lua written in Python using Lark.

Notifications You must be signed in to change notification settings

megabytesofrem/tsuki-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

tsuki-lang

A simple toy language written in Python using Lark. Tsuki is designed to be similar to Lua syntax wise, however much simpler.

Features

  • Variables that map to Python representations
  • Arrays, and tables (dictionaries)
  • If statements
  • Comments

Demo

-- Hello world in Tsuki
echo("Hello world")

-- Checking for conditions with if
manesix = ["Twilight", "Rarity", "Fluttershy", "Applejack", "Rainbow Dash", "Pinkie Pie"]
inwonderbolts = "true"
if find(manesix, "Rainbow Dash") ~= "nil" and inwonderbolts == "true" then 
    echo("Rainbow dash is in the Wonderbolts")
end

-- Tables are cool too!
princesses = {
    "Twilight" -> "is the princess of friendship",
    "Celestia" -> "raises the sun",
    "Luna"     -> "raises the moon"
}

echo("Celestia ")
what = find(princesses, "Celestia")
echo(what)

-- ...and heres a single line if statement!
if what ~= "raises the sun" then echo("Wrong pony") end

About

πŸŒ• A simple toy language similar to Lua written in Python using Lark.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages