@lezer/common 1.5.2 → 1.5.3
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 +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lezer/common
|
|
2
2
|
|
|
3
|
-
[ [**WEBSITE**](http://lezer.codemirror.net) | [**ISSUES**](https://
|
|
3
|
+
[ [**WEBSITE**](http://lezer.codemirror.net) | [**ISSUES**](https://code.haverbeke.berlin/lezer/lezer/issues) | [**FORUM**](https://discuss.codemirror.net/c/lezer) | [**CHANGELOG**](https://code.haverbeke.berlin/lezer/common/src/branch/main/CHANGELOG.md) ]
|
|
4
4
|
|
|
5
5
|
[Lezer](https://lezer.codemirror.net/) is an incremental parser system
|
|
6
6
|
intended for use in an editor or similar system.
|
package/dist/index.cjs
CHANGED
|
@@ -2025,14 +2025,14 @@ class StructureCursor {
|
|
|
2025
2025
|
constructor(root, offset) {
|
|
2026
2026
|
this.offset = offset;
|
|
2027
2027
|
this.done = false;
|
|
2028
|
-
this.cursor = root.cursor(exports.IterMode.IncludeAnonymous | exports.IterMode.IgnoreMounts);
|
|
2028
|
+
this.cursor = root.cursor(exports.IterMode.IncludeAnonymous | exports.IterMode.IgnoreMounts | exports.IterMode.ExcludeBuffers);
|
|
2029
2029
|
}
|
|
2030
2030
|
// Move to the first node (in pre-order) that starts at or after `pos`.
|
|
2031
2031
|
moveTo(pos) {
|
|
2032
2032
|
let { cursor } = this, p = pos - this.offset;
|
|
2033
2033
|
while (!this.done && cursor.from < p) {
|
|
2034
|
-
if (cursor.to >=
|
|
2035
|
-
else if (cursor.to <=
|
|
2034
|
+
if (cursor.to >= p && cursor.enter(p, 1, exports.IterMode.IncludeAnonymous | exports.IterMode.IgnoreOverlays | exports.IterMode.ExcludeBuffers)) ;
|
|
2035
|
+
else if (cursor.to <= p) {
|
|
2036
2036
|
if (!cursor.next(false))
|
|
2037
2037
|
this.done = true;
|
|
2038
2038
|
// Moved to next node
|
package/dist/index.d.cts
CHANGED
|
@@ -1171,4 +1171,5 @@ tree.
|
|
|
1171
1171
|
*/
|
|
1172
1172
|
declare function parseMixed(nest: (node: SyntaxNodeRef, input: Input) => NestedParse | null): ParseWrapper;
|
|
1173
1173
|
|
|
1174
|
-
export {
|
|
1174
|
+
export { DefaultBufferLength, IterMode, MountedTree, NodeProp, NodeSet, NodeType, NodeWeakMap, Parser, Tree, TreeBuffer, TreeCursor, TreeFragment, parseMixed };
|
|
1175
|
+
export type { BufferCursor, ChangedRange, Input, NestedParse, NodeIterator, NodePropSource, ParseWrapper, PartialParse, SyntaxNode, SyntaxNodeRef };
|
package/dist/index.d.ts
CHANGED
|
@@ -1171,4 +1171,5 @@ tree.
|
|
|
1171
1171
|
*/
|
|
1172
1172
|
declare function parseMixed(nest: (node: SyntaxNodeRef, input: Input) => NestedParse | null): ParseWrapper;
|
|
1173
1173
|
|
|
1174
|
-
export {
|
|
1174
|
+
export { DefaultBufferLength, IterMode, MountedTree, NodeProp, NodeSet, NodeType, NodeWeakMap, Parser, Tree, TreeBuffer, TreeCursor, TreeFragment, parseMixed };
|
|
1175
|
+
export type { BufferCursor, ChangedRange, Input, NestedParse, NodeIterator, NodePropSource, ParseWrapper, PartialParse, SyntaxNode, SyntaxNodeRef };
|
package/dist/index.js
CHANGED
|
@@ -2023,14 +2023,14 @@ class StructureCursor {
|
|
|
2023
2023
|
constructor(root, offset) {
|
|
2024
2024
|
this.offset = offset;
|
|
2025
2025
|
this.done = false;
|
|
2026
|
-
this.cursor = root.cursor(IterMode.IncludeAnonymous | IterMode.IgnoreMounts);
|
|
2026
|
+
this.cursor = root.cursor(IterMode.IncludeAnonymous | IterMode.IgnoreMounts | IterMode.ExcludeBuffers);
|
|
2027
2027
|
}
|
|
2028
2028
|
// Move to the first node (in pre-order) that starts at or after `pos`.
|
|
2029
2029
|
moveTo(pos) {
|
|
2030
2030
|
let { cursor } = this, p = pos - this.offset;
|
|
2031
2031
|
while (!this.done && cursor.from < p) {
|
|
2032
|
-
if (cursor.to >=
|
|
2033
|
-
else if (cursor.to <=
|
|
2032
|
+
if (cursor.to >= p && cursor.enter(p, 1, IterMode.IncludeAnonymous | IterMode.IgnoreOverlays | IterMode.ExcludeBuffers)) ;
|
|
2033
|
+
else if (cursor.to <= p) {
|
|
2034
2034
|
if (!cursor.next(false))
|
|
2035
2035
|
this.done = true;
|
|
2036
2036
|
// Moved to next node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lezer/common",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Syntax tree data structure and parser interfaces for the lezer parser",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": ["dist"],
|
|
23
23
|
"repository": {
|
|
24
|
-
"type"
|
|
25
|
-
"url"
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://code.haverbeke.berlin/lezer/common.git"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"watch": "node build.js --watch",
|