@witchcraft/expressit 0.1.2 → 0.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/README.md +9 -5
- package/dist/Lexer.js +2 -2
- package/dist/Parser.d.ts +14 -29
- package/dist/Parser.d.ts.map +1 -1
- package/dist/Parser.js +120 -135
- package/dist/ast/builders/array.d.ts +1 -3
- package/dist/ast/builders/array.d.ts.map +1 -1
- package/dist/ast/builders/array.js +3 -5
- package/dist/ast/builders/condition.d.ts +5 -11
- package/dist/ast/builders/condition.d.ts.map +1 -1
- package/dist/ast/builders/condition.js +2 -3
- package/dist/ast/builders/delim.d.ts +1 -1
- package/dist/ast/builders/error.d.ts +3 -4
- package/dist/ast/builders/error.d.ts.map +1 -1
- package/dist/ast/builders/error.js +6 -2
- package/dist/ast/builders/expression.d.ts +3 -7
- package/dist/ast/builders/expression.d.ts.map +1 -1
- package/dist/ast/builders/expression.js +3 -5
- package/dist/ast/builders/group.d.ts +3 -8
- package/dist/ast/builders/group.d.ts.map +1 -1
- package/dist/ast/builders/group.js +3 -3
- package/dist/ast/builders/pos.d.ts +1 -2
- package/dist/ast/builders/pos.d.ts.map +1 -1
- package/dist/ast/builders/token.d.ts +3 -5
- package/dist/ast/builders/token.d.ts.map +1 -1
- package/dist/ast/builders/token.js +3 -4
- package/dist/ast/builders/type.d.ts +1 -1
- package/dist/ast/builders/variable.d.ts +3 -5
- package/dist/ast/builders/variable.d.ts.map +1 -1
- package/dist/ast/builders/variable.js +2 -3
- package/dist/ast/createArrayNode.d.ts +3 -0
- package/dist/ast/createArrayNode.d.ts.map +1 -0
- package/dist/ast/createArrayNode.js +12 -0
- package/dist/ast/createConditionNode.d.ts +11 -0
- package/dist/ast/createConditionNode.d.ts.map +1 -0
- package/dist/ast/createConditionNode.js +18 -0
- package/dist/ast/createExpressionNode.d.ts +3 -0
- package/dist/ast/createExpressionNode.d.ts.map +1 -0
- package/dist/ast/createExpressionNode.js +14 -0
- package/dist/ast/createGroupNode.d.ts +5 -0
- package/dist/ast/createGroupNode.d.ts.map +1 -0
- package/dist/ast/createGroupNode.js +14 -0
- package/dist/ast/createNormalizedCondition.d.ts +3 -0
- package/dist/ast/createNormalizedCondition.d.ts.map +1 -0
- package/dist/ast/createNormalizedCondition.js +10 -0
- package/dist/ast/createNormalizedExpression.d.ts +3 -0
- package/dist/ast/createNormalizedExpression.d.ts.map +1 -0
- package/dist/ast/createNormalizedExpression.js +10 -0
- package/dist/ast/createToken.d.ts +6 -0
- package/dist/ast/createToken.d.ts.map +1 -0
- package/dist/ast/createToken.js +15 -0
- package/dist/ast/createVariableNode.d.ts +3 -0
- package/dist/ast/createVariableNode.d.ts.map +1 -0
- package/dist/ast/createVariableNode.js +12 -0
- package/dist/ast/error.d.ts +3 -0
- package/dist/ast/error.d.ts.map +1 -0
- package/dist/ast/error.js +9 -0
- package/dist/ast/handlers.d.ts +5 -12
- package/dist/ast/handlers.d.ts.map +1 -1
- package/dist/ast/handlers.js +21 -29
- package/dist/ast/index.d.ts +9 -1
- package/dist/ast/index.d.ts.map +1 -1
- package/dist/ast/index.js +18 -2
- package/dist/defaults/defaultConditionNormalizer.d.ts +3 -0
- package/dist/defaults/defaultConditionNormalizer.d.ts.map +1 -0
- package/dist/defaults/defaultKeyParser.d.ts +3 -0
- package/dist/defaults/defaultKeyParser.d.ts.map +1 -0
- package/dist/defaults/defaultPrefixApplier.d.ts +3 -0
- package/dist/defaults/defaultPrefixApplier.d.ts.map +1 -0
- package/dist/defaults/defaultValueComparer.d.ts +3 -0
- package/dist/defaults/defaultValueComparer.d.ts.map +1 -0
- package/dist/{helpers/general → defaults}/index.d.ts +0 -2
- package/dist/defaults/index.d.ts.map +1 -0
- package/dist/{helpers/general → defaults}/index.js +0 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/{helpers/errors.d.ts → internal/ExpressitError.d.ts} +3 -2
- package/dist/internal/ExpressitError.d.ts.map +1 -0
- package/dist/{helpers/errors.js → internal/ExpressitError.js} +2 -2
- package/dist/internal/applyBoolean.d.ts.map +1 -0
- package/dist/{helpers/general → internal}/applyPrefix.d.ts +1 -1
- package/dist/internal/applyPrefix.d.ts.map +1 -0
- package/dist/{helpers/parser → internal}/checkParserOpts.d.ts +2 -1
- package/dist/internal/checkParserOpts.d.ts.map +1 -0
- package/dist/{helpers/parser → internal}/checkParserOpts.js +14 -14
- package/dist/internal/escapeVariableOrPrefix.d.ts +2 -0
- package/dist/internal/escapeVariableOrPrefix.d.ts.map +1 -0
- package/dist/internal/escapeVariableOrPrefix.js +38 -0
- package/dist/internal/extractPosition.d.ts +5 -0
- package/dist/internal/extractPosition.d.ts.map +1 -0
- package/dist/internal/getUnclosedRightParenCount.d.ts +4 -0
- package/dist/internal/getUnclosedRightParenCount.d.ts.map +1 -0
- package/dist/{helpers/parser → internal}/getUnclosedRightParenCount.js +1 -1
- package/dist/{helpers/parser → internal}/parseParserOptions.d.ts +1 -1
- package/dist/internal/parseParserOptions.d.ts.map +1 -0
- package/dist/{helpers/parser → internal}/parseParserOptions.js +4 -4
- package/dist/internal/unescape.d.ts.map +1 -0
- package/dist/package.json.js +7 -7
- package/dist/types/ast.d.ts +195 -6
- package/dist/types/ast.d.ts.map +1 -1
- package/dist/types/ast.js +2 -0
- package/dist/types/autocomplete.d.ts +5 -6
- package/dist/types/autocomplete.d.ts.map +1 -1
- package/dist/types/parser.d.ts +17 -22
- package/dist/types/parser.d.ts.map +1 -1
- package/dist/utils/extractTokens.d.ts +2 -4
- package/dist/utils/extractTokens.d.ts.map +1 -1
- package/dist/utils/extractTokens.js +14 -18
- package/dist/utils/generateParentsMap.d.ts +10 -0
- package/dist/utils/generateParentsMap.d.ts.map +1 -0
- package/dist/utils/generateParentsMap.js +73 -0
- package/dist/utils/getCursorInfo.d.ts +1 -1
- package/dist/utils/getCursorInfo.d.ts.map +1 -1
- package/dist/utils/getCursorInfo.js +3 -5
- package/dist/utils/getOppositeDelimiter.d.ts +2 -1
- package/dist/utils/getOppositeDelimiter.d.ts.map +1 -1
- package/dist/utils/getOppositeDelimiter.js +6 -5
- package/dist/utils/getParent.d.ts +5 -0
- package/dist/utils/getParent.d.ts.map +1 -0
- package/dist/utils/getParent.js +6 -0
- package/dist/utils/getSurroundingErrors.d.ts +3 -4
- package/dist/utils/getSurroundingErrors.d.ts.map +1 -1
- package/dist/utils/getSurroundingErrors.js +3 -3
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +8 -0
- package/dist/utils/isNode.d.ts +10 -0
- package/dist/utils/isNode.d.ts.map +1 -0
- package/dist/utils/isNode.js +6 -0
- package/dist/utils/isToken.d.ts +8 -0
- package/dist/utils/isToken.d.ts.map +1 -0
- package/dist/utils/isToken.js +6 -0
- package/dist/utils/prettyAst.d.ts +1 -2
- package/dist/utils/prettyAst.d.ts.map +1 -1
- package/dist/utils/prettyAst.js +19 -26
- package/package.json +7 -7
- package/src/Lexer.ts +2 -2
- package/src/Parser.ts +158 -165
- package/src/ast/builders/array.ts +4 -9
- package/src/ast/builders/condition.ts +10 -15
- package/src/ast/builders/delim.ts +1 -1
- package/src/ast/builders/error.ts +10 -6
- package/src/ast/builders/expression.ts +17 -23
- package/src/ast/builders/group.ts +7 -11
- package/src/ast/builders/pos.ts +2 -3
- package/src/ast/builders/token.ts +6 -7
- package/src/ast/builders/type.ts +1 -1
- package/src/ast/builders/variable.ts +6 -8
- package/src/ast/createArrayNode.ts +17 -0
- package/src/ast/createConditionNode.ts +58 -0
- package/src/ast/createExpressionNode.ts +21 -0
- package/src/ast/createGroupNode.ts +46 -0
- package/src/ast/createNormalizedCondition.ts +12 -0
- package/src/ast/createNormalizedExpression.ts +9 -0
- package/src/ast/createToken.ts +26 -0
- package/src/ast/createVariableNode.ts +18 -0
- package/src/ast/error.ts +9 -0
- package/src/ast/handlers.ts +26 -37
- package/src/ast/index.ts +9 -1
- package/src/{helpers/general → defaults}/defaultConditionNormalizer.ts +1 -1
- package/src/{helpers/general → defaults}/defaultKeyParser.ts +1 -1
- package/src/{helpers/general → defaults}/defaultPrefixApplier.ts +1 -1
- package/src/{helpers/general → defaults}/defaultValueComparer.ts +1 -1
- package/src/{helpers/general → defaults}/index.ts +0 -2
- package/src/index.ts +2 -1
- package/src/{helpers/errors.ts → internal/ExpressitError.ts} +2 -2
- package/src/{helpers/general → internal}/applyPrefix.ts +1 -1
- package/src/{helpers/parser → internal}/checkParserOpts.ts +16 -15
- package/src/internal/escapeVariableOrPrefix.ts +36 -0
- package/src/{helpers/parser → internal}/extractPosition.ts +2 -2
- package/src/{helpers/parser → internal}/getUnclosedRightParenCount.ts +1 -2
- package/src/{helpers/parser → internal}/parseParserOptions.ts +5 -5
- package/src/types/ast.ts +292 -7
- package/src/types/autocomplete.ts +5 -7
- package/src/types/parser.ts +17 -22
- package/src/utils/extractTokens.ts +16 -20
- package/src/utils/generateParentsMap.ts +60 -0
- package/src/utils/getCursorInfo.ts +4 -6
- package/src/utils/getOppositeDelimiter.ts +11 -10
- package/src/utils/getParent.ts +16 -0
- package/src/utils/getSurroundingErrors.ts +10 -9
- package/src/utils/index.ts +4 -0
- package/src/utils/isNode.ts +12 -0
- package/src/utils/isToken.ts +10 -0
- package/src/utils/prettyAst.ts +20 -17
- package/dist/ast/classes/ArrayNode.d.ts +0 -18
- package/dist/ast/classes/ArrayNode.d.ts.map +0 -1
- package/dist/ast/classes/ArrayNode.js +0 -55
- package/dist/ast/classes/Condition.d.ts +0 -13
- package/dist/ast/classes/Condition.d.ts.map +0 -1
- package/dist/ast/classes/Condition.js +0 -21
- package/dist/ast/classes/ConditionNode.d.ts +0 -73
- package/dist/ast/classes/ConditionNode.d.ts.map +0 -1
- package/dist/ast/classes/ConditionNode.js +0 -101
- package/dist/ast/classes/ErrorToken.d.ts +0 -27
- package/dist/ast/classes/ErrorToken.d.ts.map +0 -1
- package/dist/ast/classes/ErrorToken.js +0 -47
- package/dist/ast/classes/Expression.d.ts +0 -13
- package/dist/ast/classes/Expression.d.ts.map +0 -1
- package/dist/ast/classes/Expression.js +0 -19
- package/dist/ast/classes/ExpressionNode.d.ts +0 -21
- package/dist/ast/classes/ExpressionNode.d.ts.map +0 -1
- package/dist/ast/classes/ExpressionNode.js +0 -57
- package/dist/ast/classes/GroupNode.d.ts +0 -64
- package/dist/ast/classes/GroupNode.d.ts.map +0 -1
- package/dist/ast/classes/GroupNode.js +0 -69
- package/dist/ast/classes/Node.d.ts +0 -22
- package/dist/ast/classes/Node.d.ts.map +0 -1
- package/dist/ast/classes/Node.js +0 -28
- package/dist/ast/classes/Token.d.ts +0 -27
- package/dist/ast/classes/Token.d.ts.map +0 -1
- package/dist/ast/classes/Token.js +0 -28
- package/dist/ast/classes/ValidToken.d.ts +0 -26
- package/dist/ast/classes/ValidToken.d.ts.map +0 -1
- package/dist/ast/classes/ValidToken.js +0 -49
- package/dist/ast/classes/VariableNode.d.ts +0 -33
- package/dist/ast/classes/VariableNode.d.ts.map +0 -1
- package/dist/ast/classes/VariableNode.js +0 -58
- package/dist/ast/classes/index.d.ts +0 -12
- package/dist/ast/classes/index.d.ts.map +0 -1
- package/dist/ast/classes/index.js +0 -24
- package/dist/helpers/errors.d.ts.map +0 -1
- package/dist/helpers/general/applyBoolean.d.ts.map +0 -1
- package/dist/helpers/general/applyPrefix.d.ts.map +0 -1
- package/dist/helpers/general/defaultConditionNormalizer.d.ts +0 -3
- package/dist/helpers/general/defaultConditionNormalizer.d.ts.map +0 -1
- package/dist/helpers/general/defaultKeyParser.d.ts +0 -3
- package/dist/helpers/general/defaultKeyParser.d.ts.map +0 -1
- package/dist/helpers/general/defaultPrefixApplier.d.ts +0 -3
- package/dist/helpers/general/defaultPrefixApplier.d.ts.map +0 -1
- package/dist/helpers/general/defaultValueComparer.d.ts +0 -3
- package/dist/helpers/general/defaultValueComparer.d.ts.map +0 -1
- package/dist/helpers/general/index.d.ts.map +0 -1
- package/dist/helpers/index.d.ts +0 -4
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/index.js +0 -8
- package/dist/helpers/parser/assignParents.d.ts +0 -4
- package/dist/helpers/parser/assignParents.d.ts.map +0 -1
- package/dist/helpers/parser/assignParents.js +0 -71
- package/dist/helpers/parser/checkParserOpts.d.ts.map +0 -1
- package/dist/helpers/parser/extractPosition.d.ts +0 -5
- package/dist/helpers/parser/extractPosition.d.ts.map +0 -1
- package/dist/helpers/parser/getUnclosedRightParenCount.d.ts +0 -4
- package/dist/helpers/parser/getUnclosedRightParenCount.d.ts.map +0 -1
- package/dist/helpers/parser/index.d.ts +0 -9
- package/dist/helpers/parser/index.d.ts.map +0 -1
- package/dist/helpers/parser/index.js +0 -18
- package/dist/helpers/parser/parseParserOptions.d.ts.map +0 -1
- package/dist/helpers/parser/seal.d.ts +0 -8
- package/dist/helpers/parser/seal.d.ts.map +0 -1
- package/dist/helpers/parser/seal.js +0 -10
- package/dist/helpers/parser/setParent.d.ts +0 -6
- package/dist/helpers/parser/setParent.d.ts.map +0 -1
- package/dist/helpers/parser/setParent.js +0 -4
- package/dist/helpers/parser/unescape.d.ts.map +0 -1
- package/src/ast/classes/ArrayNode.ts +0 -46
- package/src/ast/classes/Condition.ts +0 -22
- package/src/ast/classes/ConditionNode.ts +0 -141
- package/src/ast/classes/ErrorToken.ts +0 -49
- package/src/ast/classes/Expression.ts +0 -26
- package/src/ast/classes/ExpressionNode.ts +0 -62
- package/src/ast/classes/GroupNode.ts +0 -127
- package/src/ast/classes/Node.ts +0 -47
- package/src/ast/classes/Token.ts +0 -59
- package/src/ast/classes/ValidToken.ts +0 -56
- package/src/ast/classes/VariableNode.ts +0 -67
- package/src/ast/classes/index.ts +0 -13
- package/src/helpers/index.ts +0 -6
- package/src/helpers/parser/assignParents.ts +0 -51
- package/src/helpers/parser/index.ts +0 -10
- package/src/helpers/parser/seal.ts +0 -14
- package/src/helpers/parser/setParent.ts +0 -5
- /package/dist/{helpers/general → defaults}/defaultConditionNormalizer.js +0 -0
- /package/dist/{helpers/general → defaults}/defaultKeyParser.js +0 -0
- /package/dist/{helpers/general → defaults}/defaultPrefixApplier.js +0 -0
- /package/dist/{helpers/general → defaults}/defaultValueComparer.js +0 -0
- /package/dist/{helpers/general → internal}/applyBoolean.d.ts +0 -0
- /package/dist/{helpers/general → internal}/applyBoolean.js +0 -0
- /package/dist/{helpers/general → internal}/applyPrefix.js +0 -0
- /package/dist/{helpers/parser → internal}/extractPosition.js +0 -0
- /package/dist/{helpers/parser → internal}/unescape.d.ts +0 -0
- /package/dist/{helpers/parser → internal}/unescape.js +0 -0
- /package/src/{helpers/general → internal}/applyBoolean.ts +0 -0
- /package/src/{helpers/parser → internal}/unescape.ts +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
var __accessCheck = (obj, member, msg) => {
|
|
8
|
-
if (!member.has(obj))
|
|
9
|
-
throw TypeError("Cannot " + msg);
|
|
10
|
-
};
|
|
11
|
-
var __privateGet = (obj, member, getter) => {
|
|
12
|
-
__accessCheck(obj, member, "read from private field");
|
|
13
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
-
};
|
|
15
|
-
var __privateAdd = (obj, member, value) => {
|
|
16
|
-
if (member.has(obj))
|
|
17
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
-
};
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
-
__accessCheck(obj, member, "write to private field");
|
|
22
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
-
return value;
|
|
24
|
-
};
|
|
25
|
-
var _parent;
|
|
26
|
-
import { Token } from "./Token.js";
|
|
27
|
-
class ErrorToken extends Token {
|
|
28
|
-
constructor({ expected, start, end }) {
|
|
29
|
-
super(start, end);
|
|
30
|
-
__publicField(this, "expected");
|
|
31
|
-
__privateAdd(this, _parent, void 0);
|
|
32
|
-
this.expected = expected;
|
|
33
|
-
}
|
|
34
|
-
get parent() {
|
|
35
|
-
return __privateGet(this, _parent);
|
|
36
|
-
}
|
|
37
|
-
set parent(value) {
|
|
38
|
-
if (__privateGet(this, _parent)) {
|
|
39
|
-
throw new Error("parent property is readonly");
|
|
40
|
-
}
|
|
41
|
-
__privateSet(this, _parent, value);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
_parent = new WeakMap();
|
|
45
|
-
export {
|
|
46
|
-
ErrorToken
|
|
47
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Condition } from "./Condition.js";
|
|
2
|
-
import type { TokenBooleanTypes } from "../../types/ast.js";
|
|
3
|
-
export declare class Expression<TType extends string = string, TValue = any> {
|
|
4
|
-
readonly left: Expression<TType, TValue> | Condition<TType, TValue>;
|
|
5
|
-
readonly right: Expression<TType, TValue> | Condition<TType, TValue>;
|
|
6
|
-
readonly operator: TokenBooleanTypes;
|
|
7
|
-
constructor({ operator, left, right }: {
|
|
8
|
-
operator: Expression<TType, TValue>["operator"];
|
|
9
|
-
right: Expression<TType, TValue>["right"];
|
|
10
|
-
left: Expression<TType, TValue>["left"];
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=Expression.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Expression.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/Expression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAG3D,qBAAa,UAAU,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,GAAG;IAClE,QAAQ,CAAC,IAAI,EACX,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GACzB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAE1B,QAAQ,CAAC,KAAK,EACZ,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GACzB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAE1B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;gBAExB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACtC,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC/C,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACzC,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;KACvC;CAKD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
class Expression {
|
|
8
|
-
constructor({ operator, left, right }) {
|
|
9
|
-
__publicField(this, "left");
|
|
10
|
-
__publicField(this, "right");
|
|
11
|
-
__publicField(this, "operator");
|
|
12
|
-
this.operator = operator;
|
|
13
|
-
this.right = right;
|
|
14
|
-
this.left = left;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
Expression
|
|
19
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ConditionNode } from "./ConditionNode.js";
|
|
2
|
-
import type { ErrorToken } from "./ErrorToken.js";
|
|
3
|
-
import type { GroupNode } from "./GroupNode.js";
|
|
4
|
-
import { Node } from "./Node.js";
|
|
5
|
-
import { type AnyToken, AST_TYPE, type TOKEN_TYPE, type TokenBooleanTypes } from "../../types/ast.js";
|
|
6
|
-
export declare class ExpressionNode<TValid extends boolean = boolean> extends Node<AST_TYPE.EXPRESSION> {
|
|
7
|
-
#private;
|
|
8
|
-
readonly operator: AnyToken<TokenBooleanTypes>;
|
|
9
|
-
readonly left: ExpressionNode<TValid> | ConditionNode<TValid> | GroupNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
10
|
-
readonly right: ExpressionNode<TValid> | ConditionNode<TValid> | GroupNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
11
|
-
get parent(): GroupNode | undefined;
|
|
12
|
-
set parent(value: GroupNode | undefined);
|
|
13
|
-
constructor({ operator, left, right, start, end }: {
|
|
14
|
-
operator: ExpressionNode<TValid>["operator"];
|
|
15
|
-
right: ExpressionNode<TValid>["right"];
|
|
16
|
-
left: ExpressionNode<TValid>["left"];
|
|
17
|
-
start: number;
|
|
18
|
-
end: number;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=ExpressionNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/ExpressionNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,KAAK,QAAQ,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAGrG,qBAAa,cAAc,CAC1B,MAAM,SAAS,OAAO,GAAG,OAAO,CAEhC,SAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;;IACjC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IAE9C,QAAQ,CAAC,IAAI,EACX,cAAc,CAAC,MAAM,CAAC,GACtB,aAAa,CAAC,MAAM,CAAC,GACrB,SAAS,CAAC,MAAM,CAAC,GACjB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAE/D,QAAQ,CAAC,KAAK,EACZ,cAAc,CAAC,MAAM,CAAC,GACtB,aAAa,CAAC,MAAM,CAAC,GACrB,SAAS,CAAC,MAAM,CAAC,GACjB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAM/D,IAAI,MAAM,IAAI,SAAS,GAAG,SAAS,CAElC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAItC;gBAEW,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAClD,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC5C,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACtC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;QACpC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAcD"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
var __accessCheck = (obj, member, msg) => {
|
|
8
|
-
if (!member.has(obj))
|
|
9
|
-
throw TypeError("Cannot " + msg);
|
|
10
|
-
};
|
|
11
|
-
var __privateGet = (obj, member, getter) => {
|
|
12
|
-
__accessCheck(obj, member, "read from private field");
|
|
13
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
-
};
|
|
15
|
-
var __privateAdd = (obj, member, value) => {
|
|
16
|
-
if (member.has(obj))
|
|
17
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
-
};
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
-
__accessCheck(obj, member, "write to private field");
|
|
22
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
-
return value;
|
|
24
|
-
};
|
|
25
|
-
var _parent, _setParent;
|
|
26
|
-
import { Node } from "./Node.js";
|
|
27
|
-
import { ValidToken } from "./ValidToken.js";
|
|
28
|
-
import { AST_TYPE } from "../../types/ast.js";
|
|
29
|
-
class ExpressionNode extends Node {
|
|
30
|
-
constructor({ operator, left, right, start, end }) {
|
|
31
|
-
super(AST_TYPE.EXPRESSION, start, end);
|
|
32
|
-
__publicField(this, "operator");
|
|
33
|
-
__publicField(this, "left");
|
|
34
|
-
__publicField(this, "right");
|
|
35
|
-
__privateAdd(this, _parent, void 0);
|
|
36
|
-
__privateAdd(this, _setParent, false);
|
|
37
|
-
this.operator = operator;
|
|
38
|
-
this.right = right;
|
|
39
|
-
this.left = left;
|
|
40
|
-
this.valid = this.operator instanceof ValidToken && this.left instanceof Node && this.left.valid && this.right instanceof Node && this.right.valid;
|
|
41
|
-
}
|
|
42
|
-
get parent() {
|
|
43
|
-
return __privateGet(this, _parent);
|
|
44
|
-
}
|
|
45
|
-
set parent(value) {
|
|
46
|
-
if (__privateGet(this, _setParent)) {
|
|
47
|
-
throw new Error("parent property is readonly");
|
|
48
|
-
}
|
|
49
|
-
__privateSet(this, _parent, value);
|
|
50
|
-
__privateSet(this, _setParent, true);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
_parent = new WeakMap();
|
|
54
|
-
_setParent = new WeakMap();
|
|
55
|
-
export {
|
|
56
|
-
ExpressionNode
|
|
57
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { ConditionNode } from "./ConditionNode.js";
|
|
2
|
-
import type { ErrorToken } from "./ErrorToken.js";
|
|
3
|
-
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
4
|
-
import { Node } from "./Node.js";
|
|
5
|
-
import { ValidToken } from "./ValidToken.js";
|
|
6
|
-
import { AST_TYPE, type NodeDelimiters, type TOKEN_TYPE } from "../../types/ast.js";
|
|
7
|
-
/**
|
|
8
|
-
* A node that symbolizes a parenthesized expression (might be negated), and if `prefixableGroups` is enabled, a prefixed expression @see ParserOptions .
|
|
9
|
-
*
|
|
10
|
-
* ```txt
|
|
11
|
-
* (a || b)
|
|
12
|
-
* |----| ExpressionNode
|
|
13
|
-
* |------| GroupNode
|
|
14
|
-
*
|
|
15
|
-
* !(a || b)
|
|
16
|
-
* ^ prefix: "not" Token
|
|
17
|
-
* |----| ExpressionNode
|
|
18
|
-
* |-------| GroupNode
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* If `prefixableGroups` is enabled:
|
|
22
|
-
* ```txt
|
|
23
|
-
* prefix(a || b)
|
|
24
|
-
* |----| prefix: ConditionNode
|
|
25
|
-
* |----| ExpressionNode
|
|
26
|
-
* |------------| GroupNode
|
|
27
|
-
*
|
|
28
|
-
* !prefix(a || b)
|
|
29
|
-
* |-----| prefix: ConditionNode
|
|
30
|
-
* |----| ExpressionNode
|
|
31
|
-
* |-------------| GroupNode
|
|
32
|
-
*
|
|
33
|
-
* !(a || b)
|
|
34
|
-
* ^ prefix: STILL a "not" Token
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare class GroupNode<TValid extends boolean = boolean, TPrefixable extends boolean = true, TPrefix extends TPrefixable extends true ? ConditionNode<TValid> | ValidToken<TOKEN_TYPE.NOT> | undefined : ValidToken<TOKEN_TYPE.NOT> | undefined = TPrefixable extends true ? ConditionNode<TValid> | ValidToken<TOKEN_TYPE.NOT> | undefined : ValidToken<TOKEN_TYPE.NOT>> extends Node<AST_TYPE.GROUP> {
|
|
38
|
-
#private;
|
|
39
|
-
/**
|
|
40
|
-
* If the condition is negated this will contain a "not" **token**, @see ValidToken .
|
|
41
|
-
*
|
|
42
|
-
* If `prefixableGroups` is enabled and the group is prefixed by a **condition**, this will be an @see ConditionNode.
|
|
43
|
-
*
|
|
44
|
-
* **Careful:** `!(a)` here this would not be a **condition** since it's just a regular negation.
|
|
45
|
-
*
|
|
46
|
-
* See examples at @see GroupNode .
|
|
47
|
-
*/
|
|
48
|
-
readonly prefix: TPrefix;
|
|
49
|
-
expression: ConditionNode<TValid> | GroupNode<TValid> | ExpressionNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
50
|
-
/**
|
|
51
|
-
* The parenthesis tokens, @see ValidToken . These will always be defined (although not necessarily with valid tokens).
|
|
52
|
-
*/
|
|
53
|
-
readonly paren: NodeDelimiters<TOKEN_TYPE.PARENL, TOKEN_TYPE.PARENR>;
|
|
54
|
-
get parent(): ExpressionNode | undefined;
|
|
55
|
-
set parent(value: ExpressionNode | undefined);
|
|
56
|
-
constructor({ prefix, expression, paren, start, end }: {
|
|
57
|
-
prefix: TPrefix;
|
|
58
|
-
expression: GroupNode<TValid>["expression"];
|
|
59
|
-
paren: GroupNode<TValid>["paren"];
|
|
60
|
-
start: number;
|
|
61
|
-
end: number;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=GroupNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/GroupNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,qBAAa,SAAS,CACrB,MAAM,SAAS,OAAO,GAAG,OAAO,EAChC,WAAW,SAAS,OAAO,GAAG,IAAI,EAClC,OAAO,SACN,WAAW,SAAS,IAAI,GACrB,aAAa,CAAC,MAAM,CAAC,GACvB,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC1B,SAAS,GACP,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC5B,SAAS,GACV,WAAW,SAAS,IAAI,GACrB,aAAa,CAAC,MAAM,CAAC,GACvB,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC1B,SAAS,GACP,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAE9B,SAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAC5B;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IAExB,UAAU,EACR,aAAa,CAAC,MAAM,CAAC,GACrB,SAAS,CAAC,MAAM,CAAC,GACjB,cAAc,CAAC,MAAM,CAAC,GACtB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAE/D;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IAMpE,IAAI,MAAM,IAAI,cAAc,GAAG,SAAS,CAEvC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,EAI3C;gBAEW,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACtD,MAAM,EAAE,OAAO,CAAA;QACf,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAA;QAC3C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACjC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CA0BD"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
var __accessCheck = (obj, member, msg) => {
|
|
8
|
-
if (!member.has(obj))
|
|
9
|
-
throw TypeError("Cannot " + msg);
|
|
10
|
-
};
|
|
11
|
-
var __privateGet = (obj, member, getter) => {
|
|
12
|
-
__accessCheck(obj, member, "read from private field");
|
|
13
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
-
};
|
|
15
|
-
var __privateAdd = (obj, member, value) => {
|
|
16
|
-
if (member.has(obj))
|
|
17
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
-
};
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
-
__accessCheck(obj, member, "write to private field");
|
|
22
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
-
return value;
|
|
24
|
-
};
|
|
25
|
-
var _parent, _setParent;
|
|
26
|
-
import { Node } from "./Node.js";
|
|
27
|
-
import { ValidToken } from "./ValidToken.js";
|
|
28
|
-
import { AST_TYPE } from "../../types/ast.js";
|
|
29
|
-
class GroupNode extends Node {
|
|
30
|
-
constructor({ prefix, expression, paren, start, end }) {
|
|
31
|
-
super(AST_TYPE.GROUP, start, end);
|
|
32
|
-
/**
|
|
33
|
-
* If the condition is negated this will contain a "not" **token**, @see ValidToken .
|
|
34
|
-
*
|
|
35
|
-
* If `prefixableGroups` is enabled and the group is prefixed by a **condition**, this will be an @see ConditionNode.
|
|
36
|
-
*
|
|
37
|
-
* **Careful:** `!(a)` here this would not be a **condition** since it's just a regular negation.
|
|
38
|
-
*
|
|
39
|
-
* See examples at @see GroupNode .
|
|
40
|
-
*/
|
|
41
|
-
__publicField(this, "prefix");
|
|
42
|
-
__publicField(this, "expression");
|
|
43
|
-
/**
|
|
44
|
-
* The parenthesis tokens, @see ValidToken . These will always be defined (although not necessarily with valid tokens).
|
|
45
|
-
*/
|
|
46
|
-
__publicField(this, "paren");
|
|
47
|
-
__privateAdd(this, _parent, void 0);
|
|
48
|
-
__privateAdd(this, _setParent, false);
|
|
49
|
-
this.prefix = prefix;
|
|
50
|
-
this.expression = expression;
|
|
51
|
-
this.paren = paren;
|
|
52
|
-
this.valid = (this.prefix === void 0 || this.prefix instanceof ValidToken || this.prefix instanceof Node && this.prefix.valid) && this.expression instanceof Node && this.expression.valid && (this.paren === void 0 || this.paren.left instanceof ValidToken && this.paren.right instanceof ValidToken);
|
|
53
|
-
}
|
|
54
|
-
get parent() {
|
|
55
|
-
return __privateGet(this, _parent);
|
|
56
|
-
}
|
|
57
|
-
set parent(value) {
|
|
58
|
-
if (__privateGet(this, _setParent)) {
|
|
59
|
-
throw new Error("parent property is readonly");
|
|
60
|
-
}
|
|
61
|
-
__privateSet(this, _parent, value);
|
|
62
|
-
__privateSet(this, _setParent, true);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
_parent = new WeakMap();
|
|
66
|
-
_setParent = new WeakMap();
|
|
67
|
-
export {
|
|
68
|
-
GroupNode
|
|
69
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ArrayNode } from "./ArrayNode.js";
|
|
2
|
-
import type { ConditionNode } from "./ConditionNode.js";
|
|
3
|
-
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
4
|
-
import type { GroupNode } from "./GroupNode.js";
|
|
5
|
-
import type { AST_TYPE } from "../../types/ast.js";
|
|
6
|
-
/**
|
|
7
|
-
* The base AST node class all node types extend from. Can be used to check if an object is an ast node.
|
|
8
|
-
* ```ts
|
|
9
|
-
* if (group.prefix instanceof Node) {
|
|
10
|
-
* //...
|
|
11
|
-
* }
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare class Node<TType extends AST_TYPE = AST_TYPE, TValid extends boolean = boolean> {
|
|
15
|
-
readonly type: TType;
|
|
16
|
-
readonly start: number;
|
|
17
|
-
readonly end: number;
|
|
18
|
-
readonly valid: TValid;
|
|
19
|
-
get parent(): ConditionNode | GroupNode | ExpressionNode | ArrayNode | undefined;
|
|
20
|
-
constructor(type: TType, start: number, end: number);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=Node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/Node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAGlD;;;;;;;GAOG;AACH,qBAAa,IAAI,CAChB,KAAK,SAAS,QAAQ,GAAG,QAAQ,EACjC,MAAM,SAAS,OAAO,GAAG,OAAO;IAEhC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IAEpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAEtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IAEpB,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAA;IAEvB,IAAI,MAAM,IACV,aAAa,GACb,SAAS,GACT,cAAc,GACd,SAAS,GACT,SAAS,CAER;gBAEW,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAQnD"}
|
package/dist/ast/classes/Node.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { BooleanParserLibraryError } from "../../helpers/errors.js";
|
|
8
|
-
import { ERROR_CODES } from "../../types/errors.js";
|
|
9
|
-
class Node {
|
|
10
|
-
constructor(type, start, end) {
|
|
11
|
-
__publicField(this, "type");
|
|
12
|
-
__publicField(this, "start");
|
|
13
|
-
__publicField(this, "end");
|
|
14
|
-
__publicField(this, "valid");
|
|
15
|
-
this.type = type;
|
|
16
|
-
if (start === void 0 || end === void 0) {
|
|
17
|
-
throw new BooleanParserLibraryError(ERROR_CODES.PARSER_POSITION_ERROR, { start, end });
|
|
18
|
-
}
|
|
19
|
-
this.start = start;
|
|
20
|
-
this.end = end;
|
|
21
|
-
}
|
|
22
|
-
get parent() {
|
|
23
|
-
return void 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
Node
|
|
28
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ArrayNode } from "./ArrayNode.js";
|
|
2
|
-
import type { ConditionNode } from "./ConditionNode.js";
|
|
3
|
-
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
4
|
-
import type { GroupNode } from "./GroupNode.js";
|
|
5
|
-
import type { VariableNode } from "./VariableNode.js";
|
|
6
|
-
import type { TOKEN_TYPE } from "../../types/ast.js";
|
|
7
|
-
/**
|
|
8
|
-
* The base class from which @see ValidToken and @see ErrorToken extend.
|
|
9
|
-
*
|
|
10
|
-
* Mostly for internal use, and I would suggest using @see AnyToken instead of this for typing things, but can be used to check whether an object is a token:
|
|
11
|
-
* ```ts
|
|
12
|
-
* if (group.prefix instanceof Token) {
|
|
13
|
-
* //...
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
* Only really takes care of setting the start/end position.
|
|
17
|
-
*/
|
|
18
|
-
export declare class Token<TValid extends boolean = boolean, TType extends TValid extends true ? TOKEN_TYPE : never = TValid extends true ? TOKEN_TYPE : never, TValue extends TValid extends true ? string : never = TValid extends true ? string : never, TExpected extends TValid extends false ? TOKEN_TYPE[] : never = TValid extends false ? TOKEN_TYPE[] : never> {
|
|
19
|
-
readonly type: TType;
|
|
20
|
-
readonly value: TValue;
|
|
21
|
-
readonly expected: TExpected;
|
|
22
|
-
readonly start: number;
|
|
23
|
-
readonly end: number;
|
|
24
|
-
get parent(): VariableNode | GroupNode | ExpressionNode | ArrayNode | ConditionNode;
|
|
25
|
-
constructor(start: number, end: number);
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=Token.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/Token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD;;;;;;;;;;GAUG;AACH,qBAAa,KAAK,CACjB,MAAM,SAAS,OAAO,GAAG,OAAO,EAChC,KAAK,SACJ,MAAM,SAAS,IAAI,GAAG,UAAU,GAAG,KAAK,GACxC,MAAM,SAAS,IAAI,GAAG,UAAU,GAAG,KAAK,EACzC,MAAM,SACL,MAAM,SAAS,IAAI,GAAG,MAAM,GAAG,KAAK,GACpC,MAAM,SAAS,IAAI,GAAG,MAAM,GAAG,KAAK,EACrC,SAAS,SACR,MAAM,SAAS,KAAK,GAAG,UAAU,EAAE,GAAG,KAAK,GAC3C,MAAM,SAAS,KAAK,GAAG,UAAU,EAAE,GAAG,KAAK;IAE5C,QAAQ,CAAC,IAAI,EAAG,KAAK,CAAA;IAErB,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAA;IAEvB,QAAQ,CAAC,QAAQ,EAAG,SAAS,CAAA;IAE7B,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAA;IAEvB,QAAQ,CAAC,GAAG,EAAG,MAAM,CAAA;IAErB,IAAI,MAAM,IAAI,YAAY,GAC1B,SAAS,GACT,cAAc,GACd,SAAS,GACT,aAAa,CAEZ;gBAEW,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAOtC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { BooleanParserLibraryError } from "../../helpers/errors.js";
|
|
8
|
-
import { ERROR_CODES } from "../../types/errors.js";
|
|
9
|
-
class Token {
|
|
10
|
-
constructor(start, end) {
|
|
11
|
-
__publicField(this, "type");
|
|
12
|
-
__publicField(this, "value");
|
|
13
|
-
__publicField(this, "expected");
|
|
14
|
-
__publicField(this, "start");
|
|
15
|
-
__publicField(this, "end");
|
|
16
|
-
if (start === void 0 || end === void 0) {
|
|
17
|
-
throw new BooleanParserLibraryError(ERROR_CODES.PARSER_POSITION_ERROR, { start, end });
|
|
18
|
-
}
|
|
19
|
-
this.start = start;
|
|
20
|
-
this.end = end;
|
|
21
|
-
}
|
|
22
|
-
get parent() {
|
|
23
|
-
return void 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
Token
|
|
28
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ArrayNode } from "./ArrayNode.js";
|
|
2
|
-
import type { ConditionNode } from "./ConditionNode.js";
|
|
3
|
-
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
4
|
-
import type { GroupNode } from "./GroupNode.js";
|
|
5
|
-
import { Token } from "./Token.js";
|
|
6
|
-
import type { VariableNode } from "./VariableNode.js";
|
|
7
|
-
import type { TOKEN_TYPE } from "../../types/ast.js";
|
|
8
|
-
/**
|
|
9
|
-
* The class for all *valid* tokens.
|
|
10
|
-
*
|
|
11
|
-
* Valid tokens always have a value, even if it might be an empty string.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ValidToken<TType extends TOKEN_TYPE = TOKEN_TYPE> extends Token<true, TType, string, never> {
|
|
14
|
-
#private;
|
|
15
|
-
readonly type: TType;
|
|
16
|
-
readonly value: string;
|
|
17
|
-
get parent(): VariableNode | GroupNode | ExpressionNode | ConditionNode | ArrayNode;
|
|
18
|
-
set parent(value: VariableNode | GroupNode | ExpressionNode | ConditionNode | ArrayNode);
|
|
19
|
-
constructor({ type, value, start, end }: {
|
|
20
|
-
type: TType;
|
|
21
|
-
value: string;
|
|
22
|
-
start: number;
|
|
23
|
-
end: number;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=ValidToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValidToken.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/ValidToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD;;;;GAIG;AACH,qBAAa,UAAU,CACtB,KAAK,SAAS,UAAU,GAAG,UAAU,CACpC,SAAQ,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;;IAC1C,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IAEpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAItB,IAAI,MAAM,IACR,YAAY,GACZ,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,CAEV;IAED,IAAI,MAAM,CAAC,KAAK,EACd,YAAY,GACZ,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,EAIV;gBAEW,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACxC,IAAI,EAAE,KAAK,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAMD"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
var __accessCheck = (obj, member, msg) => {
|
|
8
|
-
if (!member.has(obj))
|
|
9
|
-
throw TypeError("Cannot " + msg);
|
|
10
|
-
};
|
|
11
|
-
var __privateGet = (obj, member, getter) => {
|
|
12
|
-
__accessCheck(obj, member, "read from private field");
|
|
13
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
-
};
|
|
15
|
-
var __privateAdd = (obj, member, value) => {
|
|
16
|
-
if (member.has(obj))
|
|
17
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
-
};
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
-
__accessCheck(obj, member, "write to private field");
|
|
22
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
-
return value;
|
|
24
|
-
};
|
|
25
|
-
var _parent;
|
|
26
|
-
import { Token } from "./Token.js";
|
|
27
|
-
class ValidToken extends Token {
|
|
28
|
-
constructor({ type, value, start, end }) {
|
|
29
|
-
super(start, end);
|
|
30
|
-
__publicField(this, "type");
|
|
31
|
-
__publicField(this, "value");
|
|
32
|
-
__privateAdd(this, _parent, void 0);
|
|
33
|
-
this.type = type;
|
|
34
|
-
this.value = value;
|
|
35
|
-
}
|
|
36
|
-
get parent() {
|
|
37
|
-
return __privateGet(this, _parent);
|
|
38
|
-
}
|
|
39
|
-
set parent(value) {
|
|
40
|
-
if (__privateGet(this, _parent)) {
|
|
41
|
-
throw new Error("parent property is readonly");
|
|
42
|
-
}
|
|
43
|
-
__privateSet(this, _parent, value);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
_parent = new WeakMap();
|
|
47
|
-
export {
|
|
48
|
-
ValidToken
|
|
49
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ArrayNode } from "./ArrayNode.js";
|
|
2
|
-
import type { ConditionNode } from "./ConditionNode.js";
|
|
3
|
-
import type { ErrorToken } from "./ErrorToken.js";
|
|
4
|
-
import { Node } from "./Node.js";
|
|
5
|
-
import { ValidToken } from "./ValidToken.js";
|
|
6
|
-
import { type AnyToken, AST_TYPE, type NodeDelimiters, type TOKEN_TYPE, type TokenQuoteTypes } from "../../types/ast.js";
|
|
7
|
-
/**
|
|
8
|
-
* A variable represents **just** a string value (NOT it's boolean value).
|
|
9
|
-
*
|
|
10
|
-
* The parser will never return just a variable, they are always wrapped in an @see ConditionNode to give them a boolean value.
|
|
11
|
-
*
|
|
12
|
-
* A variable might or might not be quoted. If it is, the `quote` property will contain the quote tokens, @see ValidToken . While they will always be of the same quote type, one might be valid while the other might not (@see ErrorToken).
|
|
13
|
-
*
|
|
14
|
-
* `value` will contain the string value of the variable. The text is not processed and might still contain escaped characters (even if unquoted!) that need to be removed to get the intended value. This is so that the position of the node is accurate. @see evaluate will take care of unescaping when needed.
|
|
15
|
-
*
|
|
16
|
-
* If `prefixableStrings` is true, the `prefix` property might contain a value token.
|
|
17
|
-
*/
|
|
18
|
-
export declare class VariableNode<TValid extends boolean = boolean> extends Node<AST_TYPE.VARIABLE, TValid> {
|
|
19
|
-
#private;
|
|
20
|
-
readonly value: TValid extends boolean ? AnyToken<TOKEN_TYPE.VALUE> : TValid extends true ? ValidToken<TOKEN_TYPE.VALUE> : ErrorToken<TOKEN_TYPE.VALUE>;
|
|
21
|
-
readonly prefix?: ValidToken<TOKEN_TYPE.VALUE>;
|
|
22
|
-
readonly quote?: NodeDelimiters<TokenQuoteTypes, TokenQuoteTypes>;
|
|
23
|
-
get parent(): ConditionNode | ArrayNode | undefined;
|
|
24
|
-
set parent(value: ConditionNode | ArrayNode | undefined);
|
|
25
|
-
constructor({ prefix, value, quote, start, end }: {
|
|
26
|
-
prefix?: VariableNode<TValid>["prefix"];
|
|
27
|
-
value: VariableNode<TValid>["value"];
|
|
28
|
-
quote?: VariableNode<TValid>["quote"];
|
|
29
|
-
start: number;
|
|
30
|
-
end: number;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=VariableNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariableNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/VariableNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,KAAK,QAAQ,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAExH;;;;;;;;;;GAUG;AACH,qBAAa,YAAY,CACxB,MAAM,SAAS,OAAO,GAAG,OAAO,CAC/B,SAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,SAAS,OAAO,GACnC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,GAC1B,MAAM,SAAS,IAAI,GACnB,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAC7B,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAE9B,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAE9C,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,eAAe,EAAE,eAAe,CAAC,CAAA;IAMjE,IAAI,MAAM,IAAI,aAAa,GAAG,SAAS,GAAG,SAAS,CAElD;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,SAAS,EAItD;gBAEW,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACjD,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAA;QACvC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACpC,KAAK,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACrC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAcD"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
var __accessCheck = (obj, member, msg) => {
|
|
8
|
-
if (!member.has(obj))
|
|
9
|
-
throw TypeError("Cannot " + msg);
|
|
10
|
-
};
|
|
11
|
-
var __privateGet = (obj, member, getter) => {
|
|
12
|
-
__accessCheck(obj, member, "read from private field");
|
|
13
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
-
};
|
|
15
|
-
var __privateAdd = (obj, member, value) => {
|
|
16
|
-
if (member.has(obj))
|
|
17
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
-
};
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
-
__accessCheck(obj, member, "write to private field");
|
|
22
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
-
return value;
|
|
24
|
-
};
|
|
25
|
-
var _parent, _setParent;
|
|
26
|
-
import { Node } from "./Node.js";
|
|
27
|
-
import { ValidToken } from "./ValidToken.js";
|
|
28
|
-
import { AST_TYPE } from "../../types/ast.js";
|
|
29
|
-
class VariableNode extends Node {
|
|
30
|
-
constructor({ prefix, value, quote, start, end }) {
|
|
31
|
-
super(AST_TYPE.VARIABLE, start, end);
|
|
32
|
-
__publicField(this, "value");
|
|
33
|
-
__publicField(this, "prefix");
|
|
34
|
-
// todo
|
|
35
|
-
__publicField(this, "quote");
|
|
36
|
-
__privateAdd(this, _parent, void 0);
|
|
37
|
-
__privateAdd(this, _setParent, false);
|
|
38
|
-
this.prefix = prefix;
|
|
39
|
-
this.value = value;
|
|
40
|
-
this.quote = quote;
|
|
41
|
-
this.valid = this.value instanceof ValidToken && (this.quote === void 0 || this.quote.left instanceof ValidToken && this.quote.right instanceof ValidToken);
|
|
42
|
-
}
|
|
43
|
-
get parent() {
|
|
44
|
-
return __privateGet(this, _parent);
|
|
45
|
-
}
|
|
46
|
-
set parent(value) {
|
|
47
|
-
if (__privateGet(this, _setParent)) {
|
|
48
|
-
throw new Error("parent property is readonly");
|
|
49
|
-
}
|
|
50
|
-
__privateSet(this, _parent, value);
|
|
51
|
-
__privateSet(this, _setParent, true);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
_parent = new WeakMap();
|
|
55
|
-
_setParent = new WeakMap();
|
|
56
|
-
export {
|
|
57
|
-
VariableNode
|
|
58
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { ArrayNode } from "./ArrayNode.js";
|
|
2
|
-
export { Condition } from "./Condition.js";
|
|
3
|
-
export { ConditionNode } from "./ConditionNode.js";
|
|
4
|
-
export { ErrorToken } from "./ErrorToken.js";
|
|
5
|
-
export { Expression } from "./Expression.js";
|
|
6
|
-
export { ExpressionNode } from "./ExpressionNode.js";
|
|
7
|
-
export { GroupNode } from "./GroupNode.js";
|
|
8
|
-
export { Node } from "./Node.js";
|
|
9
|
-
export { Token } from "./Token.js";
|
|
10
|
-
export { ValidToken } from "./ValidToken.js";
|
|
11
|
-
export { VariableNode } from "./VariableNode.js";
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ArrayNode } from "./ArrayNode.js";
|
|
2
|
-
import { Condition } from "./Condition.js";
|
|
3
|
-
import { ConditionNode } from "./ConditionNode.js";
|
|
4
|
-
import { ErrorToken } from "./ErrorToken.js";
|
|
5
|
-
import { Expression } from "./Expression.js";
|
|
6
|
-
import { ExpressionNode } from "./ExpressionNode.js";
|
|
7
|
-
import { GroupNode } from "./GroupNode.js";
|
|
8
|
-
import { Node } from "./Node.js";
|
|
9
|
-
import { Token } from "./Token.js";
|
|
10
|
-
import { ValidToken } from "./ValidToken.js";
|
|
11
|
-
import { VariableNode } from "./VariableNode.js";
|
|
12
|
-
export {
|
|
13
|
-
ArrayNode,
|
|
14
|
-
Condition,
|
|
15
|
-
ConditionNode,
|
|
16
|
-
ErrorToken,
|
|
17
|
-
Expression,
|
|
18
|
-
ExpressionNode,
|
|
19
|
-
GroupNode,
|
|
20
|
-
Node,
|
|
21
|
-
Token,
|
|
22
|
-
ValidToken,
|
|
23
|
-
VariableNode
|
|
24
|
-
};
|