pure-lua cratera-to-lua converter
Go to file
SoniEx2 c77a2df387 Add README.md 2019-04-09 16:51:05 -03:00
LICENSE.txt Parser seems to work? 2019-03-31 11:02:57 -03:00
README.md Add README.md 2019-04-09 16:51:05 -03:00
luatokens.lua Fix number parsing (not compatible with 5.1) 2019-04-09 16:35:05 -03:00
parser.lua Fix Lua 5.1/Lua 5.2/LuaJIT compat 2019-04-07 12:54:48 -03:00
printtokens.lua It parses itself! 2019-04-09 06:56:37 -03:00
test.lua Tests pass in Lua 5.1/5.2 now too 2019-04-09 16:37:54 -03:00

README.md

The Cratera Programming Language (and support components)

This repo contains the Cratera to Lua compiler, as well as support components for the Cratera to Lua compiler, namely a pure-Lua Lua tokenizer and a table-based parser thing.

Cratera is a language very similar to Lua, and as such most of the Lua manual applies to it. Additionally, it supports the following syntax sugar, called "traits":

mytable:[mytrait].myfunction(myargument)

which is equivalent to:

mytable[mytrait].myfunction(mytable, myargument)

This syntax sugar is similar to the "methods" syntax sugar (Lua 5.3 §3.4.10, Lua 5.2 §3.4.9, Lua 5.1 §2.5.8), and, indeed, mytable is only evaluated once.