nimpretty: fixes #10295

This commit is contained in:
Araq 2019-06-07 10:37:00 +02:00
commit 447cc1ff09
4 changed files with 30 additions and 5 deletions

View file

@ -96,6 +96,8 @@ proc getTok(p: var TParser) =
p.hasProgress = true
when defined(nimpretty2):
emitTok(p.em, p.lex, p.tok)
# skip the additional tokens that nimpretty needs but the parser has no
# interest in:
while p.tok.tokType == tkComment:
rawGetTok(p.lex, p.tok)
emitTok(p.em, p.lex, p.tok)