nimpretty: next steps

This commit is contained in:
Araq 2018-04-17 11:09:23 +02:00
commit 9bc963508f
5 changed files with 34 additions and 17 deletions

View file

@ -1080,7 +1080,9 @@ proc rawGetTok*(L: var TLexer, tok: var TToken) =
tok.indent = -1
skip(L, tok)
when defined(nimpretty):
if tok.tokType == tkComment: return
if tok.tokType == tkComment:
L.indentAhead = L.currLineIndent
return
var c = L.buf[L.bufpos]
tok.line = L.lineNumber
tok.col = getColNumber(L, L.bufpos)