mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
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
This commit is contained in:
@@ -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{=})
|
||||
|
||||
Reference in New Issue
Block a user