From 18f19157ae89db0c6ae47f5dcffa7183dc291f49 Mon Sep 17 00:00:00 2001 From: kolen Date: Fri, 5 Jul 2024 02:29:37 +0300 Subject: [PATCH] Fix ruby attribute scanner ignoring characters --- src/scanner.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scanner.c b/src/scanner.c index 4922c4f..c6853c5 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -138,7 +138,7 @@ static bool scan_attr_ruby(TSLexer *lexer, char closing_delimiter, TSSymbol resu for(;;) { if (lexer->lookahead == '\n') { if (line_continuation) { - lexer->advance(lexer, true); + lexer->advance(lexer, false); continue; } else { break; @@ -151,14 +151,14 @@ static bool scan_attr_ruby(TSLexer *lexer, char closing_delimiter, TSSymbol resu } } else if (lexer->lookahead == ' ' || lexer->lookahead == '\t') { if (line_continuation) { - lexer->advance(lexer, true); + lexer->advance(lexer, false); continue; } else if (!internal_delimiter_nesting) { break; } } else if (lexer->lookahead == '\\' || lexer->lookahead == ',') { line_continuation = true; - lexer->advance(lexer, true); + lexer->advance(lexer, false); continue; } else if (lexer->lookahead == ' ' || lexer->lookahead == '\t') { if (!line_continuation && !internal_delimiter_nesting) { @@ -193,7 +193,7 @@ static bool scan_attr_ruby(TSLexer *lexer, char closing_delimiter, TSSymbol resu } line_continuation = false; - lexer->advance(lexer, true); + lexer->advance(lexer, false); } if (internal_delimiter_nesting) {