@lezer/common 1.1.2 → 1.2.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/dist/index.cjs +16 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +16 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -67,6 +67,22 @@ types that represent an expression could be tagged with an
|
|
|
67
67
|
*/
|
|
68
68
|
NodeProp.group = new NodeProp({ deserialize: str => str.split(" ") });
|
|
69
69
|
/**
|
|
70
|
+
Attached to nodes to indicate these should be
|
|
71
|
+
[displayed](https://codemirror.net/docs/ref/#language.syntaxTree)
|
|
72
|
+
in a bidirectional text isolate, so that direction-neutral
|
|
73
|
+
characters on their sides don't incorrectly get associated with
|
|
74
|
+
surrounding text. You'll generally want to set this for nodes
|
|
75
|
+
that contain arbitrary text, like strings and comments, and for
|
|
76
|
+
nodes that appear _inside_ arbitrary text, like HTML tags. When
|
|
77
|
+
not given a value, in a grammar declaration, defaults to
|
|
78
|
+
`"auto"`.
|
|
79
|
+
*/
|
|
80
|
+
NodeProp.isolate = new NodeProp({ deserialize: value => {
|
|
81
|
+
if (value && value != "rtl" && value != "ltr" && value != "auto")
|
|
82
|
+
throw new RangeError("Invalid value for isolate: " + value);
|
|
83
|
+
return value || "auto";
|
|
84
|
+
} });
|
|
85
|
+
/**
|
|
70
86
|
The hash of the [context](#lr.ContextTracker.constructor)
|
|
71
87
|
that the node was parsed in, if any. Used to limit reuse of
|
|
72
88
|
contextual nodes.
|
package/dist/index.d.cts
CHANGED
|
@@ -284,6 +284,18 @@ declare class NodeProp<T> {
|
|
|
284
284
|
*/
|
|
285
285
|
static group: NodeProp<readonly string[]>;
|
|
286
286
|
/**
|
|
287
|
+
Attached to nodes to indicate these should be
|
|
288
|
+
[displayed](https://codemirror.net/docs/ref/#language.syntaxTree)
|
|
289
|
+
in a bidirectional text isolate, so that direction-neutral
|
|
290
|
+
characters on their sides don't incorrectly get associated with
|
|
291
|
+
surrounding text. You'll generally want to set this for nodes
|
|
292
|
+
that contain arbitrary text, like strings and comments, and for
|
|
293
|
+
nodes that appear _inside_ arbitrary text, like HTML tags. When
|
|
294
|
+
not given a value, in a grammar declaration, defaults to
|
|
295
|
+
`"auto"`.
|
|
296
|
+
*/
|
|
297
|
+
static isolate: NodeProp<"rtl" | "ltr" | "auto">;
|
|
298
|
+
/**
|
|
287
299
|
The hash of the [context](#lr.ContextTracker.constructor)
|
|
288
300
|
that the node was parsed in, if any. Used to limit reuse of
|
|
289
301
|
contextual nodes.
|
package/dist/index.d.ts
CHANGED
|
@@ -284,6 +284,18 @@ declare class NodeProp<T> {
|
|
|
284
284
|
*/
|
|
285
285
|
static group: NodeProp<readonly string[]>;
|
|
286
286
|
/**
|
|
287
|
+
Attached to nodes to indicate these should be
|
|
288
|
+
[displayed](https://codemirror.net/docs/ref/#language.syntaxTree)
|
|
289
|
+
in a bidirectional text isolate, so that direction-neutral
|
|
290
|
+
characters on their sides don't incorrectly get associated with
|
|
291
|
+
surrounding text. You'll generally want to set this for nodes
|
|
292
|
+
that contain arbitrary text, like strings and comments, and for
|
|
293
|
+
nodes that appear _inside_ arbitrary text, like HTML tags. When
|
|
294
|
+
not given a value, in a grammar declaration, defaults to
|
|
295
|
+
`"auto"`.
|
|
296
|
+
*/
|
|
297
|
+
static isolate: NodeProp<"rtl" | "ltr" | "auto">;
|
|
298
|
+
/**
|
|
287
299
|
The hash of the [context](#lr.ContextTracker.constructor)
|
|
288
300
|
that the node was parsed in, if any. Used to limit reuse of
|
|
289
301
|
contextual nodes.
|
package/dist/index.js
CHANGED
|
@@ -65,6 +65,22 @@ types that represent an expression could be tagged with an
|
|
|
65
65
|
*/
|
|
66
66
|
NodeProp.group = new NodeProp({ deserialize: str => str.split(" ") });
|
|
67
67
|
/**
|
|
68
|
+
Attached to nodes to indicate these should be
|
|
69
|
+
[displayed](https://codemirror.net/docs/ref/#language.syntaxTree)
|
|
70
|
+
in a bidirectional text isolate, so that direction-neutral
|
|
71
|
+
characters on their sides don't incorrectly get associated with
|
|
72
|
+
surrounding text. You'll generally want to set this for nodes
|
|
73
|
+
that contain arbitrary text, like strings and comments, and for
|
|
74
|
+
nodes that appear _inside_ arbitrary text, like HTML tags. When
|
|
75
|
+
not given a value, in a grammar declaration, defaults to
|
|
76
|
+
`"auto"`.
|
|
77
|
+
*/
|
|
78
|
+
NodeProp.isolate = new NodeProp({ deserialize: value => {
|
|
79
|
+
if (value && value != "rtl" && value != "ltr" && value != "auto")
|
|
80
|
+
throw new RangeError("Invalid value for isolate: " + value);
|
|
81
|
+
return value || "auto";
|
|
82
|
+
} });
|
|
83
|
+
/**
|
|
68
84
|
The hash of the [context](#lr.ContextTracker.constructor)
|
|
69
85
|
that the node was parsed in, if any. Used to limit reuse of
|
|
70
86
|
contextual nodes.
|