ohm-js 16.3.3 → 16.3.4
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/ohm.esm.js +6 -6
- package/dist/ohm.js +7 -7
- package/dist/ohm.min.js +1 -1
- package/index.d.ts +3 -3
- package/package.json +1 -1
- package/src/Grammar.js +1 -1
- package/src/errors.js +2 -2
- package/src/main.js +2 -2
package/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare namespace ohm {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* grammarFromScriptElement was removed in Ohm v16.0. See
|
|
16
|
-
* https://
|
|
16
|
+
* https://ohmjs.org/d/gfs for more info.
|
|
17
17
|
* @deprecated
|
|
18
18
|
*/
|
|
19
19
|
function grammarFromScriptElement(node?: unknown, namespace?: Namespace): Grammar;
|
|
@@ -28,7 +28,7 @@ declare namespace ohm {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* grammarsFromScriptElements was removed in Ohm v16.0. See
|
|
31
|
-
* https://
|
|
31
|
+
* https://ohmjs.org/d/gfs for more info.
|
|
32
32
|
* @deprecated
|
|
33
33
|
*/
|
|
34
34
|
function grammarsFromScriptElements(nodeList?: unknown, namespace?: Namespace): Namespace;
|
|
@@ -307,7 +307,7 @@ declare namespace ohm {
|
|
|
307
307
|
/**
|
|
308
308
|
* True if Node is ? option
|
|
309
309
|
*/
|
|
310
|
-
isOptional: boolean;
|
|
310
|
+
isOptional(): boolean;
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
313
|
* In addition to the properties defined above, within a given
|
package/package.json
CHANGED
package/src/Grammar.js
CHANGED
|
@@ -140,7 +140,7 @@ Grammar.prototype = {
|
|
|
140
140
|
if (k === '_iter' || k === '_nonterminal') {
|
|
141
141
|
details =
|
|
142
142
|
`it should use a rest parameter, e.g. \`${k}(...children) {}\`. ` +
|
|
143
|
-
'NOTE: this is new in Ohm v16 — see https://
|
|
143
|
+
'NOTE: this is new in Ohm v16 — see https://ohmjs.org/d/ati for details.';
|
|
144
144
|
} else {
|
|
145
145
|
details = `expected ${expected}, got ${actual}`;
|
|
146
146
|
}
|
package/src/errors.js
CHANGED
|
@@ -168,7 +168,7 @@ function invalidParameter(ruleName, expr) {
|
|
|
168
168
|
|
|
169
169
|
const syntacticVsLexicalNote =
|
|
170
170
|
'NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. ' +
|
|
171
|
-
'See https://
|
|
171
|
+
'See https://ohmjs.org/d/svl for more details.';
|
|
172
172
|
|
|
173
173
|
function applicationOfSyntacticRuleFromLexicalContext(ruleName, applyExpr) {
|
|
174
174
|
return createError(
|
|
@@ -298,7 +298,7 @@ function missingSemanticAction(ctorName, name, type, stack) {
|
|
|
298
298
|
if (ctorName === '_iter') {
|
|
299
299
|
moreInfo = [
|
|
300
300
|
'\nNOTE: as of Ohm v16, there is no default action for iteration nodes — see ',
|
|
301
|
-
' https://
|
|
301
|
+
' https://ohmjs.org/d/dsa for details.',
|
|
302
302
|
].join('\n');
|
|
303
303
|
}
|
|
304
304
|
|
package/src/main.js
CHANGED
|
@@ -295,13 +295,13 @@ function grammars(source, optNamespace) {
|
|
|
295
295
|
|
|
296
296
|
function grammarFromScriptElement(optNode) {
|
|
297
297
|
throw new Error(
|
|
298
|
-
'grammarFromScriptElement was removed in Ohm v16.0. See https://
|
|
298
|
+
'grammarFromScriptElement was removed in Ohm v16.0. See https://ohmjs.org/d/gfs for more info.'
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
function grammarsFromScriptElements(optNodeOrNodeList) {
|
|
303
303
|
throw new Error(
|
|
304
|
-
'grammarsFromScriptElements was removed in Ohm v16.0. See https://
|
|
304
|
+
'grammarsFromScriptElements was removed in Ohm v16.0. See https://ohmjs.org/d/gfs for more info.'
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
|