diff options
Diffstat (limited to 'compiler/lexer.nim')
-rw-r--r-- | compiler/lexer.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 694d6f4d7..0967bed1d 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -61,7 +61,7 @@ type tkComma, tkSemiColon, tkColon, tkColonColon, tkEquals, tkDot, tkDotDot, tkOpr, tkComment, tkAccent, - tkSpaces, tkInfixOpr, tkPrefixOpr, tkPostfixOpr, + tkSpaces, tkInfixOpr, tkPrefixOpr, tkPostfixOpr TTokTypes* = set[TTokType] @@ -863,6 +863,10 @@ proc rawGetTok*(L: var TLexer, tok: var TToken) = of '`': tok.tokType = tkAccent inc(L.bufpos) + of '_': + tok.tokType = tkSymbol + tok.ident = getIdent("_") + inc(L.bufpos) of '\"': # check for extended raw string literal: var rawMode = L.bufpos > 0 and L.buf[L.bufpos-1] in SymChars |