diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-11-10 23:21:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 16:21:52 +0100 |
commit | a15872ba9ecd118dc69f2346285d5c039e1efd42 (patch) | |
tree | 4b99425dd41f3dd9ef02a079844bb1c273c2a7d0 /nimpretty | |
parent | 31be01d78f98a2904725994fd30eae4232e5a47c (diff) | |
download | Nim-a15872ba9ecd118dc69f2346285d5c039e1efd42.tar.gz |
refactor strongSpaceB with an enum (#20809)
refactor strongSpaceB
Diffstat (limited to 'nimpretty')
-rw-r--r-- | nimpretty/tests/exhaustive.nim | 2 | ||||
-rw-r--r-- | nimpretty/tests/expected/exhaustive.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nimpretty/tests/exhaustive.nim b/nimpretty/tests/exhaustive.nim index 80bf8b346..53ff0ea4d 100644 --- a/nimpretty/tests/exhaustive.nim +++ b/nimpretty/tests/exhaustive.nim @@ -267,7 +267,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) = if not em.endsInWhite: wr(" ") wr(tok.ident.s) template isUnary(tok): bool = - tok.strongSpaceB == 0 and tok.strongSpaceA + tok.strongSpaceB == tsNone and tok.strongSpaceA if not isUnary(tok) or em.lastTok in {tkOpr, tkDotDot}: wr(" ") diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim index 22bc22a7d..266bcae06 100644 --- a/nimpretty/tests/expected/exhaustive.nim +++ b/nimpretty/tests/expected/exhaustive.nim @@ -272,7 +272,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) = if not em.endsInWhite: wr(" ") wr(tok.ident.s) template isUnary(tok): bool = - tok.strongSpaceB == 0 and tok.strongSpaceA + tok.strongSpaceB == tsNone and tok.strongSpaceA if not isUnary(tok) or em.lastTok in {tkOpr, tkDotDot}: wr(" ") |