do not produce the annoying small 'l' warning
This commit is contained in:
parent
1063085850
commit
078e78d208
1 changed files with 1 additions and 7 deletions
|
|
@ -1030,7 +1030,7 @@ proc rawGetTok*(L: var TLexer, tok: var TToken) =
|
||||||
var c = L.buf[L.bufpos]
|
var c = L.buf[L.bufpos]
|
||||||
tok.line = L.lineNumber
|
tok.line = L.lineNumber
|
||||||
tok.col = getColNumber(L, L.bufpos)
|
tok.col = getColNumber(L, L.bufpos)
|
||||||
if c in SymStartChars - {'r', 'R', 'l'}:
|
if c in SymStartChars - {'r', 'R'}:
|
||||||
getSymbol(L, tok)
|
getSymbol(L, tok)
|
||||||
else:
|
else:
|
||||||
case c
|
case c
|
||||||
|
|
@ -1047,12 +1047,6 @@ proc rawGetTok*(L: var TLexer, tok: var TToken) =
|
||||||
of ',':
|
of ',':
|
||||||
tok.tokType = tkComma
|
tok.tokType = tkComma
|
||||||
inc(L.bufpos)
|
inc(L.bufpos)
|
||||||
of 'l':
|
|
||||||
# if we parsed exactly one character and its a small L (l), this
|
|
||||||
# is treated as a warning because it may be confused with the number 1
|
|
||||||
if L.buf[L.bufpos+1] notin (SymChars + {'_'}):
|
|
||||||
lexMessage(L, warnSmallLshouldNotBeUsed)
|
|
||||||
getSymbol(L, tok)
|
|
||||||
of 'r', 'R':
|
of 'r', 'R':
|
||||||
if L.buf[L.bufpos + 1] == '\"':
|
if L.buf[L.bufpos + 1] == '\"':
|
||||||
inc(L.bufpos)
|
inc(L.bufpos)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue