platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals

This commit is contained in:
Andreas Rumpf 2018-05-18 15:18:00 +02:00
commit a4e2b0c153
35 changed files with 536 additions and 676 deletions

View file

@ -630,14 +630,14 @@ proc getEscapedChar(L: var TLexer, tok: var TToken) =
if L.config.oldNewlines:
if tok.tokType == tkCharLit:
lexMessage(L, errGenerated, "\\n not allowed in character literal")
add(tok.literal, tnl)
add(tok.literal, L.config.target.tnl)
else:
add(tok.literal, '\L')
inc(L.bufpos)
of 'p', 'P':
if tok.tokType == tkCharLit:
lexMessage(L, errGenerated, "\\p not allowed in character literal")
add(tok.literal, tnl)
add(tok.literal, L.config.target.tnl)
inc(L.bufpos)
of 'r', 'R', 'c', 'C':
add(tok.literal, CR)