+ lexer_token.type = T_STRING_LITERAL;
+ lexer_token.v.string.begin = result;
+ lexer_token.v.string.size = size;
+}
+
+static void parse_wide_character_constant(void)
+{
+ eat('\'');
+
+ int found_char = 0;
+ while(1) {
+ switch(c) {
+ case '\\':
+ found_char = parse_escape_sequence();
+ break;
+
+ MATCH_NEWLINE(
+ parse_error("newline while parsing character constant");
+ break;
+ )
+
+ case '\'':
+ next_char();
+ goto end_of_wide_char_constant;
+
+ case EOF:
+ parse_error("EOF while parsing character constant");
+ lexer_token.type = T_ERROR;
+ return;
+
+ default:
+ if(found_char != 0) {
+ parse_error("more than 1 characters in character "
+ "constant");
+ goto end_of_wide_char_constant;
+ } else {
+ found_char = c;
+ next_char();
+ }
+ break;
+ }
+ }
+
+end_of_wide_char_constant:
+ lexer_token.type = T_INTEGER;
+ lexer_token.v.intvalue = found_char;
+ lexer_token.datatype = type_wchar_t;