https://github.com/megabytesofrem/tsuki-lang
🌕 A simple toy language similar to Lua written in Python using Lark.
https://github.com/megabytesofrem/tsuki-lang
lark lark-parser programming-language python scripting-language
Last synced: 6 months ago
JSON representation
🌕 A simple toy language similar to Lua written in Python using Lark.
- Host: GitHub
- URL: https://github.com/megabytesofrem/tsuki-lang
- Owner: megabytesofrem
- Created: 2020-08-22T22:32:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T11:28:59.000Z (about 5 years ago)
- Last Synced: 2025-04-13T12:07:41.403Z (6 months ago)
- Topics: lark, lark-parser, programming-language, python, scripting-language
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- [x] Variables that map to Python representations
- [x] Arrays, and tables (dictionaries)
- [x] If statements
- [x] Comments## Demo
```lua
-- 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
```