@spyglassmc/mcfunction 0.1.0 → 0.1.1
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/lib/parser/command.js
CHANGED
|
@@ -86,7 +86,7 @@ function dispatch(ans, src, ctx, path, rootTreeNode, parentTreeNode, argument) {
|
|
|
86
86
|
const parser = parsers.length > 1 ? core.any(parsers, out) : parsers[0];
|
|
87
87
|
const result = parser(src, ctx);
|
|
88
88
|
if (result !== core.Failure) {
|
|
89
|
-
const takenName = argumentParsers[out.index]?.name ?? result.value;
|
|
89
|
+
const takenName = argumentParsers[out.index - (literalParser ? 1 : 0)]?.name ?? result.value;
|
|
90
90
|
const childPath = [...path, takenName];
|
|
91
91
|
ans.push({
|
|
92
92
|
type: 'mcfunction:command_child',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/mcfunction",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"author": "SPGoding",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/SpyglassMC/Spyglass/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@spyglassmc/core": "0.1.
|
|
28
|
-
"@spyglassmc/locales": "0.1.
|
|
27
|
+
"@spyglassmc/core": "0.1.1",
|
|
28
|
+
"@spyglassmc/locales": "0.1.1"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=command.d.ts.map
|
package/lib/completer/command.js
DELETED
package/lib/node/argument.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ChildBaseNode } from './command';
|
|
2
|
-
export interface SpyglassmcTrailingArgumentNode extends ChildBaseNode {
|
|
3
|
-
type: 'mcfunction:argument/spyglassmc:trailing';
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
export interface SpyglassmcUnknownArgumentNode extends ChildBaseNode {
|
|
7
|
-
type: 'mcfunction:argument/spyglassmc:unknown';
|
|
8
|
-
value: string;
|
|
9
|
-
}
|
|
10
|
-
export declare type SpecialArgumentNode = SpyglassmcTrailingArgumentNode | SpyglassmcUnknownArgumentNode;
|
|
11
|
-
//# sourceMappingURL=argument.d.ts.map
|
package/lib/node/argument.js
DELETED
package/lib/node/literal.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type * as core from '@spyglassmc/core';
|
|
2
|
-
import type { ChildBaseNode } from './command';
|
|
3
|
-
export interface LiteralNode extends core.LiteralBaseNode, ChildBaseNode {
|
|
4
|
-
type: 'mcfunction:literal';
|
|
5
|
-
}
|
|
6
|
-
export declare namespace LiteralNode {
|
|
7
|
-
function is(node: core.AstNode): node is LiteralNode;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=literal.d.ts.map
|
package/lib/node/literal.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LiteralNode = void 0;
|
|
4
|
-
var LiteralNode;
|
|
5
|
-
(function (LiteralNode) {
|
|
6
|
-
/* istanbul ignore next */
|
|
7
|
-
function is(node) {
|
|
8
|
-
return node.type === 'mcfunction:literal';
|
|
9
|
-
}
|
|
10
|
-
LiteralNode.is = is;
|
|
11
|
-
})(LiteralNode = exports.LiteralNode || (exports.LiteralNode = {}));
|
|
12
|
-
//# sourceMappingURL=literal.js.map
|