This commit is contained in:
2025-11-27 12:11:52 +01:00
parent 36d6c3947a
commit 3b8318940a
7 changed files with 18706 additions and 18880 deletions

View File

@@ -102,10 +102,9 @@ void tree_sitter_stonescript_external_scanner_deserialize(void *payload, const c
bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) {
Scanner *scanner = (Scanner *)payload;
// Try to handle block comments whenever we see /*
// This needs to run early before other checks
if (lexer->lookahead == '/') {
lexer->mark_end(lexer);
// Try to handle block comments when parser expects them
// Only check if valid_symbols allows BLOCK_COMMENT
if (valid_symbols[BLOCK_COMMENT] && lexer->lookahead == '/') {
lexer->advance(lexer, false);
if (lexer->lookahead == '*') {
lexer->advance(lexer, false);