summaryrefslogtreecommitdiff
path: root/LANGUAGE.txt
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-08-05 20:26:05 +0200
committertomsmeding <tom.smeding@gmail.com>2016-08-06 10:10:32 +0200
commitf67988fbfde6ad8a91466ef5d4227dcf9e5db6ce (patch)
treedb85d3936f717331c3eeed4fae43e5ed43324be9 /LANGUAGE.txt
parente6bb770a52980ef3d85c2d4b93fb240c026ce7f7 (diff)
Working preliminary version of parser
Diffstat (limited to 'LANGUAGE.txt')
-rw-r--r--LANGUAGE.txt31
1 files changed, 17 insertions, 14 deletions
diff --git a/LANGUAGE.txt b/LANGUAGE.txt
index 0e7066b..3259182 100644
--- a/LANGUAGE.txt
+++ b/LANGUAGE.txt
@@ -2,20 +2,23 @@ Statements are terminated by ';'.
The usual infix expression rules apply, with the following precedence table:
(higher precedence number means tighter binding)
- Operators Precedence Associativity
- ** 14 Right
- - ! ~ 12 Prefix (unary)
- * / // % 11 Left
- + - 10 Left
- & 9 Left
- ^ 8 Left
- | 7 Left
- < > <= >= 6 Nonassociative
- == != 5 Nonassociative
- && 4 Left (short-circuiting)
- ^^ 3 Left
- || 2 Left (short-circuiting)
- = 1 Right (also += -= *= /= %= **= &= ^= |=)
+ Operators Precedence Associativity
+ = += -= *= 1 Right
+ /= //= %= **= 1 Right
+ &= ^= |= 1 Right
+ || 2 Left (short-circuiting)
+ ^^ 3 Left
+ && 4 Left (short-circuiting)
+ == != 5 Nonassociative
+ < > <= >= 6 Nonassociative
+ | 7 Left
+ ^ 8 Left
+ & 9 Left
+ + - 10 Left
+ * / // % 11 Left
+ (-) ! ~ 12 Prefix (unary)
+ (!) 13 Suffix (unary)
+ ** 14 Right
break and continue get parsed to calls to the __break() and __continue()