diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-20 11:42:45 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-20 11:42:45 +0000 |
| commit | a3335110dc4f1283cf1680e273cc9775b7e8c8ac (patch) | |
| tree | 15866ec0503d1edac9a1d9e11c04f7cdc7473d8d /lib/Lexer | |
| parent | 52e0674c54d4b53b2132e750106cc9acb266ed39 (diff) | |
feat(lexer): add C_STRING literal suffix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/Lexer')
| -rw-r--r-- | lib/Lexer/Lexer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Lexer/Lexer.cc b/lib/Lexer/Lexer.cc index 577a741..6d0246a 100644 --- a/lib/Lexer/Lexer.cc +++ b/lib/Lexer/Lexer.cc @@ -137,6 +137,10 @@ int Lexer::readToken() { } CharVal = StringVal.size() == 1 ? StringVal[0] : '?'; } + if (!IsChar && LastChar == 'C') { + LastChar = Input.get(); + return tok_c_string_literal; + } return IsChar ? tok_char_literal : tok_string_literal; } |
