tree-sitter-zsh 0.40.0 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/scanner.c CHANGED
@@ -966,15 +966,11 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) {
966
966
  "valid_symbols[CONCAT]=%d, lookahead='%c'\n",
967
967
  valid_symbols[CONCAT], lexer->lookahead);
968
968
  #endif
969
- if (!valid_symbols[CONCAT] &&
970
- (lexer->lookahead == ' ' || lexer->lookahead == '\t')) {
969
+ if (!valid_symbols[CONCAT] && iswspace(lexer->lookahead)) {
971
970
  #if DEBUG
972
971
  fprintf(stderr, "SCANNER: BARE_DOLLAR skipping whitespace\n");
973
972
  #endif
974
- while ((lexer->lookahead == ' ' || lexer->lookahead == '\t') &&
975
- !lexer->eof(lexer)) {
976
- skip(lexer);
977
- }
973
+ skip_wsnl(lexer);
978
974
  }
979
975
 
980
976
  if (lexer->lookahead == '$') {
Binary file