Add README.md

This commit is contained in:
SoniEx2 2019-04-09 16:51:05 -03:00
parent 886df79e9f
commit c77a2df387
1 changed files with 16 additions and 0 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
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](http://www.lua.org/manual/5.3/manual.html#3.4.10),
[Lua 5.2 §3.4.9](http://www.lua.org/manual/5.2/manual.html#3.4.9), [Lua 5.1 §2.5.8](http://www.lua.org/manual/5.1/manual.html#2.5.8)),
and, indeed, `mytable` is only evaluated once.