Add full-width closing bracket support after asciiend

Allow ] (U+FF3D) after asciiend in ASCII content scanner.
This enables ASCII strings inside arrays with full-width brackets:
  var x = [ascii...asciiend]

The parser now correctly recognizes this as an array containing
an ASCII string, not as a syntax error.

Fixes 1 additional parsing error.
This commit is contained in:
2025-11-27 10:40:00 +01:00
parent 9a1dcb941d
commit 06e6e3b098
4 changed files with 12128 additions and 12905 deletions

View File

@@ -138,7 +138,7 @@ bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer
if (match && (lexer->lookahead == '\n' || lexer->lookahead == '\r' ||
lexer->lookahead == ' ' || lexer->lookahead == '\t' ||
lexer->lookahead == ',' || lexer->lookahead == ')' ||
lexer->lookahead == ']' ||
lexer->lookahead == ']' || lexer->lookahead == 0xFF3D || // full-width
lexer->eof(lexer))) {
lexer->result_symbol = ASCII_CONTENT;
return has_content;