summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2022-09-06 22:24:32 +0300
committerGitHub <noreply@github.com>2022-09-06 21:24:32 +0200
commit801eb3cb56096b5f8443206e4d4a6112504f79c0 (patch)
tree2fd3577db4255edf6f0aedcb3d2712b966aa12bb /compiler
parent557d79e7a2303f439d297655e3feb7219ef98fc6 (diff)
downloadNim-801eb3cb56096b5f8443206e4d4a6112504f79c0.tar.gz
use arrow precedence in spec (#20166)
* test using arrow precedence in spec

refs #8759

* add test for #8759
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lexer.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index f2c94e06a..06a6cea67 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -973,7 +973,7 @@ proc getPrecedence*(tok: Token): int =
 
     # arrow like?
     if tok.ident.s.len > 1 and tok.ident.s[^1] == '>' and
-      tok.ident.s[^2] in {'-', '~', '='}: return 1
+      tok.ident.s[^2] in {'-', '~', '='}: return 0
 
     template considerAsgn(value: untyped) =
       result = if tok.ident.s[^1] == '=': 1 else: value