1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

LibSQL: Lex string and blob literals

Blob literals are the same as string literals except prefixed with an
'x' or 'X'.
This commit is contained in:
Timothy Flynn 2021-04-20 13:29:06 -04:00 committed by Andreas Kling
parent 730fbfb31e
commit 570aa57df3
3 changed files with 61 additions and 7 deletions

View file

@ -182,6 +182,8 @@ namespace SQL {
__ENUMERATE_SQL_TOKEN("WITHOUT", Without, Keyword) \
__ENUMERATE_SQL_TOKEN("_identifier_", Identifier, Identifier) \
__ENUMERATE_SQL_TOKEN("_numeric_", NumericLiteral, Number) \
__ENUMERATE_SQL_TOKEN("_string_", StringLiteral, String) \
__ENUMERATE_SQL_TOKEN("_blob_", BlobLiteral, Blob) \
__ENUMERATE_SQL_TOKEN("_eof_", Eof, Invalid) \
__ENUMERATE_SQL_TOKEN("_invalid_", Invalid, Invalid) \
__ENUMERATE_SQL_TOKEN("&", Ampersand, Operator) \
@ -221,6 +223,8 @@ enum class TokenCategory {
Keyword,
Identifier,
Number,
String,
Blob,
Operator,
Punctuation,
};