summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2019-04-09 16:51:05 -0300
committerSoniEx2 <endermoneymod@gmail.com>2019-04-09 16:51:05 -0300
commitc77a2df387edc3f975143cf1aaab48e4c761bf5b (patch)
tree7241da14ca567afa3dcb7e7fb7165238b96c8f2a /README.md
parent886df79e9f8f76a3a166429bac87cb45f77fefa4 (diff)
Add README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ebb76b8
--- /dev/null
+++ b/README.md
@@ -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.