diff options
author | Miran <narimiran@disroot.org> | 2019-08-19 22:25:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-19 22:25:21 +0200 |
commit | 75baaa5e2513cdf348edc155b4f1999a317d9366 (patch) | |
tree | c3e4c9c82aee80f56351cf7682866a9d221f1fd6 | |
parent | 742862b847646dff4562992cd502d3077b2c9474 (diff) | |
download | Nim-75baaa5e2513cdf348edc155b4f1999a317d9366.tar.gz |
nim check, fix #11927, no more empty strings (#11979)
-rw-r--r-- | compiler/lexer.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 4bf50a359..c2b95c481 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 |