Allow ) and ] after asciiend in ASCII blocks
ASCII blocks can now be used as function arguments and array elements. The scanner now accepts ) and ] as valid characters after 'asciiend', allowing constructs like: - var x = uiAA(ascii...asciiend) - var y = [ascii...asciiend] Fixes 12 parsing errors in test scripts.
This commit is contained in:
@@ -134,10 +134,11 @@ bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer
|
||||
}
|
||||
}
|
||||
|
||||
// Check that asciiend is followed by whitespace or EOL
|
||||
// Check that asciiend is followed by whitespace or EOL or closing delimiters
|
||||
if (match && (lexer->lookahead == '\n' || lexer->lookahead == '\r' ||
|
||||
lexer->lookahead == ' ' || lexer->lookahead == '\t' ||
|
||||
lexer->lookahead == ',' ||
|
||||
lexer->lookahead == ',' || lexer->lookahead == ')' ||
|
||||
lexer->lookahead == ']' ||
|
||||
lexer->eof(lexer))) {
|
||||
lexer->result_symbol = ASCII_CONTENT;
|
||||
return has_content;
|
||||
|
||||
Reference in New Issue
Block a user