update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user