@ruleflow-ts/dsl-core 0.3.2 → 0.4.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 +0 -29
- package/dist/evaluator/CustomFunctionCallEvaluator.d.ts +6 -0
- package/dist/evaluator/CustomFunctionCallEvaluator.d.ts.map +1 -0
- package/dist/evaluator/CustomFunctionCallEvaluator.js +23 -0
- package/dist/evaluator/CustomFunctionCallEvaluator.js.map +1 -0
- package/dist/evaluator/MemberAccessEvaluator.d.ts +6 -0
- package/dist/evaluator/MemberAccessEvaluator.d.ts.map +1 -0
- package/dist/evaluator/MemberAccessEvaluator.js +20 -0
- package/dist/evaluator/MemberAccessEvaluator.js.map +1 -0
- package/dist/evaluator/ValidPropertyEvaluator.d.ts.map +1 -1
- package/dist/evaluator/ValidPropertyEvaluator.js +6 -5
- package/dist/evaluator/ValidPropertyEvaluator.js.map +1 -1
- package/dist/evaluator/VariableRefEvaluator.d.ts +6 -0
- package/dist/evaluator/VariableRefEvaluator.d.ts.map +1 -0
- package/dist/evaluator/VariableRefEvaluator.js +17 -0
- package/dist/evaluator/VariableRefEvaluator.js.map +1 -0
- package/dist/generated/src/grammar/RuleFlowLanguageLexer.d.ts +46 -45
- package/dist/generated/src/grammar/RuleFlowLanguageLexer.d.ts.map +1 -1
- package/dist/generated/src/grammar/RuleFlowLanguageLexer.js +557 -560
- package/dist/generated/src/grammar/RuleFlowLanguageLexer.js.map +1 -1
- package/dist/generated/src/grammar/RuleFlowLanguageListener.d.ts +42 -5
- package/dist/generated/src/grammar/RuleFlowLanguageListener.d.ts.map +1 -1
- package/dist/generated/src/grammar/RuleFlowLanguageParser.d.ts +109 -77
- package/dist/generated/src/grammar/RuleFlowLanguageParser.d.ts.map +1 -1
- package/dist/generated/src/grammar/RuleFlowLanguageParser.js +995 -800
- package/dist/generated/src/grammar/RuleFlowLanguageParser.js.map +1 -1
- package/dist/generated/src/grammar/RuleFlowLanguageVisitor.d.ts +26 -3
- package/dist/generated/src/grammar/RuleFlowLanguageVisitor.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/visitors/RulesetVisitor.d.ts +4 -2
- package/dist/visitors/RulesetVisitor.d.ts.map +1 -1
- package/dist/visitors/RulesetVisitor.js +27 -2
- package/dist/visitors/RulesetVisitor.js.map +1 -1
- package/dist/visitors/Visitor.d.ts +8 -1
- package/dist/visitors/Visitor.d.ts.map +1 -1
- package/dist/visitors/Visitor.js +41 -6
- package/dist/visitors/Visitor.js.map +1 -1
- package/dist/workflow.d.ts +2 -2
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +2 -2
- package/dist/workflow.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,6 @@ TypeScript interpreter for the Ruleflow DSL. It runs in isomorphic environments
|
|
|
16
16
|
- Regex utility: `regex_strip(prop, 're')`
|
|
17
17
|
- Unary: `abs(expr)`
|
|
18
18
|
- Geo: `geohash_encode`, `geohash_decode`, `distance`, `within_radius`
|
|
19
|
-
- List evaluation: `evalInList('listName', predicate)` — evaluate a predicate against each element in a stored list
|
|
20
19
|
- Actions: `action('name', { 'k': 'v' })` with params using properties (`{'id': user.id}`)
|
|
21
20
|
- Evaluation mode: `evaluation_mode multi_match` (or default `single_match`)
|
|
22
21
|
|
|
@@ -111,34 +110,6 @@ within_radius(37.7749, -122.4194, 37.7750, -122.4195, 1) = true
|
|
|
111
110
|
distance(geohash_encode(37.7749, -122.4194, 7), geohash_encode(37.7750, -122.4195, 7)) < 0.5
|
|
112
111
|
```
|
|
113
112
|
|
|
114
|
-
- evalInList (evaluate predicate against list elements):
|
|
115
|
-
|
|
116
|
-
```sql
|
|
117
|
-
# Basic: check if any element in 'blacklist' has field1 = 'test'
|
|
118
|
-
evalInList('blacklist', elem.field1 = 'test')
|
|
119
|
-
|
|
120
|
-
# Nested properties
|
|
121
|
-
evalInList('blacklist', elem.field1.field2 = 'value')
|
|
122
|
-
|
|
123
|
-
# Numeric comparison
|
|
124
|
-
evalInList('items', elem.price > 100)
|
|
125
|
-
|
|
126
|
-
# AND/OR conditions
|
|
127
|
-
evalInList('blacklist', elem.field1 = 'test' AND elem.field2 = 'value')
|
|
128
|
-
evalInList('blacklist', elem.field1 = 'test' OR elem.field1 = 'other')
|
|
129
|
-
|
|
130
|
-
# Access parent context (user.id from data, elem.field1 from list element)
|
|
131
|
-
evalInList('blacklist', elem.field1 = user.id)
|
|
132
|
-
|
|
133
|
-
# Math operations
|
|
134
|
-
evalInList('items', elem.quantity * elem.price > 1000)
|
|
135
|
-
|
|
136
|
-
# With date functions
|
|
137
|
-
evalInList('subscriptions', elem.email = user.email AND date(elem.endDate) >= date(now()))
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
The predicate is evaluated for each element in the stored list. Returns `true` if **any** element matches (semantics similar to `any{}`).
|
|
141
|
-
|
|
142
113
|
- Multi-match mode:
|
|
143
114
|
|
|
144
115
|
```sql
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Visitor } from '../visitors/Visitor';
|
|
2
|
+
import type { CustomFunctionCallContext } from '../generated/src/grammar/RuleFlowLanguageParser';
|
|
3
|
+
export declare class CustomFunctionCallEvaluator {
|
|
4
|
+
evaluate(ctx: CustomFunctionCallContext, visitor: Visitor): unknown;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=CustomFunctionCallEvaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomFunctionCallEvaluator.d.ts","sourceRoot":"","sources":["../../src/evaluator/CustomFunctionCallEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAEjG,qBAAa,2BAA2B;IACtC,QAAQ,CAAC,GAAG,EAAE,yBAAyB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;CAmBpE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomFunctionCallEvaluator = void 0;
|
|
4
|
+
class CustomFunctionCallEvaluator {
|
|
5
|
+
evaluate(ctx, visitor) {
|
|
6
|
+
const functionName = ctx.ID().text;
|
|
7
|
+
const fn = visitor.getFunctions()[functionName];
|
|
8
|
+
if (!fn) {
|
|
9
|
+
throw new Error(`Custom function '${functionName}' is not defined`);
|
|
10
|
+
}
|
|
11
|
+
const args = ctx.expr().map((e) => visitor.visit(e));
|
|
12
|
+
const cacheKey = JSON.stringify([functionName, ...args]);
|
|
13
|
+
const cache = visitor.getFunctionCallCache();
|
|
14
|
+
if (cache.has(cacheKey)) {
|
|
15
|
+
return cache.get(cacheKey);
|
|
16
|
+
}
|
|
17
|
+
const result = fn(args);
|
|
18
|
+
cache.set(cacheKey, result);
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.CustomFunctionCallEvaluator = CustomFunctionCallEvaluator;
|
|
23
|
+
//# sourceMappingURL=CustomFunctionCallEvaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomFunctionCallEvaluator.js","sourceRoot":"","sources":["../../src/evaluator/CustomFunctionCallEvaluator.ts"],"names":[],"mappings":";;;AAGA,MAAa,2BAA2B;IACtC,QAAQ,CAAC,GAA8B,EAAE,OAAgB;QACvD,MAAM,YAAY,GAAI,GAAW,CAAC,EAAE,EAAE,CAAC,IAAc,CAAC;QACtD,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,MAAM,IAAI,KAAK,CAAC,oBAAoB,YAAY,kBAAkB,CAAC,CAAC;QACtE,CAAC;QAED,MAAM,IAAI,GAAe,GAAG,CAAC,IAAI,EAAY,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEhF,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QACzD,MAAM,KAAK,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAC7C,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QAED,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACxB,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AApBD,kEAoBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Visitor } from '../visitors/Visitor';
|
|
2
|
+
import type { MemberAccessContext } from '../generated/src/grammar/RuleFlowLanguageParser';
|
|
3
|
+
export declare class MemberAccessEvaluator {
|
|
4
|
+
evaluate(ctx: MemberAccessContext, visitor: Visitor): unknown;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=MemberAccessEvaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemberAccessEvaluator.d.ts","sourceRoot":"","sources":["../../src/evaluator/MemberAccessEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAG3F,qBAAa,qBAAqB;IAChC,QAAQ,CAAC,GAAG,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;CAa9D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemberAccessEvaluator = void 0;
|
|
4
|
+
const PropertyNotFoundError_1 = require("../errors/PropertyNotFoundError");
|
|
5
|
+
class MemberAccessEvaluator {
|
|
6
|
+
evaluate(ctx, visitor) {
|
|
7
|
+
const base = visitor.visit(ctx._base);
|
|
8
|
+
const field = ctx._field.text;
|
|
9
|
+
if (base !== null && typeof base === 'object' && !Array.isArray(base)) {
|
|
10
|
+
const obj = base;
|
|
11
|
+
if (!(field in obj)) {
|
|
12
|
+
throw new PropertyNotFoundError_1.PropertyNotFoundError(`${field} field cannot be found`);
|
|
13
|
+
}
|
|
14
|
+
return obj[field];
|
|
15
|
+
}
|
|
16
|
+
throw new PropertyNotFoundError_1.PropertyNotFoundError(`Cannot access field '${field}' on ${base}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.MemberAccessEvaluator = MemberAccessEvaluator;
|
|
20
|
+
//# sourceMappingURL=MemberAccessEvaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemberAccessEvaluator.js","sourceRoot":"","sources":["../../src/evaluator/MemberAccessEvaluator.ts"],"names":[],"mappings":";;;AAEA,2EAAwE;AAExE,MAAa,qBAAqB;IAChC,QAAQ,CAAC,GAAwB,EAAE,OAAgB;QACjD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAE,GAAW,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAI,GAAW,CAAC,MAAM,CAAC,IAAc,CAAC;QAEjD,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACtE,MAAM,GAAG,GAAG,IAA+B,CAAC;YAC5C,IAAI,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,EAAE,CAAC;gBACpB,MAAM,IAAI,6CAAqB,CAAC,GAAG,KAAK,wBAAwB,CAAC,CAAC;YACpE,CAAC;YACD,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QACD,MAAM,IAAI,6CAAqB,CAAC,wBAAwB,KAAK,QAAQ,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAdD,sDAcC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidPropertyEvaluator.d.ts","sourceRoot":"","sources":["../../src/evaluator/ValidPropertyEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAEvF,qBAAa,sBAAsB;IACjC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"ValidPropertyEvaluator.d.ts","sourceRoot":"","sources":["../../src/evaluator/ValidPropertyEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAEvF,qBAAa,sBAAsB;IACjC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;CA0B/D"}
|
|
@@ -5,11 +5,11 @@ const PropertyNotFoundError_1 = require("../errors/PropertyNotFoundError");
|
|
|
5
5
|
class ValidPropertyEvaluator {
|
|
6
6
|
evaluate(ctx, visitor) {
|
|
7
7
|
const fullText = (ctx.text || '').trim();
|
|
8
|
+
const ids = ctx.ID();
|
|
9
|
+
const isNested = ids.length > 1;
|
|
8
10
|
const useRoot = fullText.startsWith('.');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (parts.length === 1) {
|
|
12
|
-
const key = parts[0];
|
|
11
|
+
if (!isNested) {
|
|
12
|
+
const key = ids[0]?.text || '';
|
|
13
13
|
const value = visitor.getData()[key];
|
|
14
14
|
if (value === undefined) {
|
|
15
15
|
throw new PropertyNotFoundError_1.PropertyNotFoundError(key);
|
|
@@ -17,8 +17,9 @@ class ValidPropertyEvaluator {
|
|
|
17
17
|
return value;
|
|
18
18
|
}
|
|
19
19
|
// nested path
|
|
20
|
+
const path = ids.map((t) => t.text).join('.');
|
|
20
21
|
let current = useRoot ? visitor.getRoot() : visitor.getData();
|
|
21
|
-
for (const part of
|
|
22
|
+
for (const part of path.split('.')) {
|
|
22
23
|
if (current == null || typeof current !== 'object' || !(part in current)) {
|
|
23
24
|
throw new PropertyNotFoundError_1.PropertyNotFoundError(part);
|
|
24
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidPropertyEvaluator.js","sourceRoot":"","sources":["../../src/evaluator/ValidPropertyEvaluator.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AAGxE,MAAa,sBAAsB;IACjC,QAAQ,CAAC,GAAyB,EAAE,OAAgB;QAClD,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"ValidPropertyEvaluator.js","sourceRoot":"","sources":["../../src/evaluator/ValidPropertyEvaluator.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AAGxE,MAAa,sBAAsB;IACjC,QAAQ,CAAC,GAAyB,EAAE,OAAgB;QAClD,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACzC,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QAChC,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAEzC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAI,OAAO,CAAC,OAAO,EAAU,CAAC,GAAG,CAAC,CAAC;YAC9C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,MAAM,IAAI,6CAAqB,CAAC,GAAG,CAAC,CAAC;YACvC,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,cAAc;QACd,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,OAAO,GAAQ,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACnE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,CAAC;gBACzE,MAAM,IAAI,6CAAqB,CAAC,IAAI,CAAC,CAAC;YACxC,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA3BD,wDA2BC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Visitor } from '../visitors/Visitor';
|
|
2
|
+
import type { VariableRefContext } from '../generated/src/grammar/RuleFlowLanguageParser';
|
|
3
|
+
export declare class VariableRefEvaluator {
|
|
4
|
+
evaluate(ctx: VariableRefContext, visitor: Visitor): unknown;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=VariableRefEvaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariableRefEvaluator.d.ts","sourceRoot":"","sources":["../../src/evaluator/VariableRefEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAG1F,qBAAa,oBAAoB;IAC/B,QAAQ,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;CAS7D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VariableRefEvaluator = void 0;
|
|
4
|
+
const PropertyNotFoundError_1 = require("../errors/PropertyNotFoundError");
|
|
5
|
+
class VariableRefEvaluator {
|
|
6
|
+
evaluate(ctx, visitor) {
|
|
7
|
+
const rawName = ctx.VARIABLE().text;
|
|
8
|
+
const name = rawName.substring(1); // strip leading '$'
|
|
9
|
+
const variables = visitor.getVariables();
|
|
10
|
+
if (!(name in variables)) {
|
|
11
|
+
throw new PropertyNotFoundError_1.PropertyNotFoundError(`Variable $${name} is not defined`);
|
|
12
|
+
}
|
|
13
|
+
return variables[name];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.VariableRefEvaluator = VariableRefEvaluator;
|
|
17
|
+
//# sourceMappingURL=VariableRefEvaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariableRefEvaluator.js","sourceRoot":"","sources":["../../src/evaluator/VariableRefEvaluator.ts"],"names":[],"mappings":";;;AAEA,2EAAwE;AAExE,MAAa,oBAAoB;IAC/B,QAAQ,CAAC,GAAuB,EAAE,OAAgB;QAChD,MAAM,OAAO,GAAI,GAAW,CAAC,QAAQ,EAAE,CAAC,IAAc,CAAC;QACvD,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB;QACvD,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QACzC,IAAI,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,6CAAqB,CAAC,aAAa,IAAI,iBAAiB,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF;AAVD,oDAUC"}
|
|
@@ -27,46 +27,46 @@ export declare class RuleFlowLanguageLexer extends Lexer {
|
|
|
27
27
|
static readonly MODULO = 22;
|
|
28
28
|
static readonly K_STARTS_WITH = 23;
|
|
29
29
|
static readonly K_LIST = 24;
|
|
30
|
-
static readonly
|
|
31
|
-
static readonly
|
|
32
|
-
static readonly
|
|
33
|
-
static readonly
|
|
34
|
-
static readonly
|
|
35
|
-
static readonly
|
|
36
|
-
static readonly
|
|
37
|
-
static readonly
|
|
38
|
-
static readonly
|
|
39
|
-
static readonly
|
|
40
|
-
static readonly
|
|
41
|
-
static readonly
|
|
42
|
-
static readonly
|
|
43
|
-
static readonly
|
|
44
|
-
static readonly
|
|
45
|
-
static readonly
|
|
46
|
-
static readonly
|
|
47
|
-
static readonly
|
|
48
|
-
static readonly
|
|
49
|
-
static readonly
|
|
50
|
-
static readonly
|
|
51
|
-
static readonly
|
|
52
|
-
static readonly
|
|
53
|
-
static readonly
|
|
54
|
-
static readonly
|
|
55
|
-
static readonly
|
|
56
|
-
static readonly
|
|
57
|
-
static readonly
|
|
58
|
-
static readonly
|
|
59
|
-
static readonly
|
|
60
|
-
static readonly
|
|
61
|
-
static readonly
|
|
62
|
-
static readonly
|
|
63
|
-
static readonly
|
|
64
|
-
static readonly
|
|
65
|
-
static readonly
|
|
66
|
-
static readonly
|
|
67
|
-
static readonly
|
|
68
|
-
static readonly
|
|
69
|
-
static readonly
|
|
30
|
+
static readonly L_BRACE = 25;
|
|
31
|
+
static readonly R_BRACE = 26;
|
|
32
|
+
static readonly L_PAREN = 27;
|
|
33
|
+
static readonly R_PAREN = 28;
|
|
34
|
+
static readonly K_COLON = 29;
|
|
35
|
+
static readonly K_ACTION = 30;
|
|
36
|
+
static readonly K_WORKFLOW = 31;
|
|
37
|
+
static readonly K_RULESET = 32;
|
|
38
|
+
static readonly K_RETURN = 33;
|
|
39
|
+
static readonly K_THEN = 34;
|
|
40
|
+
static readonly K_DEFAULT = 35;
|
|
41
|
+
static readonly K_WITH = 36;
|
|
42
|
+
static readonly K_END = 37;
|
|
43
|
+
static readonly K_ELSE = 38;
|
|
44
|
+
static readonly K_AND = 39;
|
|
45
|
+
static readonly K_OR = 40;
|
|
46
|
+
static readonly K_CONTAINS = 41;
|
|
47
|
+
static readonly K_IS = 42;
|
|
48
|
+
static readonly K_NOT = 43;
|
|
49
|
+
static readonly K_IS_NOT = 44;
|
|
50
|
+
static readonly K_IN = 45;
|
|
51
|
+
static readonly K_ANY = 46;
|
|
52
|
+
static readonly K_NONE = 47;
|
|
53
|
+
static readonly K_ALL = 48;
|
|
54
|
+
static readonly K_COUNT = 49;
|
|
55
|
+
static readonly K_AVERAGE = 50;
|
|
56
|
+
static readonly K_DISTINCT = 51;
|
|
57
|
+
static readonly K_NULL = 52;
|
|
58
|
+
static readonly DAY_OF_WEEK = 53;
|
|
59
|
+
static readonly K_EXPR = 54;
|
|
60
|
+
static readonly K_EVALUATION_MODE = 55;
|
|
61
|
+
static readonly K_MULTI_MATCH = 56;
|
|
62
|
+
static readonly K_SINGLE_MATCH = 57;
|
|
63
|
+
static readonly K_NOW = 58;
|
|
64
|
+
static readonly K_DATE = 59;
|
|
65
|
+
static readonly K_DATETIME = 60;
|
|
66
|
+
static readonly K_DATE_ADD = 61;
|
|
67
|
+
static readonly K_DATE_SUBTRACT = 62;
|
|
68
|
+
static readonly K_SET = 63;
|
|
69
|
+
static readonly K_CONTINUE = 64;
|
|
70
70
|
static readonly STRING_DISTANCE = 65;
|
|
71
71
|
static readonly PARTIAL_RATIO = 66;
|
|
72
72
|
static readonly TOKEN_SORT_RATIO = 67;
|
|
@@ -80,11 +80,12 @@ export declare class RuleFlowLanguageLexer extends Lexer {
|
|
|
80
80
|
static readonly BOOLEAN_LITERAL = 75;
|
|
81
81
|
static readonly DQUOTA_STRING = 76;
|
|
82
82
|
static readonly SQUOTA_STRING = 77;
|
|
83
|
-
static readonly
|
|
84
|
-
static readonly
|
|
85
|
-
static readonly
|
|
86
|
-
static readonly
|
|
87
|
-
static readonly
|
|
83
|
+
static readonly VARIABLE = 78;
|
|
84
|
+
static readonly ID = 79;
|
|
85
|
+
static readonly SINGLE_LINE_COMMENT = 80;
|
|
86
|
+
static readonly MULTILINE_COMMENT = 81;
|
|
87
|
+
static readonly SPACES = 82;
|
|
88
|
+
static readonly UNEXPECTED_CHAR = 83;
|
|
88
89
|
static readonly channelNames: string[];
|
|
89
90
|
static readonly modeNames: string[];
|
|
90
91
|
static readonly ruleNames: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleFlowLanguageLexer.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/grammar/RuleFlowLanguageLexer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAKvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,qBAAa,qBAAsB,SAAQ,KAAK;IAC/C,gBAAuB,wBAAwB,KAAK;IACpD,gBAAuB,GAAG,KAAK;IAC/B,gBAAuB,KAAK,KAAK;IACjC,gBAAuB,GAAG,KAAK;IAC/B,gBAAuB,KAAK,KAAK;IACjC,gBAAuB,QAAQ,KAAK;IACpC,gBAAuB,MAAM,KAAK;IAClC,gBAAuB,EAAE,KAAK;IAC9B,gBA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