From 75baaa5e2513cdf348edc155b4f1999a317d9366 Mon Sep 17 00:00:00 2001 From: Miran Date: Mon, 19 Aug 2019 22:25:21 +0200 Subject: [PATCH] nim check, fix #11927, no more empty strings (#11979) --- compiler/lexer.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 4bf50a3599ff9..c2b95c4814c89 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -864,7 +864,9 @@ proc getCharacter(L: var TLexer, tok: var TToken) = inc(L.bufpos) # skip ' var c = L.buf[L.bufpos] case c - of '\0'..pred(' '), '\'': lexMessage(L, errGenerated, "invalid character literal") + of '\0'..pred(' '), '\'': + lexMessage(L, errGenerated, "invalid character literal") + tok.literal = $c of '\\': getEscapedChar(L, tok) else: tok.literal = $c