From f309e4ff540fd1f16d1713ffc49dbc4528907dc1 Mon Sep 17 00:00:00 2001 From: Miran Date: Fri, 5 Apr 2019 12:37:33 +0200 Subject: [PATCH] relax warning about inconsistent spacing (#10968) Now the warning is raised only in the cases when there is an inconsistency in the style (spacing vs no spacing): * if a> b --> warning * if a > b --> no warning --- compiler/parser.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/parser.nim b/compiler/parser.nim index 7e934111a1..ec62dbf54e 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -266,7 +266,7 @@ proc checkBinary(p: TParser) {.inline.} = ## Check if the current parser token is a binary operator. # we don't check '..' here as that's too annoying if p.tok.tokType == tkOpr: - if p.tok.strongSpaceB > 0 and p.tok.strongSpaceA != p.tok.strongSpaceB: + if p.tok.strongSpaceB > 0 and p.tok.strongSpaceA == 0: parMessage(p, warnInconsistentSpacing, prettyTok(p.tok)) #| module = stmt ^* (';' / IND{=})