From a3335110dc4f1283cf1680e273cc9775b7e8c8ac Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 20 Oct 2026 11:42:45 +0000 Subject: feat(lexer): add C_STRING literal suffix Co-Authored-By: Claude Opus 5.5 --- lib/Lexer/Lexer.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Lexer/Lexer.cc') 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; } -- cgit v1.3.1-4-g156e