Using lexer (development) [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-07-12 22:23:10 +03:00 committed by alexey-milovidov
parent 4255b81f3f
commit 4562785c2a
2 changed files with 3 additions and 1 deletions

View File

@ -403,6 +403,8 @@ bool ParserNumber::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
++pos;
negative = true;
}
else if (pos->type == TokenType::Plus) /// Leading plus is simply ignored.
++pos;
Field res;

View File

@ -13,7 +13,7 @@ enum class TokenType
BareWord, /// Either keyword (SELECT) or identifier (column)
Number, /// Always non-negative. 123 or something like 123.456e12, 0x123p12
Number, /// Always non-negative. No leading plus. 123 or something like 123.456e12, 0x123p12
StringLiteral, /// 'hello word', 'hello''word', 'hello\'word\\'
QuotedIdentifier, /// "x", `x`