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

View file

@ -417,6 +417,10 @@ proc main() =
var runRes = readResults(runJson)
listResults(rejectRes, compileRes, runRes)
outputJSON(rejectRes, compileRes, runRes)
of "dll":
var r = initResults()
runDLLTests r, p.cmdLineRest.string
echo r.data, r
of "test":
var r = initResults()
if p.kind != cmdArgument: quit usage