@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,20 +1,14 @@
|
|
|
1
|
-
import { type AnyToken, type TOKEN_TYPE } from "../../types/ast.js";
|
|
2
|
-
import type { ArrayNode } from "../classes/ArrayNode.js";
|
|
3
|
-
import { ConditionNode } from "../classes/ConditionNode.js";
|
|
4
|
-
import type { ErrorToken } from "../classes/ErrorToken.js";
|
|
5
|
-
import type { GroupNode } from "../classes/GroupNode.js";
|
|
6
|
-
import type { ValidToken } from "../classes/ValidToken.js";
|
|
7
|
-
import type { VariableNode } from "../classes/VariableNode.js";
|
|
1
|
+
import { type AnyToken, type ArrayNode, type ConditionNode, type ErrorToken, type GroupNode, type TOKEN_TYPE, type ValidToken, type VariableNode } from "../../types/ast.js";
|
|
8
2
|
/**
|
|
9
|
-
* Creates a @
|
|
3
|
+
* Creates a {@link ConditionNode}
|
|
10
4
|
*
|
|
11
|
-
* @param variable An existing @
|
|
5
|
+
* @param variable An existing {@link VariableNode}
|
|
12
6
|
*
|
|
13
|
-
* @param not Defaults to plain true condition. To negate it you must pass an existing "not" operator @
|
|
7
|
+
* @param not Defaults to plain true condition. To negate it you must pass an existing "not" operator {@link ValidToken} which will be set as the node's operator and set the node's value to false.
|
|
14
8
|
*
|
|
15
9
|
* @param property Set the property for a property operator. A property operator must be passed if this is passed.
|
|
16
10
|
* @param propertyOperator Set the operator for a property condition. A property must have been passed. The property operator must be a valid token. There is no case where it would not be. If using an operator that is the same as a separator, if used as an operator, should be set as an operator.
|
|
17
11
|
* @param sep Pass separator tokens for expanded property conditions.
|
|
18
12
|
*/
|
|
19
|
-
export declare function condition(value: VariableNode | GroupNode | ArrayNode | ErrorToken
|
|
13
|
+
export declare function condition(value: VariableNode | GroupNode | ArrayNode | ErrorToken, not?: true | ValidToken<TOKEN_TYPE.NOT>, property?: VariableNode | ErrorToken, propertyOperator?: AnyToken<TOKEN_TYPE.OP_CUSTOM | TOKEN_TYPE.VALUE>, { right, left }?: Partial<Record<"right" | "left", ValidToken<TOKEN_TYPE.OP_EXPANDED_SEP>>>): ConditionNode;
|
|
20
14
|
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/condition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/condition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAmB,KAAK,SAAS,EAAiB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG5M;;;;;;;;;;GAUG;AAEH,wBAAgB,SAAS,CACxB,KAAK,EACH,YAAY,GACZ,SAAS,GACT,SAAS,GACT,UAAU,EACZ,GAAG,GAAE,IAAI,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG,CAAQ,EAC7C,QAAQ,CAAC,EAAE,YAAY,GAAG,UAAU,EACpC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EACpE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAE,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAO,GAC9F,aAAa,CAsBf"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pos } from "./pos.js";
|
|
2
|
-
import {
|
|
2
|
+
import { createConditionNode } from "../createConditionNode.js";
|
|
3
3
|
function condition(value, not = true, property, propertyOperator, { right, left } = {}) {
|
|
4
4
|
const position = pos(value);
|
|
5
5
|
const notStart = not === true ? void 0 : not.start;
|
|
@@ -20,8 +20,7 @@ function condition(value, not = true, property, propertyOperator, { right, left
|
|
|
20
20
|
if (left)
|
|
21
21
|
node.sep.left = left;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
return instance;
|
|
23
|
+
return createConditionNode(node);
|
|
25
24
|
}
|
|
26
25
|
export {
|
|
27
26
|
condition
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExtractTokenType } from "../../types/ast.js";
|
|
2
2
|
/**
|
|
3
|
-
* Faster way, more intuitive way to generate the options for matching delimiters (e.g. quotes and parens) for functions like @
|
|
3
|
+
* Faster way, more intuitive way to generate the options for matching delimiters (e.g. quotes and parens) for functions like {@link variable} and {@link group} .
|
|
4
4
|
*/
|
|
5
5
|
export declare function delim<TLeft extends boolean | string, TRight extends boolean | string, TType extends TLeft extends string ? ExtractTokenType<TLeft> : TRight extends string ? ExtractTokenType<TRight> : undefined>(left?: TLeft, right?: TRight): {
|
|
6
6
|
left: TLeft extends string ? true : TLeft;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { TOKEN_TYPE } from "../../types/ast.js";
|
|
2
|
-
import { ErrorToken } from "../classes/ErrorToken.js";
|
|
1
|
+
import { type ErrorToken, TOKEN_TYPE } from "../../types/ast.js";
|
|
3
2
|
/**
|
|
4
3
|
* Creates an error token.
|
|
5
4
|
*
|
|
6
|
-
* @param expected Can be passed an array of @
|
|
5
|
+
* @param expected Can be passed an array of {@link ValidToken_TYPE} or strings, in which case it will use {@link type} internally. So instead of `[TOKEN_TYPE.VALUE]` we can do `[""]` and instead of `[TOKEN_TYPE.PARENR]` we can do `[")"]`.
|
|
7
6
|
*/
|
|
8
|
-
export declare function error<T extends TOKEN_TYPE>(pos: number, expected: T[]): ErrorToken
|
|
7
|
+
export declare function error<T extends TOKEN_TYPE>(pos: number, expected: T[]): ErrorToken;
|
|
9
8
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/error.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/error.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAC,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/D;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,UAAU,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type } from "./type.js";
|
|
2
2
|
import { TOKEN_TYPE } from "../../types/ast.js";
|
|
3
|
-
import {
|
|
3
|
+
import { createToken } from "../createToken.js";
|
|
4
4
|
function error(pos, expected_) {
|
|
5
5
|
const expected = expected_.map((item) => {
|
|
6
6
|
if (TOKEN_TYPE[item] === void 0) {
|
|
@@ -9,7 +9,11 @@ function error(pos, expected_) {
|
|
|
9
9
|
return item;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
return
|
|
12
|
+
return createToken({
|
|
13
|
+
expected,
|
|
14
|
+
start: pos,
|
|
15
|
+
end: pos
|
|
16
|
+
});
|
|
13
17
|
}
|
|
14
18
|
export {
|
|
15
19
|
error
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { type AnyToken,
|
|
2
|
-
import type { ConditionNode } from "../classes/ConditionNode.js";
|
|
3
|
-
import type { ErrorToken } from "../classes/ErrorToken.js";
|
|
4
|
-
import { ExpressionNode } from "../classes/ExpressionNode.js";
|
|
5
|
-
import type { GroupNode } from "../classes/GroupNode.js";
|
|
1
|
+
import { type AnyToken, type ConditionNode, type ErrorToken, type ExpressionNode, type GroupNode, type TokenBooleanTypes } from "../../types/ast.js";
|
|
6
2
|
/**
|
|
7
|
-
* Creates an @
|
|
3
|
+
* Creates an {@link ExpressionNode}, can be passed nothing for any of the tokens to automatically create error tokens.
|
|
8
4
|
*
|
|
9
5
|
* Also automatically sets the correct start/end positions from valid tokens (e.g. for start, searching left to right for a valid token and vice versa) assuming at least one is defined.
|
|
10
6
|
*/
|
|
11
|
-
export declare function expression(left: ConditionNode | ExpressionNode | GroupNode | ErrorToken
|
|
7
|
+
export declare function expression(left: ConditionNode | ExpressionNode | GroupNode | ErrorToken | undefined, operator: AnyToken<TokenBooleanTypes> | undefined, right: ConditionNode | ExpressionNode | GroupNode | ErrorToken | undefined): ExpressionNode;
|
|
12
8
|
//# sourceMappingURL=expression.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/expression.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"expression.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/expression.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAC,KAAK,SAAS,EAA6B,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAI9K;;;;GAIG;AACH,wBAAgB,UAAU,CACzB,IAAI,EACH,aAAa,GACb,cAAc,GACd,SAAS,GACT,UAAU,GACV,SAAS,EACV,QAAQ,EACP,QAAQ,CAAC,iBAAiB,CAAC,GAC3B,SAAS,EACV,KAAK,EACJ,aAAa,GACb,cAAc,GACd,SAAS,GACT,UAAU,GACV,SAAS,GACR,cAAc,CA+BhB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pos } from "./pos.js";
|
|
2
2
|
import { token } from "./token.js";
|
|
3
3
|
import { TOKEN_TYPE } from "../../types/ast.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createExpressionNode } from "../createExpressionNode.js";
|
|
5
5
|
function expression(left, operator, right) {
|
|
6
6
|
const start = (left == null ? void 0 : left.start) ?? (operator == null ? void 0 : operator.start) ?? (right == null ? void 0 : right.start);
|
|
7
7
|
const end = (right == null ? void 0 : right.end) ?? (operator == null ? void 0 : operator.end) ?? (left == null ? void 0 : left.end);
|
|
@@ -17,14 +17,12 @@ function expression(left, operator, right) {
|
|
|
17
17
|
if (right === void 0) {
|
|
18
18
|
right = token(TOKEN_TYPE.VALUE, void 0, { start: op.end });
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
return createExpressionNode({
|
|
21
21
|
left,
|
|
22
22
|
operator: op,
|
|
23
23
|
right,
|
|
24
24
|
...position
|
|
25
|
-
};
|
|
26
|
-
const instance = new ExpressionNode(node);
|
|
27
|
-
return instance;
|
|
25
|
+
});
|
|
28
26
|
}
|
|
29
27
|
export {
|
|
30
28
|
expression
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { type Position, TOKEN_TYPE } from "../../types/ast.js";
|
|
2
|
-
import type { ConditionNode } from "../classes/ConditionNode.js";
|
|
3
|
-
import type { ErrorToken } from "../classes/ErrorToken.js";
|
|
4
|
-
import type { ExpressionNode } from "../classes/ExpressionNode.js";
|
|
5
|
-
import { GroupNode } from "../classes/GroupNode.js";
|
|
6
|
-
import type { ValidToken } from "../classes/ValidToken.js";
|
|
1
|
+
import { type ConditionNode, type ErrorToken, type ExpressionNode, type GroupNode, type Position, TOKEN_TYPE, type ValidToken } from "../../types/ast.js";
|
|
7
2
|
/**
|
|
8
3
|
* Creates a group.
|
|
9
4
|
*
|
|
10
5
|
* Automatically creates error tokens if missing condition or parens (not prefix because it is optional). Will look at the position of prefix if available.
|
|
11
6
|
*
|
|
12
|
-
* @param paren Use to add parens to group, usually by using @
|
|
7
|
+
* @param paren Use to add parens to group, usually by using {@link delim} . If either `right` or `left` are false or undefined, error tokens will be created. Unlike {@link variable}, if undefined is passed for parens, parens are created by default.
|
|
13
8
|
*
|
|
14
9
|
* The positions of the parens can be adjusted with the last two parameters by passing positions.
|
|
15
10
|
*/
|
|
16
|
-
export declare function group(prefix: ConditionNode | ValidToken<TOKEN_TYPE.NOT> | undefined, expression: ConditionNode | ExpressionNode | GroupNode | ErrorToken
|
|
11
|
+
export declare function group(prefix: ConditionNode | ValidToken<TOKEN_TYPE.NOT> | undefined, expression: ConditionNode | ExpressionNode | GroupNode | ErrorToken | undefined, paren?: {
|
|
17
12
|
left?: boolean;
|
|
18
13
|
right?: boolean;
|
|
19
14
|
}, parenLeftPos?: Position, parenRightPos?: Position): GroupNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/group.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/group.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAkB,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGzK;;;;;;;;GAQG;AAEH,wBAAgB,KAAK,CACpB,MAAM,EACJ,aAAa,GACb,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC1B,SAAS,EAEX,UAAU,EACR,aAAa,GACb,cAAc,GACd,SAAS,GACT,UAAU,GACV,SAAS,EAEX,KAAK,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAgC,EACxE,YAAY,CAAC,EAAE,QAAQ,EACvB,aAAa,CAAC,EAAE,QAAQ,GACtB,SAAS,CA2CX"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { token } from "./token.js";
|
|
2
2
|
import { TOKEN_TYPE } from "../../types/ast.js";
|
|
3
|
-
import {
|
|
3
|
+
import { createGroupNode } from "../createGroupNode.js";
|
|
4
4
|
function group(prefix, expression, paren = { right: true, left: true }, parenLeftPos, parenRightPos) {
|
|
5
5
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
6
6
|
if (expression === void 0) {
|
|
7
7
|
expression = token(TOKEN_TYPE.VALUE, void 0, (prefix == null ? void 0 : prefix.end) !== void 0 ? { start: prefix.end } : void 0);
|
|
8
8
|
}
|
|
9
9
|
const node = {
|
|
10
|
+
prefix: void 0,
|
|
10
11
|
expression
|
|
11
12
|
};
|
|
12
13
|
if (prefix) {
|
|
@@ -39,8 +40,7 @@ function group(prefix, expression, paren = { right: true, left: true }, parenLef
|
|
|
39
40
|
}
|
|
40
41
|
node.start = ((_e = node.prefix) == null ? void 0 : _e.start) ?? ((_g = (_f = node.paren) == null ? void 0 : _f.left) == null ? void 0 : _g.start) ?? ((_h = node.expression) == null ? void 0 : _h.start) ?? ((_i = node.paren) == null ? void 0 : _i.right.start);
|
|
41
42
|
node.end = ((_k = (_j = node.paren) == null ? void 0 : _j.right) == null ? void 0 : _k.end) ?? ((_l = node.expression) == null ? void 0 : _l.end) ?? ((_m = node.paren) == null ? void 0 : _m.left.end) ?? ((_n = node.prefix) == null ? void 0 : _n.end);
|
|
42
|
-
|
|
43
|
-
return instance;
|
|
43
|
+
return createGroupNode(node);
|
|
44
44
|
}
|
|
45
45
|
export {
|
|
46
46
|
group
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { AnyToken, AST_TYPE, EmptyObj, Position, TOKEN_TYPE } from "../../types/ast.js";
|
|
2
|
-
import type { Node } from "../classes/Node.js";
|
|
1
|
+
import type { AnyToken, AST_TYPE, EmptyObj, Node, Position, TOKEN_TYPE } from "../../types/ast.js";
|
|
3
2
|
/**
|
|
4
3
|
* Can either:
|
|
5
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pos.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/pos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"pos.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/pos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAElG;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,KAAK,SAAS,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,EACxE,IAAI,EAAE,KAAK,EACX,IAAI,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GAClB,KAAK,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GACjD,QAAQ,GACR,QAAQ,CAAA;AACX,wBAAgB,GAAG,CAAC,KAAK,SAAS,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,EACxE,IAAI,EAAE,KAAK,EACX,IAAI,CAAC,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAGlC,KAAK,SAAS,QAAQ,GACpB,QAAQ,GACR,KAAK,SAAS,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,QAAQ,GACxD,QAAQ,GAAG,QAAQ,GACnB,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,QAAQ,GAClD,QAAQ,GAAG,QAAQ,GACnB,QAAQ,CAAA;AACX,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { EmptyObj, Position, TOKEN_TYPE } from "../../types/ast.js";
|
|
2
|
-
import { ErrorToken } from "../classes/ErrorToken.js";
|
|
3
|
-
import { ValidToken } from "../classes/ValidToken.js";
|
|
1
|
+
import type { EmptyObj, ErrorToken, Position, TOKEN_TYPE, ValidToken } from "../../types/ast.js";
|
|
4
2
|
/**
|
|
5
|
-
* Creates a @
|
|
3
|
+
* Creates a {@link ValidToken} or of the given type with the given value. If no value is given, creates an {@link ErrorToken} instead.
|
|
6
4
|
*
|
|
7
5
|
* Can be passed multiple types when creating an error token to set the expected field.
|
|
8
6
|
*
|
|
9
7
|
* If the token is an error token, just `start` or `end` can be passed, and the other position will be filled to the same value.
|
|
10
8
|
*/
|
|
11
|
-
export declare function token<TValue extends string | undefined, TType extends TOKEN_TYPE = TOKEN_TYPE>(type: TValue extends undefined ? TType | TType[] : TType, value: TValue, position?: Position | Partial<Position> | EmptyObj): TValue extends undefined ? ErrorToken
|
|
9
|
+
export declare function token<TValue extends string | undefined, TType extends TOKEN_TYPE = TOKEN_TYPE>(type: TValue extends undefined ? TType | TType[] : TType, value: TValue, position?: Position | Partial<Position> | EmptyObj): TValue extends undefined ? ErrorToken : ValidToken<TType>;
|
|
12
10
|
//# sourceMappingURL=token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/token.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAY,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/token.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAY,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI1G;;;;;;GAMG;AAEH,wBAAgB,KAAK,CACpB,MAAM,SAAS,MAAM,GAAG,SAAS,EACjC,KAAK,SAAS,UAAU,GAAG,UAAU,EAErC,IAAI,EAAE,MAAM,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK,EAAE,GAAG,KAAK,EACxD,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAa,GACpD,MAAM,SAAS,SAAS,GACxB,UAAU,GACV,UAAU,CAAC,KAAK,CAAC,CAmBnB"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { isArray } from "@alanscodelog/utils/isArray.js";
|
|
2
2
|
import { pos } from "./pos.js";
|
|
3
|
-
import {
|
|
4
|
-
import { ValidToken } from "../classes/ValidToken.js";
|
|
3
|
+
import { createToken } from "../createToken.js";
|
|
5
4
|
function token(type, value, position = {}) {
|
|
6
5
|
position = pos(position, { fill: true });
|
|
7
6
|
let token2;
|
|
8
7
|
if (value !== void 0) {
|
|
9
|
-
token2 =
|
|
8
|
+
token2 = createToken({
|
|
10
9
|
type,
|
|
11
10
|
value,
|
|
12
11
|
start: position.start,
|
|
13
12
|
end: position.end
|
|
14
13
|
});
|
|
15
14
|
} else {
|
|
16
|
-
token2 =
|
|
15
|
+
token2 = createToken({
|
|
17
16
|
expected: isArray(type) ? type : [type],
|
|
18
17
|
start: position.start,
|
|
19
18
|
end: position.end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExtractTokenType } from "../../types/ast.js";
|
|
2
2
|
/**
|
|
3
|
-
* Given a the string value of an operator or single delimiter token, returns the corresponding @
|
|
3
|
+
* Given a the string value of an operator or single delimiter token, returns the corresponding {@link ValidToken_TYPE} .
|
|
4
4
|
*/
|
|
5
5
|
export declare function type<T extends string>(operatorSymbol: T): ExtractTokenType<T>;
|
|
6
6
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { type AnyToken, type EmptyObj, type Position, TOKEN_TYPE, type TokenQuoteTypes } from "../../types/ast.js";
|
|
2
|
-
import type { ValidToken } from "../classes/ValidToken.js";
|
|
3
|
-
import { VariableNode } from "../classes/VariableNode.js";
|
|
1
|
+
import { type AnyToken, type EmptyObj, type Position, TOKEN_TYPE, type TokenQuoteTypes, type ValidToken, type VariableNode } from "../../types/ast.js";
|
|
4
2
|
/**
|
|
5
|
-
* Creates an @
|
|
3
|
+
* Creates an {@link VariableNode} .
|
|
6
4
|
*
|
|
7
|
-
* @param quote Use to add quotes to the variable, usually by using @
|
|
5
|
+
* @param quote Use to add quotes to the variable, usually by using {@link delim} . If false or undefined, no quotes are added. Otherwise at least `type` must be passed. If one side is defined but not the other, error tokens will be created with the given type.
|
|
8
6
|
*
|
|
9
7
|
* @param position Refers to position of the value (in case it needs to be created) not the node. Quote positions are automatically calculated from this if used. If value is already a token, there's no need to pass a position, it can be extracted from the token.
|
|
10
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/variable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../../src/ast/builders/variable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAkB,KAAK,QAAQ,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAItK;;;;;;GAMG;AAEH,wBAAgB,QAAQ,CACvB,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,EAChD,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAC1C,KAAK,CAAC,EAAE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAClF,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAC5B,YAAY,CAwDd"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pos } from "./pos.js";
|
|
2
2
|
import { token } from "./token.js";
|
|
3
3
|
import { TOKEN_TYPE } from "../../types/ast.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createVariableNode } from "../createVariableNode.js";
|
|
5
5
|
function variable(prefix, value, quote, position) {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
7
7
|
if (typeof value === "string") {
|
|
@@ -40,8 +40,7 @@ function variable(prefix, value, quote, position) {
|
|
|
40
40
|
}
|
|
41
41
|
node.start = ((_b = node.prefix) == null ? void 0 : _b.start) ?? ((_c = node.quote) == null ? void 0 : _c.left.start) ?? ((_d = node.value) == null ? void 0 : _d.start) ?? ((_e = node.quote) == null ? void 0 : _e.right.start);
|
|
42
42
|
node.end = ((_g = (_f = node.quote) == null ? void 0 : _f.flags) == null ? void 0 : _g.end) ?? ((_h = node.quote) == null ? void 0 : _h.right.end) ?? ((_i = node.value) == null ? void 0 : _i.end) ?? ((_j = node.quote) == null ? void 0 : _j.left.end);
|
|
43
|
-
|
|
44
|
-
return instance;
|
|
43
|
+
return createVariableNode(node);
|
|
45
44
|
}
|
|
46
45
|
function quoteFromType(type) {
|
|
47
46
|
switch (type) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createArrayNode.d.ts","sourceRoot":"","sources":["../../src/ast/createArrayNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAGxE,wBAAgB,eAAe,CAAC,MAAM,SAAS,OAAO,GAAG,OAAO,EAC/D,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAC7B,SAAS,CAAC,MAAM,CAAC,CAWnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AST_TYPE } from "../types/ast.js";
|
|
2
|
+
function createArrayNode(raw) {
|
|
3
|
+
return {
|
|
4
|
+
type: AST_TYPE.ARRAY,
|
|
5
|
+
isNode: true,
|
|
6
|
+
valid: raw.values.every((val) => val.valid) && raw.bracket.left.valid && raw.bracket.right.valid,
|
|
7
|
+
...raw
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
createArrayNode
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ConditionNode, type TOKEN_TYPE, type ValidToken } from "../types/ast.js";
|
|
2
|
+
export declare function createConditionNode<TValid extends boolean = boolean, TOperator extends ValidToken<TOKEN_TYPE.NOT> | undefined = ValidToken<TOKEN_TYPE.NOT> | undefined>(raw: {
|
|
3
|
+
operator?: TOperator;
|
|
4
|
+
property?: ConditionNode<TValid>["property"];
|
|
5
|
+
propertyOperator?: ConditionNode<TValid>["propertyOperator"];
|
|
6
|
+
sep?: ConditionNode<TValid>["sep"];
|
|
7
|
+
value: ConditionNode<TValid>["value"];
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
}): ConditionNode<TValid>;
|
|
11
|
+
//# sourceMappingURL=createConditionNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createConditionNode.d.ts","sourceRoot":"","sources":["../../src/ast/createConditionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIhG,wBAAgB,mBAAmB,CAClC,MAAM,SAAS,OAAO,GAAG,OAAO,EAChC,SAAS,SACR,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,GACtC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,EACtC,GAAG,EAAE;IACN,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;IAC5C,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAA;IAC5D,GAAG,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAA;IAClC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACX,GACE,aAAa,CAAC,MAAM,CAAC,CAuCvB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AST_TYPE } from "../types/ast.js";
|
|
2
|
+
import { isNode } from "../utils/isNode.js";
|
|
3
|
+
function createConditionNode(raw) {
|
|
4
|
+
var _a, _b, _c, _d, _e;
|
|
5
|
+
const valid = (raw.operator === void 0 || ((_a = raw.operator) == null ? void 0 : _a.valid)) && isNode(raw.value) && raw.value.valid && (raw.property === void 0 && raw.propertyOperator === void 0 && raw.sep === void 0 || raw.property !== void 0 && "type" in raw.property && raw.property.type === AST_TYPE.VARIABLE && (((_b = raw.propertyOperator) == null ? void 0 : _b.valid) === true || ((_d = (_c = raw.sep) == null ? void 0 : _c.left) == null ? void 0 : _d.valid) === true && (raw.sep.right === void 0 || ((_e = raw.sep) == null ? void 0 : _e.right.valid))));
|
|
6
|
+
return {
|
|
7
|
+
property: void 0,
|
|
8
|
+
propertyOperator: void 0,
|
|
9
|
+
sep: void 0,
|
|
10
|
+
...raw,
|
|
11
|
+
isNode: true,
|
|
12
|
+
type: AST_TYPE.CONDITION,
|
|
13
|
+
valid
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
createConditionNode
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createExpressionNode.d.ts","sourceRoot":"","sources":["../../src/ast/createExpressionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAC,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAI5E,wBAAgB,oBAAoB,CAAC,MAAM,SAAS,OAAO,GAAG,OAAO,EACpE,GAAG,EAAE,OAAO,CAAE,cAAc,CAAC,MAAM,CAAC,CAAC,GACnC,cAAc,CAAC,MAAM,CAAC,CAcxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AST_TYPE } from "../types/ast.js";
|
|
2
|
+
import { isNode } from "../utils/isNode.js";
|
|
3
|
+
function createExpressionNode(raw) {
|
|
4
|
+
const valid = raw.operator.valid && isNode(raw.left) && raw.left.valid && isNode(raw.right) && raw.right.valid;
|
|
5
|
+
return {
|
|
6
|
+
...raw,
|
|
7
|
+
isNode: true,
|
|
8
|
+
valid,
|
|
9
|
+
type: AST_TYPE.EXPRESSION
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
createExpressionNode
|
|
14
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ConditionNode, type GroupNode, type RawNode, type TOKEN_TYPE, type ValidToken } from "../types/ast.js";
|
|
2
|
+
export declare function createGroupNode<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>>(raw: {
|
|
3
|
+
prefix: TPrefix;
|
|
4
|
+
} & RawNode<GroupNode<TValid>>): GroupNode<TValid, TPrefixable, TPrefix>;
|
|
5
|
+
//# sourceMappingURL=createGroupNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGroupNode.d.ts","sourceRoot":"","sources":["../../src/ast/createGroupNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAK9H,wBAAgB,eAAe,CAC9B,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,EAC7B,GAAG,EAAE;IACN,MAAM,EAAE,OAAO,CAAA;CACf,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAsBvE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AST_TYPE } from "../types/ast.js";
|
|
2
|
+
import { isNode } from "../utils/isNode.js";
|
|
3
|
+
import { isToken } from "../utils/isToken.js";
|
|
4
|
+
function createGroupNode(raw) {
|
|
5
|
+
return {
|
|
6
|
+
...raw,
|
|
7
|
+
isNode: true,
|
|
8
|
+
valid: (raw.prefix === void 0 || isToken(raw.prefix) && raw.prefix.valid || isNode(raw.prefix) && raw.prefix.valid) && isNode(raw.expression) && raw.expression.valid && (raw.paren === void 0 || raw.paren.left.valid && raw.paren.right.valid),
|
|
9
|
+
type: AST_TYPE.GROUP
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
createGroupNode
|
|
14
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type NormalizedCondition } from "../types/ast.js";
|
|
2
|
+
export declare function createCondition<TOp extends string = string, TValue = any>(raw: Omit<NormalizedCondition<TOp, TValue>, "type">): NormalizedCondition<TOp, TValue>;
|
|
3
|
+
//# sourceMappingURL=createNormalizedCondition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createNormalizedCondition.d.ts","sourceRoot":"","sources":["../../src/ast/createNormalizedCondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAGpE,wBAAgB,eAAe,CAC9B,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,MAAM,GAAG,GAAG,EACX,GAAG,EAAE,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAKvF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type NormalizedExpression } from "../types/ast.js";
|
|
2
|
+
export declare function createExpression<TType extends string = string, TValue = any>(raw: Omit<NormalizedExpression<TType, TValue>, "type">): NormalizedExpression<TType, TValue>;
|
|
3
|
+
//# sourceMappingURL=createNormalizedExpression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createNormalizedExpression.d.ts","sourceRoot":"","sources":["../../src/ast/createNormalizedExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAGrE,wBAAgB,gBAAgB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAKzK"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ErrorToken, RawToken, TOKEN_TYPE, ValidToken } from "../types/ast.js";
|
|
2
|
+
export declare function createToken<TType extends TOKEN_TYPE>(raw: {
|
|
3
|
+
type: TType;
|
|
4
|
+
} & RawToken<ValidToken>): ValidToken<TType>;
|
|
5
|
+
export declare function createToken(raw: RawToken<ErrorToken>): ErrorToken;
|
|
6
|
+
//# sourceMappingURL=createToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createToken.d.ts","sourceRoot":"","sources":["../../src/ast/createToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGnF,wBAAgB,WAAW,CAC1B,KAAK,SAAS,UAAU,EACvB,GAAG,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;AACjE,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,UAAU,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExpressitError } from "../internal/ExpressitError.js";
|
|
2
|
+
import { ERROR_CODES } from "../types/errors.js";
|
|
3
|
+
function createToken(raw) {
|
|
4
|
+
if (raw.start === void 0 || raw.end === void 0) {
|
|
5
|
+
throw new ExpressitError(ERROR_CODES.PARSER_POSITION_ERROR, raw);
|
|
6
|
+
}
|
|
7
|
+
return {
|
|
8
|
+
...raw,
|
|
9
|
+
valid: typeof raw.expected === "undefined",
|
|
10
|
+
isToken: true
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
createToken
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVariableNode.d.ts","sourceRoot":"","sources":["../../src/ast/createVariableNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE3E,wBAAgB,kBAAkB,CAClC,MAAM,SAAS,OAAO,GAAG,OAAO,EAC9B,GAAG,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAa1D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AST_TYPE } from "../types/ast.js";
|
|
2
|
+
function createVariableNode(raw) {
|
|
3
|
+
return {
|
|
4
|
+
...raw,
|
|
5
|
+
isNode: true,
|
|
6
|
+
valid: raw.value.valid && (raw.quote === void 0 || raw.quote.left.valid && raw.quote.right.valid),
|
|
7
|
+
type: AST_TYPE.VARIABLE
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
createVariableNode
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/ast/error.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjE,wBAAgB,KAAK,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,UAAU,CAGlF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createToken } from "./createToken.js";
|
|
2
|
+
function error(pos, expected) {
|
|
3
|
+
if (pos === void 0)
|
|
4
|
+
throw new Error("should never happen, passed undefined position for error token");
|
|
5
|
+
return createToken({ expected, start: pos, end: pos });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
error
|
|
9
|
+
};
|
package/dist/ast/handlers.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { ArrayNode } from "
|
|
2
|
-
|
|
3
|
-
import { ErrorToken } from "./classes/ErrorToken.js";
|
|
4
|
-
import { ExpressionNode } from "./classes/ExpressionNode.js";
|
|
5
|
-
import { GroupNode } from "./classes/GroupNode.js";
|
|
6
|
-
import { ValidToken } from "./classes/ValidToken.js";
|
|
7
|
-
import { VariableNode } from "./classes/VariableNode.js";
|
|
8
|
-
import { type AnyToken, type Position, TOKEN_TYPE, type TokenBooleanTypes, type TokenQuoteTypes } from "../types/ast.js";
|
|
9
|
-
declare function error<T extends TOKEN_TYPE>(pos: number, expected: T[]): ErrorToken<T>;
|
|
1
|
+
import { type AnyToken, type ArrayNode, type ConditionNode, type ErrorToken, type ExpressionNode, type GroupNode, type Position, TOKEN_TYPE, type TokenBooleanTypes, type TokenQuoteTypes, type ValidToken, type VariableNode } from "../types/ast.js";
|
|
2
|
+
declare function error<T extends TOKEN_TYPE>(pos: number, expected: T[]): ErrorToken;
|
|
10
3
|
export declare const token: {
|
|
11
|
-
value: <TVal extends string | undefined>(value: TVal, pos: Position) => TVal extends string ? ValidToken<TOKEN_TYPE.VALUE> : ErrorToken
|
|
12
|
-
custom: <TVal_1 extends string | undefined>(value: TVal_1, pos: Position) => TVal_1 extends string ? ValidToken<TOKEN_TYPE.OP_CUSTOM> : ErrorToken
|
|
13
|
-
sep: <TVal_2 extends string | undefined>(value: TVal_2, pos: Position) => TVal_2 extends string ? ValidToken<TOKEN_TYPE.OP_EXPANDED_SEP> : ErrorToken
|
|
4
|
+
value: <TVal extends string | undefined>(value: TVal, pos: Position) => TVal extends string ? ValidToken<TOKEN_TYPE.VALUE> : ErrorToken;
|
|
5
|
+
custom: <TVal_1 extends string | undefined>(value: TVal_1, pos: Position) => TVal_1 extends string ? ValidToken<TOKEN_TYPE.OP_CUSTOM> : ErrorToken;
|
|
6
|
+
sep: <TVal_2 extends string | undefined>(value: TVal_2, pos: Position) => TVal_2 extends string ? ValidToken<TOKEN_TYPE.OP_EXPANDED_SEP> : ErrorToken;
|
|
14
7
|
};
|
|
15
8
|
/** We want to handle all the types outside the grammar file. This makes it easier without trying to check the value. */
|
|
16
9
|
export declare const delimiter: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/ast/handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/ast/handlers.ts"],"names":[],"mappings":"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"}
|