Skip to content

Commit

Permalink
nim check, fix #11927, no more empty strings (#11979)
Browse files Browse the repository at this point in the history
  • Loading branch information
narimiran authored Aug 19, 2019
1 parent 742862b commit 75baaa5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/lexer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75baaa5

Please sign in to comment.