From a15872ba9ecd118dc69f2346285d5c039e1efd42 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 10 Nov 2022 23:21:52 +0800 Subject: refactor strongSpaceB with an enum (#20809) refactor strongSpaceB --- nimpretty/tests/exhaustive.nim | 2 +- nimpretty/tests/expected/exhaustive.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'nimpretty/tests') 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(" ") -- cgit 1.4.1-2-gfad0