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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user