diff options
author | ReneSac <reneduani@yahoo.com.br> | 2015-04-10 23:59:17 -0300 |
---|---|---|
committer | ReneSac <reneduani@yahoo.com.br> | 2015-04-10 23:59:17 -0300 |
commit | 34997292f48d40e8ed49d84c999b6d32afa3b044 (patch) | |
tree | baa17db92c76fec783d0d56ad24b26465030ee3a /tests/parser | |
parent | d71f1b98e0c88acb30d109eb84a00d5ffc9e8cfe (diff) | |
download | Nim-34997292f48d40e8ed49d84c999b6d32afa3b044.tar.gz |
Changing the rule for arrow like operators again.
Diffstat (limited to 'tests/parser')
-rw-r--r-- | tests/parser/tstrongspaces.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/parser/tstrongspaces.nim b/tests/parser/tstrongspaces.nim index eaf4d908c..e70b91988 100644 --- a/tests/parser/tstrongspaces.nim +++ b/tests/parser/tstrongspaces.nim @@ -73,11 +73,11 @@ echo "all" | tester & " " & args echo "all"|tester & " " & args # Test arrow like operators. See also tests/macros/tclosuremacro.nim -proc `-+>`(a, b: int): int = a + b*4 +proc `+->`(a, b: int): int = a + b*4 template `===>`(a, b: int): expr = a - b shr 1 -echo 3 -+> 2 + 2 and 4 -var arrowed = 3-+>2 + 2 and 4 # arrowed = 4 +echo 3 +-> 2 + 2 and 4 +var arrowed = 3+->2 + 2 and 4 # arrowed = 4 echo arrowed ===> 15 -echo (2 * 3-+>2) == (2*3 -+> 2) -echo arrowed ===> 2 + 3-+>2 +echo (2 * 3+->2) == (2*3 +-> 2) +echo arrowed ===> 2 + 3+->2 |