diff --git a/docs/src/creating-parsers/3-writing-the-grammar.md b/docs/src/creating-parsers/3-writing-the-grammar.md index 0052198b..cb6ec3d4 100644 --- a/docs/src/creating-parsers/3-writing-the-grammar.md +++ b/docs/src/creating-parsers/3-writing-the-grammar.md @@ -471,9 +471,8 @@ module.exports = grammar({ ``` ```admonish note -Tree-sitter intentionally simplifies some common regex patterns, both as a performance optimization and for simplicity, -typically in ways that don't affect the meaning of the pattern. For example, `\w` is simplified to `[a-zA-Z0-9_]`, `\s` -to `[ \t\n\r]`, and `\d` to `[0-9]`. If you need more complex behavior, you can always use a more explicit regex. +Tree-sitter intentionally simplifies the whitespace character class, `\s`, to `[ \t\n\r]` as a performance +optimization. This is because typically users do not require the full Unicode definition of whitespace. ``` ## Using Supertypes