@willbooster/web-tree-sitter 19.1.1 → 21.0.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/README.md CHANGED
@@ -110,26 +110,6 @@ console.log(callExpression.type, callExpression.startPosition, callExpression.en
110
110
  // call_expression { row: 0, column: 11 } { row: 0, column: 25 }
111
111
  ```
112
112
 
113
- ### Editing
114
-
115
- If your source code _changes_, you can update the syntax tree. This will take less time than the first parse.
116
-
117
- ```javascript
118
- // Replace 'let' with 'const'
119
- const newSourceCode = 'const x = 1; console.log(x);';
120
-
121
- tree.edit({
122
- startIndex: 0,
123
- oldEndIndex: 3,
124
- newEndIndex: 5,
125
- startPosition: { row: 0, column: 0 },
126
- oldEndPosition: { row: 0, column: 3 },
127
- newEndPosition: { row: 0, column: 5 },
128
- });
129
-
130
- const newTree = parser.parse(newSourceCode, tree);
131
- ```
132
-
133
113
  ### Parsing Text From a Custom Data Structure
134
114
 
135
115
  If your text is stored in a data structure other than a single string, you can parse it by supplying a callback to `parse`