summaryrefslogtreecommitdiff
path: root/LANGUAGE.txt
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-08-04 21:53:16 +0200
committertomsmeding <tom.smeding@gmail.com>2016-08-04 21:53:16 +0200
commite6bb770a52980ef3d85c2d4b93fb240c026ce7f7 (patch)
tree3fbfbad81222598292a6aaf70c7b7bd1f32272f8 /LANGUAGE.txt
parentf83ea28ae6a04f1121b8328f7bdc5dad94628328 (diff)
Advance parser
Diffstat (limited to 'LANGUAGE.txt')
-rw-r--r--LANGUAGE.txt26
1 files changed, 13 insertions, 13 deletions
diff --git a/LANGUAGE.txt b/LANGUAGE.txt
index 9d72f08..0e7066b 100644
--- a/LANGUAGE.txt
+++ b/LANGUAGE.txt
@@ -1,21 +1,21 @@
Statements are terminated by ';'.
The usual infix expression rules apply, with the following precedence table:
-(lower precedence number means tighter binding)
+(higher precedence number means tighter binding)
Operators Precedence Associativity
- ** 1 Right
- - ! ~ 2 Prefix unary
- * / % 3 Left
- + - 4 Left
- & 5 Left
- ^ 6 Left
+ ** 14 Right
+ - ! ~ 12 Prefix (unary)
+ * / // % 11 Left
+ + - 10 Left
+ & 9 Left
+ ^ 8 Left
| 7 Left
- < > <= >= 8 Nonassociative
- == != 9 Nonassociative
- && 10 Left (short-circuiting)
- ^^ 11 Left
- || 12 Left (short-circuiting)
- = 13 Right (also += -= *= /= %= **= &= ^= |=)
+ < > <= >= 6 Nonassociative
+ == != 5 Nonassociative
+ && 4 Left (short-circuiting)
+ ^^ 3 Left
+ || 2 Left (short-circuiting)
+ = 1 Right (also += -= *= /= %= **= &= ^= |=)
break and continue get parsed to calls to the __break() and __continue()