Skip to content

Commit 1c37782

Browse files
committed
Don't match string_content rule during error recovery
1 parent 32a9326 commit 1c37782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scanner.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static bool is_num_char(int32_t c) {
2424

2525
bool tree_sitter_rust_external_scanner_scan(void *payload, TSLexer *lexer,
2626
const bool *valid_symbols) {
27-
if (valid_symbols[STRING_CONTENT]) {
27+
if (valid_symbols[STRING_CONTENT] && !valid_symbols[FLOAT_LITERAL]) {
2828
bool has_content = false;
2929
for (;;) {
3030
if (lexer->lookahead == '\"' || lexer->lookahead == '\\') {

0 commit comments

Comments
 (0)