void Scanner::try_lex_string_in_code(char quote)
{
    // We need to lex string literals in code blocks because they may contain closing
    // brace symbol that would otherwise be erroneously lexed as a real closing brace.
    //
    // However, single quote in Rust may be either the beginning of a char literal as in
    // '\u{1F600}', or a standalone one as in 'label. In the latter case trying to lex a
    // generic string literal will consume a fragment of the file until the next single
    // quote (if any) and result in either a spurios parse error, or incorrect generated
    // code. Therefore in Rust we try to lex a char literal, or else consume the quote.

    if (globopts->lang != LANG_RUST || quote != '\'') {
        lex_string(quote);
        return;
    }

    // Rust spec (literals): https://doc.rust-lang.org/reference/tokens.html#literals
    // Rust spec (input encoding): https://doc.rust-lang.org/reference/input-format.html

#line 3454 "src/parse/lex.cc"
{
	unsigned char yych;
	static const unsigned char yybm[] = {
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		128, 128, 128, 128, 128, 128, 128, 128, 
		128, 128,   0,   0,   0,   0,   0,   0, 
		  0, 128, 128, 128, 128, 128, 128,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0, 128, 128, 128, 128, 128, 128,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
		  0,   0,   0,   0,   0,   0,   0,   0, 
	};
	if ((lim - cur) < 5) { if (!fill(5)) { error("unexpected end of input"); exit(1); } }
	yych = (unsigned char)*(mar = cur);
	if (yych <= 0xDF) {
		if (yych <= '\\') {
			if (yych <= '[') goto yy380;
			goto yy382;
		} else {
			if (yych <= 0x7F) goto yy380;
			if (yych >= 0xC2) goto yy383;
		}
	} else {
		if (yych <= 0xF0) {
			if (yych <= 0xE0) goto yy384;
			if (yych <= 0xEF) goto yy385;
			goto yy386;
		} else {
			if (yych <= 0xF3) goto yy387;
			if (yych <= 0xF4) goto yy388;
		}
	}
yy379:
#line 702 "../src/parse/lex.re"
	{ return; }
#line 3514 "src/parse/lex.cc"
yy380:
	yych = (unsigned char)*++cur;
	if (yych == '\'') goto yy389;
yy381:
	cur = mar;
	goto yy379;
yy382:
	yych = (unsigned char)*++cur;
	if (yych <= 'm') {
		if (yych <= '\'') {
			if (yych == '"') goto yy380;
			if (yych <= '&') goto yy381;
			goto yy390;
		} else {
			if (yych <= '0') {
				if (yych <= '/') goto yy381;
				goto yy380;
			} else {
				if (yych == '\\') goto yy380;
				goto yy381;
			}
		}
	} else {
		if (yych <= 's') {
			if (yych <= 'n') goto yy380;
			if (yych == 'r') goto yy380;
			goto yy381;
		} else {
			if (yych <= 'u') {
				if (yych <= 't') goto yy380;
				goto yy391;
			} else {
				if (yych == 'x') goto yy392;
				goto yy381;
			}
		}
	}
yy383:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy381;
	if (yych <= 0xBF) goto yy380;
	goto yy381;
yy384:
	yych = (unsigned char)*++cur;
	if (yych <= 0x9F) goto yy381;
	if (yych <= 0xBF) goto yy383;
	goto yy381;
yy385:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy381;
	if (yych <= 0xBF) goto yy383;
	goto yy381;
yy386:
	yych = (unsigned char)*++cur;
	if (yych <= 0x8F) goto yy381;
	if (yych <= 0xBF) goto yy385;
	goto yy381;
yy387:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy381;
	if (yych <= 0xBF) goto yy385;
	goto yy381;
yy388:
	yych = (unsigned char)*++cur;
	if (yych <= 0x7F) goto yy381;
	if (yych <= 0x8F) goto yy385;
	goto yy381;
yy389:
	++cur;
	goto yy379;
yy390:
	yych = (unsigned char)*++cur;
	if (yych == '\'') goto yy389;
	goto yy379;
yy391:
	yych = (unsigned char)*++cur;
	if (yych == '{') goto yy393;
	goto yy381;
yy392:
	yych = (unsigned char)*++cur;
	if (yych == '\'') goto yy381;
	goto yy395;
yy393:
	yych = (unsigned char)*++cur;
	if (yych == '}') goto yy381;
	goto yy397;
yy394:
	++cur;
	if (lim <= cur) { if (!fill(1)) { error("unexpected end of input"); exit(1); } }
	yych = (unsigned char)*cur;
yy395:
	if (yybm[0+yych] & 128) {
		goto yy394;
	}
	if (yych == '\'') goto yy389;
	goto yy381;
yy396:
	++cur;
	if ((lim - cur) < 2) { if (!fill(2)) { error("unexpected end of input"); exit(1); } }
	yych = (unsigned char)*cur;
yy397:
	if (yych <= 'F') {
		if (yych <= '/') goto yy381;
		if (yych <= '9') goto yy396;
		if (yych <= '@') goto yy381;
		goto yy396;
	} else {
		if (yych <= 'f') {
			if (yych <= '`') goto yy381;
			goto yy396;
		} else {
			if (yych == '}') goto yy380;
			goto yy381;
		}
	}
}
#line 703 "../src/parse/lex.re"

}