operator precedence changed: assignment like operators are supported; escaping of operators with \ is supported

This commit is contained in:
Araq 2011-11-09 01:42:05 +01:00
commit 68be801f63
7 changed files with 64 additions and 26 deletions

View file

@ -0,0 +1,11 @@
discard """
output: "true"
"""
# Test the new predence rules
proc `\+` (x, y: int): int = result = x + y
proc `\*` (x, y: int): int = result = x * y
echo 5 \+ 1 \* 9 == 14