camunda-bpmn-js 3.3.0 → 3.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/dist/assets/properties-panel.css +1 -1
- package/dist/base-modeler.development.js +233 -53
- package/dist/base-modeler.production.min.js +33 -33
- package/dist/base-navigated-viewer.development.js +3 -0
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +2 -0
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +862 -1784
- package/dist/camunda-cloud-modeler.production.min.js +46 -46
- package/dist/camunda-cloud-navigated-viewer.development.js +3 -0
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +2 -0
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +229 -49
- package/dist/camunda-platform-modeler.production.min.js +33 -33
- package/dist/camunda-platform-navigated-viewer.development.js +3 -0
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +2 -0
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/base/Modeler.d.ts +15 -15
- package/lib/base/NavigatedViewer.d.ts +2 -2
- package/lib/base/Viewer.d.ts +2 -2
- package/lib/camunda-cloud/ElementTemplatesValidator.d.ts +1 -1
- package/lib/camunda-cloud/Modeler.d.ts +3 -3
- package/lib/camunda-cloud/NavigatedViewer.d.ts +3 -3
- package/lib/camunda-cloud/Viewer.d.ts +3 -3
- package/lib/camunda-cloud/features/rules/BpmnRules.d.ts +32 -32
- package/lib/camunda-cloud/features/rules/index.d.ts +6 -6
- package/lib/camunda-cloud/util/commonModules.d.ts +9 -9
- package/lib/camunda-platform/Modeler.d.ts +3 -3
- package/lib/camunda-platform/NavigatedViewer.d.ts +5 -5
- package/lib/camunda-platform/Viewer.d.ts +5 -5
- package/lib/camunda-platform/util/commonModules.d.ts +9 -9
- package/lib/util/ExtensionElementsUtil.d.ts +24 -24
- package/package.json +19 -18
|
@@ -3829,10 +3829,7 @@
|
|
|
3829
3829
|
if (typeof f == "function") {
|
|
3830
3830
|
var a = function a () {
|
|
3831
3831
|
if (this instanceof a) {
|
|
3832
|
-
|
|
3833
|
-
args.push.apply(args, arguments);
|
|
3834
|
-
var Ctor = Function.bind.apply(f, args);
|
|
3835
|
-
return new Ctor();
|
|
3832
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
3836
3833
|
}
|
|
3837
3834
|
return f.apply(this, arguments);
|
|
3838
3835
|
};
|
|
@@ -8845,7 +8842,7 @@
|
|
|
8845
8842
|
*
|
|
8846
8843
|
* @return {Object} the parsed name
|
|
8847
8844
|
*/
|
|
8848
|
-
function parseName$
|
|
8845
|
+
function parseName$3(name, defaultPrefix) {
|
|
8849
8846
|
var parts = name.split(/:/),
|
|
8850
8847
|
localName, prefix;
|
|
8851
8848
|
|
|
@@ -8979,8 +8976,8 @@
|
|
|
8979
8976
|
var nsPrefix = p.ns.prefix;
|
|
8980
8977
|
var parts = targetPropertyName.split('#');
|
|
8981
8978
|
|
|
8982
|
-
var name = parseName$
|
|
8983
|
-
var attrName = parseName$
|
|
8979
|
+
var name = parseName$3(parts[0], nsPrefix);
|
|
8980
|
+
var attrName = parseName$3(parts[1], name.prefix).name;
|
|
8984
8981
|
|
|
8985
8982
|
var redefinedProperty = this.propertiesByName[attrName];
|
|
8986
8983
|
if (!redefinedProperty) {
|
|
@@ -9153,7 +9150,7 @@
|
|
|
9153
9150
|
meta: assign$2((type.meta || {}))
|
|
9154
9151
|
});
|
|
9155
9152
|
|
|
9156
|
-
var ns = parseName$
|
|
9153
|
+
var ns = parseName$3(type.name, pkg.prefix),
|
|
9157
9154
|
name = ns.name,
|
|
9158
9155
|
propertiesByName = {};
|
|
9159
9156
|
|
|
@@ -9161,12 +9158,12 @@
|
|
|
9161
9158
|
forEach$2(type.properties, bind$2(function(p) {
|
|
9162
9159
|
|
|
9163
9160
|
// namespace property names
|
|
9164
|
-
var propertyNs = parseName$
|
|
9161
|
+
var propertyNs = parseName$3(p.name, ns.prefix),
|
|
9165
9162
|
propertyName = propertyNs.name;
|
|
9166
9163
|
|
|
9167
9164
|
// namespace property types
|
|
9168
9165
|
if (!isBuiltIn$1(p.type)) {
|
|
9169
|
-
p.type = parseName$
|
|
9166
|
+
p.type = parseName$3(p.type, propertyNs.prefix).name;
|
|
9170
9167
|
}
|
|
9171
9168
|
|
|
9172
9169
|
assign$2(p, {
|
|
@@ -9230,7 +9227,7 @@
|
|
|
9230
9227
|
* @param {Boolean} [trait=false]
|
|
9231
9228
|
*/
|
|
9232
9229
|
function traverseSuper(cls, trait) {
|
|
9233
|
-
var parentNs = parseName$
|
|
9230
|
+
var parentNs = parseName$3(cls, isBuiltIn$1(cls) ? '' : nsName.prefix);
|
|
9234
9231
|
self.mapTypes(parentNs, iterator, trait);
|
|
9235
9232
|
}
|
|
9236
9233
|
|
|
@@ -9256,7 +9253,7 @@
|
|
|
9256
9253
|
*/
|
|
9257
9254
|
Registry$1.prototype.getEffectiveDescriptor = function(name) {
|
|
9258
9255
|
|
|
9259
|
-
var nsName = parseName$
|
|
9256
|
+
var nsName = parseName$3(name);
|
|
9260
9257
|
|
|
9261
9258
|
var builder = new DescriptorBuilder$1(nsName);
|
|
9262
9259
|
|
|
@@ -9542,7 +9539,7 @@
|
|
|
9542
9539
|
*/
|
|
9543
9540
|
Moddle$1.prototype.createAny = function(name, nsUri, properties) {
|
|
9544
9541
|
|
|
9545
|
-
var nameNs = parseName$
|
|
9542
|
+
var nameNs = parseName$3(name);
|
|
9546
9543
|
|
|
9547
9544
|
var element = {
|
|
9548
9545
|
$type: name,
|
|
@@ -10766,7 +10763,7 @@
|
|
|
10766
10763
|
|
|
10767
10764
|
function normalizeXsiTypeName$1(name, model) {
|
|
10768
10765
|
|
|
10769
|
-
var nameNs = parseName$
|
|
10766
|
+
var nameNs = parseName$3(name);
|
|
10770
10767
|
var pkg = model.getPackage(nameNs.prefix);
|
|
10771
10768
|
|
|
10772
10769
|
return prefixedToName$1(nameNs, pkg);
|
|
@@ -10797,7 +10794,7 @@
|
|
|
10797
10794
|
* @param {ElementHandler} options.rootHandler the root handler for parsing a document
|
|
10798
10795
|
* @param {boolean} [options.lax=false] whether or not to ignore invalid elements
|
|
10799
10796
|
*/
|
|
10800
|
-
function Context$
|
|
10797
|
+
function Context$3(options) {
|
|
10801
10798
|
|
|
10802
10799
|
/**
|
|
10803
10800
|
* @property {ElementHandler} rootHandler
|
|
@@ -11060,7 +11057,7 @@
|
|
|
11060
11057
|
value = coerceType$1(prop.type, value);
|
|
11061
11058
|
} else
|
|
11062
11059
|
if (name !== 'xmlns') {
|
|
11063
|
-
propNameNs = parseName$
|
|
11060
|
+
propNameNs = parseName$3(name, descriptor.ns.prefix);
|
|
11064
11061
|
|
|
11065
11062
|
// check whether attribute is defined in a well-known namespace
|
|
11066
11063
|
// if that is the case we emit a warning to indicate potential misuse
|
|
@@ -11085,7 +11082,7 @@
|
|
|
11085
11082
|
ElementHandler$1.prototype.getPropertyForNode = function(node) {
|
|
11086
11083
|
|
|
11087
11084
|
var name = node.name;
|
|
11088
|
-
var nameNs = parseName$
|
|
11085
|
+
var nameNs = parseName$3(name);
|
|
11089
11086
|
|
|
11090
11087
|
var type = this.type,
|
|
11091
11088
|
model = this.model,
|
|
@@ -11243,7 +11240,7 @@
|
|
|
11243
11240
|
RootElementHandler$1.prototype.createElement = function(node) {
|
|
11244
11241
|
|
|
11245
11242
|
var name = node.name,
|
|
11246
|
-
nameNs = parseName$
|
|
11243
|
+
nameNs = parseName$3(name),
|
|
11247
11244
|
model = this.model,
|
|
11248
11245
|
type = this.type,
|
|
11249
11246
|
pkg = model.getPackage(nameNs.prefix),
|
|
@@ -11271,7 +11268,7 @@
|
|
|
11271
11268
|
GenericElementHandler$1.prototype.createElement = function(node) {
|
|
11272
11269
|
|
|
11273
11270
|
var name = node.name,
|
|
11274
|
-
ns = parseName$
|
|
11271
|
+
ns = parseName$3(name),
|
|
11275
11272
|
prefix = ns.prefix,
|
|
11276
11273
|
uri = node.ns[prefix + '$uri'],
|
|
11277
11274
|
attributes = node.attributes;
|
|
@@ -11374,7 +11371,7 @@
|
|
|
11374
11371
|
var model = this.model,
|
|
11375
11372
|
lax = this.lax;
|
|
11376
11373
|
|
|
11377
|
-
var context = new Context$
|
|
11374
|
+
var context = new Context$3(assign$2({}, options, { rootHandler: rootHandler })),
|
|
11378
11375
|
parser = new Parser$2({ proxy: true }),
|
|
11379
11376
|
stack = createStack$1();
|
|
11380
11377
|
|
|
@@ -11988,7 +11985,7 @@
|
|
|
11988
11985
|
var ns;
|
|
11989
11986
|
|
|
11990
11987
|
if (isString$2(element)) {
|
|
11991
|
-
ns = parseName$
|
|
11988
|
+
ns = parseName$3(element);
|
|
11992
11989
|
} else {
|
|
11993
11990
|
ns = element.ns;
|
|
11994
11991
|
}
|
|
@@ -12046,7 +12043,7 @@
|
|
|
12046
12043
|
ElementSerializer$1.prototype.parseNsAttribute = function(element, name, value) {
|
|
12047
12044
|
var model = element.$model;
|
|
12048
12045
|
|
|
12049
|
-
var nameNs = parseName$
|
|
12046
|
+
var nameNs = parseName$3(name);
|
|
12050
12047
|
|
|
12051
12048
|
var ns;
|
|
12052
12049
|
|
|
@@ -17002,6 +16999,7 @@
|
|
|
17002
16999
|
*/
|
|
17003
17000
|
|
|
17004
17001
|
|
|
17002
|
+
|
|
17005
17003
|
// inlined ../../resources/logo.svg
|
|
17006
17004
|
var BPMNIO_LOGO_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';
|
|
17007
17005
|
|
|
@@ -29163,7 +29161,7 @@
|
|
|
29163
29161
|
* @typedef { 'top' | 'right' | 'bottom' | 'left' | 'center' | 'middle' } Alignment
|
|
29164
29162
|
*/
|
|
29165
29163
|
|
|
29166
|
-
function last$
|
|
29164
|
+
function last$2(arr) {
|
|
29167
29165
|
return arr && arr[arr.length - 1];
|
|
29168
29166
|
}
|
|
29169
29167
|
|
|
@@ -29262,7 +29260,7 @@
|
|
|
29262
29260
|
alignment[type] = sortedElements[0][axis];
|
|
29263
29261
|
|
|
29264
29262
|
} else if (this._isType(type, [ 'right', 'bottom' ])) {
|
|
29265
|
-
lastElement = last$
|
|
29263
|
+
lastElement = last$2(sortedElements);
|
|
29266
29264
|
|
|
29267
29265
|
alignment[type] = lastElement[axis] + lastElement[dimension];
|
|
29268
29266
|
|
|
@@ -29292,7 +29290,7 @@
|
|
|
29292
29290
|
});
|
|
29293
29291
|
|
|
29294
29292
|
if (hasSharedCenters) {
|
|
29295
|
-
alignment[type] = last$
|
|
29293
|
+
alignment[type] = last$2(centeredElements).center;
|
|
29296
29294
|
|
|
29297
29295
|
return alignment;
|
|
29298
29296
|
}
|
|
@@ -29303,7 +29301,7 @@
|
|
|
29303
29301
|
return element[axis] + element[dimension];
|
|
29304
29302
|
});
|
|
29305
29303
|
|
|
29306
|
-
lastElement = last$
|
|
29304
|
+
lastElement = last$2(sortedElements);
|
|
29307
29305
|
|
|
29308
29306
|
alignment[type] = getMiddleOrTop(firstElement, lastElement);
|
|
29309
29307
|
}
|
|
@@ -52505,6 +52503,7 @@
|
|
|
52505
52503
|
* @typedef {import('../../util/Types').Rect} Rect
|
|
52506
52504
|
*/
|
|
52507
52505
|
|
|
52506
|
+
|
|
52508
52507
|
/**
|
|
52509
52508
|
* Return direction given axis and delta.
|
|
52510
52509
|
*
|
|
@@ -60406,6 +60405,7 @@
|
|
|
60406
60405
|
*/
|
|
60407
60406
|
|
|
60408
60407
|
|
|
60408
|
+
|
|
60409
60409
|
/**
|
|
60410
60410
|
* A base connection layouter implementation
|
|
60411
60411
|
* that layouts the connection by directly connecting
|
|
@@ -63465,7 +63465,7 @@
|
|
|
63465
63465
|
});
|
|
63466
63466
|
|
|
63467
63467
|
keyboard && keyboard.addListener(HIGH_PRIORITY$9, function(e) {
|
|
63468
|
-
if (!isSpace$
|
|
63468
|
+
if (!isSpace$2(e.keyEvent) || self.isActive()) {
|
|
63469
63469
|
return;
|
|
63470
63470
|
}
|
|
63471
63471
|
|
|
@@ -63475,7 +63475,7 @@
|
|
|
63475
63475
|
}, 'keyboard.keydown');
|
|
63476
63476
|
|
|
63477
63477
|
keyboard && keyboard.addListener(HIGH_PRIORITY$9, function(e) {
|
|
63478
|
-
if (!isSpace$
|
|
63478
|
+
if (!isSpace$2(e.keyEvent) || !self.isActive()) {
|
|
63479
63479
|
return;
|
|
63480
63480
|
}
|
|
63481
63481
|
|
|
@@ -63584,7 +63584,7 @@
|
|
|
63584
63584
|
|
|
63585
63585
|
// helpers //////////
|
|
63586
63586
|
|
|
63587
|
-
function isSpace$
|
|
63587
|
+
function isSpace$2(keyEvent) {
|
|
63588
63588
|
return isKey$1('Space', keyEvent);
|
|
63589
63589
|
}
|
|
63590
63590
|
|
|
@@ -73315,6 +73315,7 @@
|
|
|
73315
73315
|
* @private
|
|
73316
73316
|
*/
|
|
73317
73317
|
|
|
73318
|
+
|
|
73318
73319
|
function normalizeZone(input, defaultZone) {
|
|
73319
73320
|
if (isUndefined$2(input) || input === null) {
|
|
73320
73321
|
return defaultZone;
|
|
@@ -73486,6 +73487,7 @@
|
|
|
73486
73487
|
it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
|
|
73487
73488
|
*/
|
|
73488
73489
|
|
|
73490
|
+
|
|
73489
73491
|
/**
|
|
73490
73492
|
* @private
|
|
73491
73493
|
*/
|
|
@@ -79397,68 +79399,68 @@
|
|
|
79397
79399
|
}
|
|
79398
79400
|
|
|
79399
79401
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
79400
|
-
const propertyIdentifier$
|
|
79401
|
-
identifier$
|
|
79402
|
-
nameIdentifier$
|
|
79403
|
-
insertSemi$
|
|
79404
|
-
expression0$
|
|
79405
|
-
ForExpression$
|
|
79406
|
-
forExpressionStart$
|
|
79407
|
-
ForInExpression$
|
|
79408
|
-
Name$
|
|
79409
|
-
Identifier$
|
|
79410
|
-
AdditionalIdentifier$
|
|
79411
|
-
forExpressionBodyStart$
|
|
79412
|
-
IfExpression$
|
|
79413
|
-
ifExpressionStart$
|
|
79414
|
-
QuantifiedExpression$
|
|
79415
|
-
quantifiedExpressionStart$
|
|
79416
|
-
QuantifiedInExpression$
|
|
79417
|
-
PositiveUnaryTest$
|
|
79418
|
-
ArithmeticExpression$
|
|
79419
|
-
arithmeticPlusStart$
|
|
79420
|
-
arithmeticTimesStart$
|
|
79421
|
-
arithmeticExpStart$
|
|
79422
|
-
arithmeticUnaryStart$
|
|
79423
|
-
VariableName$
|
|
79424
|
-
PathExpression$
|
|
79425
|
-
pathExpressionStart$
|
|
79426
|
-
FilterExpression$
|
|
79427
|
-
filterExpressionStart$
|
|
79428
|
-
FunctionInvocation$
|
|
79429
|
-
functionInvocationStart$
|
|
79430
|
-
ParameterName$
|
|
79431
|
-
nil$
|
|
79432
|
-
NumericLiteral$
|
|
79433
|
-
StringLiteral$
|
|
79434
|
-
BooleanLiteral$
|
|
79435
|
-
List$
|
|
79436
|
-
listStart$
|
|
79437
|
-
FunctionDefinition$
|
|
79438
|
-
functionDefinitionStart$
|
|
79439
|
-
Context$
|
|
79440
|
-
contextStart$
|
|
79441
|
-
ContextEntry$
|
|
79442
|
-
PropertyName$
|
|
79443
|
-
PropertyIdentifier$
|
|
79402
|
+
const propertyIdentifier$1 = 120,
|
|
79403
|
+
identifier$1 = 121,
|
|
79404
|
+
nameIdentifier$1 = 122,
|
|
79405
|
+
insertSemi$1 = 123,
|
|
79406
|
+
expression0$1 = 127,
|
|
79407
|
+
ForExpression$1 = 4,
|
|
79408
|
+
forExpressionStart$1 = 130,
|
|
79409
|
+
ForInExpression$1 = 7,
|
|
79410
|
+
Name$1 = 8,
|
|
79411
|
+
Identifier$1 = 9,
|
|
79412
|
+
AdditionalIdentifier$1 = 10,
|
|
79413
|
+
forExpressionBodyStart$1 = 138,
|
|
79414
|
+
IfExpression$1 = 19,
|
|
79415
|
+
ifExpressionStart$1 = 139,
|
|
79416
|
+
QuantifiedExpression$1 = 23,
|
|
79417
|
+
quantifiedExpressionStart$1 = 140,
|
|
79418
|
+
QuantifiedInExpression$1 = 27,
|
|
79419
|
+
PositiveUnaryTest$1 = 37,
|
|
79420
|
+
ArithmeticExpression$1 = 41,
|
|
79421
|
+
arithmeticPlusStart$1 = 144,
|
|
79422
|
+
arithmeticTimesStart$1 = 145,
|
|
79423
|
+
arithmeticExpStart$1 = 146,
|
|
79424
|
+
arithmeticUnaryStart$1 = 147,
|
|
79425
|
+
VariableName$1 = 47,
|
|
79426
|
+
PathExpression$1 = 67,
|
|
79427
|
+
pathExpressionStart$1 = 152,
|
|
79428
|
+
FilterExpression$1 = 69,
|
|
79429
|
+
filterExpressionStart$1 = 153,
|
|
79430
|
+
FunctionInvocation$1 = 71,
|
|
79431
|
+
functionInvocationStart$1 = 154,
|
|
79432
|
+
ParameterName$1 = 75,
|
|
79433
|
+
nil$1 = 159,
|
|
79434
|
+
NumericLiteral$1 = 78,
|
|
79435
|
+
StringLiteral$1 = 79,
|
|
79436
|
+
BooleanLiteral$1 = 80,
|
|
79437
|
+
List$1 = 88,
|
|
79438
|
+
listStart$1 = 170,
|
|
79439
|
+
FunctionDefinition$1 = 89,
|
|
79440
|
+
functionDefinitionStart$1 = 172,
|
|
79441
|
+
Context$2 = 96,
|
|
79442
|
+
contextStart$1 = 174,
|
|
79443
|
+
ContextEntry$1 = 97,
|
|
79444
|
+
PropertyName$1 = 99,
|
|
79445
|
+
PropertyIdentifier$1 = 100;
|
|
79444
79446
|
|
|
79445
79447
|
/* global console,process */
|
|
79446
79448
|
|
|
79447
|
-
const LOG_PARSE$
|
|
79448
|
-
const LOG_PARSE_DEBUG$
|
|
79449
|
-
const LOG_VARS$
|
|
79449
|
+
const LOG_PARSE$1 = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
79450
|
+
const LOG_PARSE_DEBUG$1 = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
79451
|
+
const LOG_VARS$1 = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
79450
79452
|
|
|
79451
|
-
const spaceChars$
|
|
79453
|
+
const spaceChars$1 = [
|
|
79452
79454
|
9, 11, 12, 32, 133, 160,
|
|
79453
79455
|
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
79454
79456
|
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
79455
79457
|
];
|
|
79456
79458
|
|
|
79457
|
-
const newlineChars$
|
|
79459
|
+
const newlineChars$1 = chars$2('\n\r');
|
|
79458
79460
|
|
|
79459
79461
|
const asterix = '*'.charCodeAt(0);
|
|
79460
79462
|
|
|
79461
|
-
const additionalNameChars$
|
|
79463
|
+
const additionalNameChars$1 = chars$2("'./-+*^");
|
|
79462
79464
|
|
|
79463
79465
|
/**
|
|
79464
79466
|
* @typedef { VariableContext | any } ContextValue
|
|
@@ -79468,7 +79470,7 @@
|
|
|
79468
79470
|
* @param { string } str
|
|
79469
79471
|
* @return { number[] }
|
|
79470
79472
|
*/
|
|
79471
|
-
function chars$
|
|
79473
|
+
function chars$2(str) {
|
|
79472
79474
|
return Array.from(str).map(s => s.charCodeAt(0));
|
|
79473
79475
|
}
|
|
79474
79476
|
|
|
@@ -79476,7 +79478,7 @@
|
|
|
79476
79478
|
* @param { number } ch
|
|
79477
79479
|
* @return { boolean }
|
|
79478
79480
|
*/
|
|
79479
|
-
function isStartChar$
|
|
79481
|
+
function isStartChar$1(ch) {
|
|
79480
79482
|
return (
|
|
79481
79483
|
ch === 63 // ?
|
|
79482
79484
|
) || (
|
|
@@ -79486,7 +79488,7 @@
|
|
|
79486
79488
|
) || (
|
|
79487
79489
|
ch >= 97 && ch <= 122 // a-z
|
|
79488
79490
|
) || (
|
|
79489
|
-
ch >= 161 && !isPartChar$
|
|
79491
|
+
ch >= 161 && !isPartChar$1(ch) && !isSpace$1(ch)
|
|
79490
79492
|
);
|
|
79491
79493
|
}
|
|
79492
79494
|
|
|
@@ -79494,15 +79496,15 @@
|
|
|
79494
79496
|
* @param { number } ch
|
|
79495
79497
|
* @return { boolean }
|
|
79496
79498
|
*/
|
|
79497
|
-
function isAdditional$
|
|
79498
|
-
return additionalNameChars$
|
|
79499
|
+
function isAdditional$1(ch) {
|
|
79500
|
+
return additionalNameChars$1.includes(ch);
|
|
79499
79501
|
}
|
|
79500
79502
|
|
|
79501
79503
|
/**
|
|
79502
79504
|
* @param { number } ch
|
|
79503
79505
|
* @return { boolean }
|
|
79504
79506
|
*/
|
|
79505
|
-
function isPartChar$
|
|
79507
|
+
function isPartChar$1(ch) {
|
|
79506
79508
|
return (
|
|
79507
79509
|
ch >= 48 && ch <= 57 // 0-9
|
|
79508
79510
|
) || (
|
|
@@ -79518,12 +79520,12 @@
|
|
|
79518
79520
|
* @param { number } ch
|
|
79519
79521
|
* @return { boolean }
|
|
79520
79522
|
*/
|
|
79521
|
-
function isSpace$
|
|
79522
|
-
return spaceChars$
|
|
79523
|
+
function isSpace$1(ch) {
|
|
79524
|
+
return spaceChars$1.includes(ch);
|
|
79523
79525
|
}
|
|
79524
79526
|
|
|
79525
79527
|
// eslint-disable-next-line
|
|
79526
|
-
function indent$
|
|
79528
|
+
function indent$1(str, spaces) {
|
|
79527
79529
|
return spaces.concat(
|
|
79528
79530
|
str.split(/\n/g).join('\n' + spaces)
|
|
79529
79531
|
);
|
|
@@ -79535,7 +79537,7 @@
|
|
|
79535
79537
|
*
|
|
79536
79538
|
* @return { { token: string, offset: number } | null }
|
|
79537
79539
|
*/
|
|
79538
|
-
function parseAdditionalSymbol$
|
|
79540
|
+
function parseAdditionalSymbol$1(input, offset = 0) {
|
|
79539
79541
|
|
|
79540
79542
|
const next = input.peek(offset);
|
|
79541
79543
|
|
|
@@ -79547,7 +79549,7 @@
|
|
|
79547
79549
|
};
|
|
79548
79550
|
}
|
|
79549
79551
|
|
|
79550
|
-
if (isAdditional$
|
|
79552
|
+
if (isAdditional$1(next)) {
|
|
79551
79553
|
return {
|
|
79552
79554
|
offset: 1,
|
|
79553
79555
|
token: String.fromCharCode(next)
|
|
@@ -79564,11 +79566,11 @@
|
|
|
79564
79566
|
*
|
|
79565
79567
|
* @return { { token: string, offset: number } | null }
|
|
79566
79568
|
*/
|
|
79567
|
-
function parseIdentifier$
|
|
79569
|
+
function parseIdentifier$1(input, offset = 0, namePart = false) {
|
|
79568
79570
|
for (let inside = false, chars = [], i = 0;; i++) {
|
|
79569
79571
|
const next = input.peek(offset + i);
|
|
79570
79572
|
|
|
79571
|
-
if (isStartChar$
|
|
79573
|
+
if (isStartChar$1(next) || ((inside || namePart) && isPartChar$1(next))) {
|
|
79572
79574
|
if (!inside) {
|
|
79573
79575
|
inside = true;
|
|
79574
79576
|
}
|
|
@@ -79594,12 +79596,12 @@
|
|
|
79594
79596
|
*
|
|
79595
79597
|
* @return { { token: string, offset: number } | null }
|
|
79596
79598
|
*/
|
|
79597
|
-
function parseSpaces$
|
|
79599
|
+
function parseSpaces$1(input, offset) {
|
|
79598
79600
|
|
|
79599
79601
|
for (let inside = false, i = 0;; i++) {
|
|
79600
79602
|
let next = input.peek(offset + i);
|
|
79601
79603
|
|
|
79602
|
-
if (isSpace$
|
|
79604
|
+
if (isSpace$1(next)) {
|
|
79603
79605
|
if (!inside) {
|
|
79604
79606
|
inside = true;
|
|
79605
79607
|
}
|
|
@@ -79624,7 +79626,7 @@
|
|
|
79624
79626
|
*
|
|
79625
79627
|
* @return { { token: string, offset: number, term: number } | null }
|
|
79626
79628
|
*/
|
|
79627
|
-
function parseName$
|
|
79629
|
+
function parseName$2(input, variables) {
|
|
79628
79630
|
const contextKeys = variables.contextKeys();
|
|
79629
79631
|
|
|
79630
79632
|
const start = variables.tokens;
|
|
@@ -79635,9 +79637,9 @@
|
|
|
79635
79637
|
const maybeSpace = tokens.length > 0;
|
|
79636
79638
|
|
|
79637
79639
|
const match = (
|
|
79638
|
-
parseIdentifier$
|
|
79639
|
-
namePart && parseAdditionalSymbol$
|
|
79640
|
-
maybeSpace && parseSpaces$
|
|
79640
|
+
parseIdentifier$1(input, i, namePart) ||
|
|
79641
|
+
namePart && parseAdditionalSymbol$1(input, i) ||
|
|
79642
|
+
maybeSpace && parseSpaces$1(input, i)
|
|
79641
79643
|
);
|
|
79642
79644
|
|
|
79643
79645
|
// match is required
|
|
@@ -79666,11 +79668,11 @@
|
|
|
79666
79668
|
nextMatch = {
|
|
79667
79669
|
token,
|
|
79668
79670
|
offset: token.length,
|
|
79669
|
-
term: nameIdentifier$
|
|
79671
|
+
term: nameIdentifier$1
|
|
79670
79672
|
};
|
|
79671
79673
|
}
|
|
79672
79674
|
|
|
79673
|
-
if (dateTimeIdentifiers$
|
|
79675
|
+
if (dateTimeIdentifiers$1.some(el => el === name)) {
|
|
79674
79676
|
const token = tokens[0];
|
|
79675
79677
|
|
|
79676
79678
|
// parse date time identifiers as normal
|
|
@@ -79680,13 +79682,13 @@
|
|
|
79680
79682
|
nextMatch = {
|
|
79681
79683
|
token,
|
|
79682
79684
|
offset: token.length,
|
|
79683
|
-
term: identifier$
|
|
79685
|
+
term: identifier$1
|
|
79684
79686
|
};
|
|
79685
79687
|
}
|
|
79686
79688
|
|
|
79687
79689
|
if (
|
|
79688
79690
|
!contextKeys.some(el => el.startsWith(name)) &&
|
|
79689
|
-
!dateTimeIdentifiers$
|
|
79691
|
+
!dateTimeIdentifiers$1.some(el => el.startsWith(name))
|
|
79690
79692
|
) {
|
|
79691
79693
|
return nextMatch;
|
|
79692
79694
|
}
|
|
@@ -79694,50 +79696,50 @@
|
|
|
79694
79696
|
|
|
79695
79697
|
}
|
|
79696
79698
|
|
|
79697
|
-
const identifiersMap$
|
|
79698
|
-
[ identifier$
|
|
79699
|
-
[ nameIdentifier$
|
|
79699
|
+
const identifiersMap$1 = {
|
|
79700
|
+
[ identifier$1 ]: 'identifier',
|
|
79701
|
+
[ nameIdentifier$1 ]: 'nameIdentifier'
|
|
79700
79702
|
};
|
|
79701
79703
|
|
|
79702
|
-
const identifiers$
|
|
79704
|
+
const identifiers$1 = new ExternalTokenizer((input, stack) => {
|
|
79703
79705
|
|
|
79704
|
-
LOG_PARSE_DEBUG$
|
|
79706
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
79705
79707
|
|
|
79706
|
-
const nameMatch = parseName$
|
|
79708
|
+
const nameMatch = parseName$2(input, stack.context);
|
|
79707
79709
|
|
|
79708
79710
|
const start = stack.context.tokens;
|
|
79709
79711
|
|
|
79710
|
-
const match = nameMatch || parseIdentifier$
|
|
79712
|
+
const match = nameMatch || parseIdentifier$1(input, 0, start.length > 0);
|
|
79711
79713
|
|
|
79712
79714
|
if (match) {
|
|
79713
79715
|
input.advance(match.offset);
|
|
79714
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier$
|
|
79716
|
+
input.acceptToken(nameMatch ? nameMatch.term : identifier$1);
|
|
79715
79717
|
|
|
79716
|
-
LOG_PARSE$
|
|
79718
|
+
LOG_PARSE$1 && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap$1[nameMatch.term] : 'identifier', match.token);
|
|
79717
79719
|
}
|
|
79718
79720
|
}, { contextual: true });
|
|
79719
79721
|
|
|
79720
79722
|
|
|
79721
|
-
const propertyIdentifiers$
|
|
79723
|
+
const propertyIdentifiers$1 = new ExternalTokenizer((input, stack) => {
|
|
79722
79724
|
|
|
79723
|
-
LOG_PARSE_DEBUG$
|
|
79725
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
79724
79726
|
|
|
79725
79727
|
const start = stack.context.tokens;
|
|
79726
79728
|
|
|
79727
|
-
const match = parseIdentifier$
|
|
79729
|
+
const match = parseIdentifier$1(input, 0, start.length > 0);
|
|
79728
79730
|
|
|
79729
79731
|
if (match) {
|
|
79730
79732
|
input.advance(match.offset);
|
|
79731
|
-
input.acceptToken(propertyIdentifier$
|
|
79733
|
+
input.acceptToken(propertyIdentifier$1);
|
|
79732
79734
|
|
|
79733
|
-
LOG_PARSE$
|
|
79735
|
+
LOG_PARSE$1 && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
79734
79736
|
}
|
|
79735
79737
|
});
|
|
79736
79738
|
|
|
79737
79739
|
|
|
79738
|
-
const insertSemicolon$
|
|
79740
|
+
const insertSemicolon$1 = new ExternalTokenizer((input, stack) => {
|
|
79739
79741
|
|
|
79740
|
-
LOG_PARSE_DEBUG$
|
|
79742
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <insertSemi>', input.pos);
|
|
79741
79743
|
|
|
79742
79744
|
let offset;
|
|
79743
79745
|
let insert = false;
|
|
@@ -79745,11 +79747,11 @@
|
|
|
79745
79747
|
for (offset = 0;; offset++) {
|
|
79746
79748
|
const char = input.peek(offset);
|
|
79747
79749
|
|
|
79748
|
-
if (spaceChars$
|
|
79750
|
+
if (spaceChars$1.includes(char)) {
|
|
79749
79751
|
continue;
|
|
79750
79752
|
}
|
|
79751
79753
|
|
|
79752
|
-
if (newlineChars$
|
|
79754
|
+
if (newlineChars$1.includes(char)) {
|
|
79753
79755
|
insert = true;
|
|
79754
79756
|
}
|
|
79755
79757
|
|
|
@@ -79758,47 +79760,47 @@
|
|
|
79758
79760
|
|
|
79759
79761
|
if (insert) {
|
|
79760
79762
|
|
|
79761
|
-
const identifier = parseIdentifier$
|
|
79762
|
-
const spaces = parseSpaces$
|
|
79763
|
+
const identifier = parseIdentifier$1(input, offset + 1);
|
|
79764
|
+
const spaces = parseSpaces$1(input, offset + 1);
|
|
79763
79765
|
|
|
79764
79766
|
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
79765
79767
|
return;
|
|
79766
79768
|
}
|
|
79767
79769
|
|
|
79768
|
-
LOG_PARSE$
|
|
79769
|
-
input.acceptToken(insertSemi$
|
|
79770
|
+
LOG_PARSE$1 && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
79771
|
+
input.acceptToken(insertSemi$1);
|
|
79770
79772
|
}
|
|
79771
79773
|
});
|
|
79772
79774
|
|
|
79773
|
-
const prefixedContextStarts$
|
|
79774
|
-
[ functionInvocationStart$
|
|
79775
|
-
[ filterExpressionStart$
|
|
79776
|
-
[ pathExpressionStart$
|
|
79775
|
+
const prefixedContextStarts$1 = {
|
|
79776
|
+
[ functionInvocationStart$1 ]: 'FunctionInvocation',
|
|
79777
|
+
[ filterExpressionStart$1 ]: 'FilterExpression',
|
|
79778
|
+
[ pathExpressionStart$1 ]: 'PathExpression'
|
|
79777
79779
|
};
|
|
79778
79780
|
|
|
79779
|
-
const contextStarts$
|
|
79780
|
-
[ contextStart$
|
|
79781
|
-
[ functionDefinitionStart$
|
|
79782
|
-
[ forExpressionStart$
|
|
79783
|
-
[ listStart$
|
|
79784
|
-
[ ifExpressionStart$
|
|
79785
|
-
[ quantifiedExpressionStart$
|
|
79781
|
+
const contextStarts$1 = {
|
|
79782
|
+
[ contextStart$1 ]: 'Context',
|
|
79783
|
+
[ functionDefinitionStart$1 ]: 'FunctionDefinition',
|
|
79784
|
+
[ forExpressionStart$1 ]: 'ForExpression',
|
|
79785
|
+
[ listStart$1 ]: 'List',
|
|
79786
|
+
[ ifExpressionStart$1 ]: 'IfExpression',
|
|
79787
|
+
[ quantifiedExpressionStart$1 ]: 'QuantifiedExpression'
|
|
79786
79788
|
};
|
|
79787
79789
|
|
|
79788
|
-
const contextEnds$
|
|
79789
|
-
[ Context$
|
|
79790
|
-
[ FunctionDefinition$
|
|
79791
|
-
[ ForExpression$
|
|
79792
|
-
[ List$
|
|
79793
|
-
[ IfExpression$
|
|
79794
|
-
[ QuantifiedExpression$
|
|
79795
|
-
[ PathExpression$
|
|
79796
|
-
[ FunctionInvocation$
|
|
79797
|
-
[ FilterExpression$
|
|
79798
|
-
[ ArithmeticExpression$
|
|
79790
|
+
const contextEnds$1 = {
|
|
79791
|
+
[ Context$2 ]: 'Context',
|
|
79792
|
+
[ FunctionDefinition$1 ]: 'FunctionDefinition',
|
|
79793
|
+
[ ForExpression$1 ]: 'ForExpression',
|
|
79794
|
+
[ List$1 ]: 'List',
|
|
79795
|
+
[ IfExpression$1 ]: 'IfExpression',
|
|
79796
|
+
[ QuantifiedExpression$1 ]: 'QuantifiedExpression',
|
|
79797
|
+
[ PathExpression$1 ]: 'PathExpression',
|
|
79798
|
+
[ FunctionInvocation$1 ]: 'FunctionInvocation',
|
|
79799
|
+
[ FilterExpression$1 ]: 'FilterExpression',
|
|
79800
|
+
[ ArithmeticExpression$1 ]: 'ArithmeticExpression'
|
|
79799
79801
|
};
|
|
79800
79802
|
|
|
79801
|
-
let ValueProducer$
|
|
79803
|
+
let ValueProducer$1 = class ValueProducer {
|
|
79802
79804
|
|
|
79803
79805
|
/**
|
|
79804
79806
|
* @param { Function } fn
|
|
@@ -79822,20 +79824,20 @@
|
|
|
79822
79824
|
|
|
79823
79825
|
};
|
|
79824
79826
|
|
|
79825
|
-
const dateTimeLiterals$
|
|
79827
|
+
const dateTimeLiterals$1 = {
|
|
79826
79828
|
'date and time': 1,
|
|
79827
79829
|
'date': 1,
|
|
79828
79830
|
'time': 1,
|
|
79829
79831
|
'duration': 1
|
|
79830
79832
|
};
|
|
79831
79833
|
|
|
79832
|
-
const dateTimeIdentifiers$
|
|
79834
|
+
const dateTimeIdentifiers$1 = Object.keys(dateTimeLiterals$1);
|
|
79833
79835
|
|
|
79834
79836
|
|
|
79835
79837
|
/**
|
|
79836
79838
|
* A basic key-value store to hold context values.
|
|
79837
79839
|
*/
|
|
79838
|
-
|
|
79840
|
+
class VariableContext {
|
|
79839
79841
|
|
|
79840
79842
|
/**
|
|
79841
79843
|
* Creates a new context from a JavaScript object.
|
|
@@ -79902,7 +79904,7 @@
|
|
|
79902
79904
|
static isAtomic(value) {
|
|
79903
79905
|
return !value ||
|
|
79904
79906
|
value instanceof this ||
|
|
79905
|
-
value instanceof ValueProducer$
|
|
79907
|
+
value instanceof ValueProducer$1 ||
|
|
79906
79908
|
typeof value !== 'object';
|
|
79907
79909
|
}
|
|
79908
79910
|
|
|
@@ -79935,9 +79937,9 @@
|
|
|
79935
79937
|
return new this(merged);
|
|
79936
79938
|
}
|
|
79937
79939
|
|
|
79938
|
-
}
|
|
79940
|
+
}
|
|
79939
79941
|
|
|
79940
|
-
let Variables$
|
|
79942
|
+
let Variables$1 = class Variables {
|
|
79941
79943
|
|
|
79942
79944
|
constructor({
|
|
79943
79945
|
name = 'Expressions',
|
|
@@ -79964,7 +79966,7 @@
|
|
|
79964
79966
|
parent: this
|
|
79965
79967
|
});
|
|
79966
79968
|
|
|
79967
|
-
LOG_VARS$
|
|
79969
|
+
LOG_VARS$1 && console.log('[%s] enter', childScope.path, childScope.context);
|
|
79968
79970
|
|
|
79969
79971
|
return childScope;
|
|
79970
79972
|
}
|
|
@@ -79972,19 +79974,19 @@
|
|
|
79972
79974
|
exitScope(str) {
|
|
79973
79975
|
|
|
79974
79976
|
if (!this.parent) {
|
|
79975
|
-
LOG_VARS$
|
|
79977
|
+
LOG_VARS$1 && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent$1(str, ' '));
|
|
79976
79978
|
|
|
79977
79979
|
return this;
|
|
79978
79980
|
}
|
|
79979
79981
|
|
|
79980
|
-
LOG_VARS$
|
|
79982
|
+
LOG_VARS$1 && console.log('[%s] exit %o\n%s', this.path, this.context, indent$1(str, ' '));
|
|
79981
79983
|
|
|
79982
79984
|
return this.parent.pushChild(this);
|
|
79983
79985
|
}
|
|
79984
79986
|
|
|
79985
79987
|
token(part) {
|
|
79986
79988
|
|
|
79987
|
-
LOG_VARS$
|
|
79989
|
+
LOG_VARS$1 && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
79988
79990
|
|
|
79989
79991
|
return this.assign({
|
|
79990
79992
|
tokens: [ ...this.tokens, part ]
|
|
@@ -79993,7 +79995,7 @@
|
|
|
79993
79995
|
|
|
79994
79996
|
literal(value) {
|
|
79995
79997
|
|
|
79996
|
-
LOG_VARS$
|
|
79998
|
+
LOG_VARS$1 && console.log('[%s] literal %o', this.path, value);
|
|
79997
79999
|
|
|
79998
80000
|
return this.pushChild(this.of({
|
|
79999
80001
|
name: 'Literal',
|
|
@@ -80007,7 +80009,7 @@
|
|
|
80007
80009
|
* @return {any}
|
|
80008
80010
|
*/
|
|
80009
80011
|
computedValue() {
|
|
80010
|
-
for (let scope = this;;scope = last$
|
|
80012
|
+
for (let scope = this;;scope = last$1(scope.children)) {
|
|
80011
80013
|
|
|
80012
80014
|
if (!scope) {
|
|
80013
80015
|
return null;
|
|
@@ -80020,7 +80022,7 @@
|
|
|
80020
80022
|
}
|
|
80021
80023
|
|
|
80022
80024
|
contextKeys() {
|
|
80023
|
-
return this.context.getKeys().map(normalizeContextKey$
|
|
80025
|
+
return this.context.getKeys().map(normalizeContextKey$1);
|
|
80024
80026
|
}
|
|
80025
80027
|
|
|
80026
80028
|
get path() {
|
|
@@ -80035,10 +80037,10 @@
|
|
|
80035
80037
|
*/
|
|
80036
80038
|
get(variable) {
|
|
80037
80039
|
|
|
80038
|
-
const names = [ variable, variable && normalizeContextKey$
|
|
80040
|
+
const names = [ variable, variable && normalizeContextKey$1(variable) ];
|
|
80039
80041
|
|
|
80040
80042
|
const contextKey = this.context.getKeys().find(
|
|
80041
|
-
key => names.includes(normalizeContextKey$
|
|
80043
|
+
key => names.includes(normalizeContextKey$1(key))
|
|
80042
80044
|
);
|
|
80043
80045
|
|
|
80044
80046
|
if (typeof contextKey === 'undefined') {
|
|
@@ -80047,7 +80049,7 @@
|
|
|
80047
80049
|
|
|
80048
80050
|
const val = this.context.get(contextKey);
|
|
80049
80051
|
|
|
80050
|
-
if (val instanceof ValueProducer$
|
|
80052
|
+
if (val instanceof ValueProducer$1) {
|
|
80051
80053
|
return val.get(this);
|
|
80052
80054
|
} else {
|
|
80053
80055
|
return val;
|
|
@@ -80070,7 +80072,7 @@
|
|
|
80070
80072
|
raw: variable
|
|
80071
80073
|
});
|
|
80072
80074
|
|
|
80073
|
-
LOG_VARS$
|
|
80075
|
+
LOG_VARS$1 && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
80074
80076
|
|
|
80075
80077
|
return parentScope.pushChild(variableScope);
|
|
80076
80078
|
}
|
|
@@ -80109,7 +80111,7 @@
|
|
|
80109
80111
|
|
|
80110
80112
|
const variableName = this.tokens.join(' ');
|
|
80111
80113
|
|
|
80112
|
-
LOG_VARS$
|
|
80114
|
+
LOG_VARS$1 && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
80113
80115
|
|
|
80114
80116
|
return this.assign({
|
|
80115
80117
|
tokens: []
|
|
@@ -80124,12 +80126,12 @@
|
|
|
80124
80126
|
define(name, value) {
|
|
80125
80127
|
|
|
80126
80128
|
if (typeof name !== 'string') {
|
|
80127
|
-
LOG_VARS$
|
|
80129
|
+
LOG_VARS$1 && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
80128
80130
|
|
|
80129
80131
|
return this;
|
|
80130
80132
|
}
|
|
80131
80133
|
|
|
80132
|
-
LOG_VARS$
|
|
80134
|
+
LOG_VARS$1 && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
80133
80135
|
|
|
80134
80136
|
const context = this.context.set(name, value);
|
|
80135
80137
|
|
|
@@ -80203,7 +80205,7 @@
|
|
|
80203
80205
|
*
|
|
80204
80206
|
* @return { string } normalizedName
|
|
80205
80207
|
*/
|
|
80206
|
-
function normalizeContextKey$
|
|
80208
|
+
function normalizeContextKey$1(name) {
|
|
80207
80209
|
return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
80208
80210
|
}
|
|
80209
80211
|
|
|
@@ -80215,7 +80217,7 @@
|
|
|
80215
80217
|
* @param { string } code
|
|
80216
80218
|
* @return { Variables }
|
|
80217
80219
|
*/
|
|
80218
|
-
function wrap$
|
|
80220
|
+
function wrap$1(variables, scopeName, code) {
|
|
80219
80221
|
|
|
80220
80222
|
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
80221
80223
|
const children = variables.children.filter(c => c.name === scopeName);
|
|
@@ -80242,9 +80244,9 @@
|
|
|
80242
80244
|
*
|
|
80243
80245
|
* @return { ContextTracker<Variables> }
|
|
80244
80246
|
*/
|
|
80245
|
-
function trackVariables$
|
|
80247
|
+
function trackVariables$1(context = {}, Context = VariableContext) {
|
|
80246
80248
|
|
|
80247
|
-
const start = Variables$
|
|
80249
|
+
const start = Variables$1.of({
|
|
80248
80250
|
context: Context.of(context)
|
|
80249
80251
|
});
|
|
80250
80252
|
|
|
@@ -80252,7 +80254,7 @@
|
|
|
80252
80254
|
start,
|
|
80253
80255
|
reduce(variables, term, stack, input) {
|
|
80254
80256
|
|
|
80255
|
-
if (term === IfExpression$
|
|
80257
|
+
if (term === IfExpression$1) {
|
|
80256
80258
|
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
80257
80259
|
|
|
80258
80260
|
variables = variables.assign({
|
|
@@ -80263,7 +80265,7 @@
|
|
|
80263
80265
|
});
|
|
80264
80266
|
}
|
|
80265
80267
|
|
|
80266
|
-
if (term === List$
|
|
80268
|
+
if (term === List$1) {
|
|
80267
80269
|
variables = variables.assign({
|
|
80268
80270
|
value: Context.of(
|
|
80269
80271
|
...variables.children.map(
|
|
@@ -80273,7 +80275,7 @@
|
|
|
80273
80275
|
});
|
|
80274
80276
|
}
|
|
80275
80277
|
|
|
80276
|
-
if (term === FilterExpression$
|
|
80278
|
+
if (term === FilterExpression$1) {
|
|
80277
80279
|
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
80278
80280
|
|
|
80279
80281
|
variables = variables.assign({
|
|
@@ -80281,7 +80283,7 @@
|
|
|
80281
80283
|
});
|
|
80282
80284
|
}
|
|
80283
80285
|
|
|
80284
|
-
if (term === FunctionInvocation$
|
|
80286
|
+
if (term === FunctionInvocation$1) {
|
|
80285
80287
|
|
|
80286
80288
|
const [
|
|
80287
80289
|
name,
|
|
@@ -80290,17 +80292,17 @@
|
|
|
80290
80292
|
|
|
80291
80293
|
// preserve type information through `get value(context, key)` utility
|
|
80292
80294
|
if (name?.raw === 'get value') {
|
|
80293
|
-
variables = getContextValue$
|
|
80295
|
+
variables = getContextValue$1(variables, args);
|
|
80294
80296
|
}
|
|
80295
80297
|
}
|
|
80296
80298
|
|
|
80297
|
-
const start = contextStarts$
|
|
80299
|
+
const start = contextStarts$1[term];
|
|
80298
80300
|
|
|
80299
80301
|
if (start) {
|
|
80300
80302
|
return variables.enterScope(start);
|
|
80301
80303
|
}
|
|
80302
80304
|
|
|
80303
|
-
const prefixedStart = prefixedContextStarts$
|
|
80305
|
+
const prefixedStart = prefixedContextStarts$1[term];
|
|
80304
80306
|
|
|
80305
80307
|
// pull <expression> into new <prefixedStart> context
|
|
80306
80308
|
if (prefixedStart) {
|
|
@@ -80311,15 +80313,15 @@
|
|
|
80311
80313
|
} = variables;
|
|
80312
80314
|
|
|
80313
80315
|
const children = currentChildren.slice(0, -1);
|
|
80314
|
-
const lastChild = last$
|
|
80316
|
+
const lastChild = last$1(currentChildren);
|
|
80315
80317
|
|
|
80316
80318
|
let newContext = null;
|
|
80317
80319
|
|
|
80318
|
-
if (term === pathExpressionStart$
|
|
80320
|
+
if (term === pathExpressionStart$1) {
|
|
80319
80321
|
newContext = Context.of(lastChild?.computedValue());
|
|
80320
80322
|
}
|
|
80321
80323
|
|
|
80322
|
-
if (term === filterExpressionStart$
|
|
80324
|
+
if (term === filterExpressionStart$1) {
|
|
80323
80325
|
newContext = Context.of(
|
|
80324
80326
|
currentContext,
|
|
80325
80327
|
lastChild?.computedValue()
|
|
@@ -80335,19 +80337,19 @@
|
|
|
80335
80337
|
|
|
80336
80338
|
const code = input.read(input.pos, stack.pos);
|
|
80337
80339
|
|
|
80338
|
-
const end = contextEnds$
|
|
80340
|
+
const end = contextEnds$1[term];
|
|
80339
80341
|
|
|
80340
80342
|
if (end) {
|
|
80341
80343
|
return variables.exitScope(code);
|
|
80342
80344
|
}
|
|
80343
80345
|
|
|
80344
|
-
if (term === ContextEntry$
|
|
80346
|
+
if (term === ContextEntry$1) {
|
|
80345
80347
|
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
80346
80348
|
|
|
80347
80349
|
const name = parts[0];
|
|
80348
|
-
const value = last$
|
|
80350
|
+
const value = last$1(parts);
|
|
80349
80351
|
|
|
80350
|
-
return wrap$
|
|
80352
|
+
return wrap$1(variables, 'ContextEntry', code).assign(
|
|
80351
80353
|
{
|
|
80352
80354
|
value: Context
|
|
80353
80355
|
.of(variables.value)
|
|
@@ -80357,27 +80359,27 @@
|
|
|
80357
80359
|
}
|
|
80358
80360
|
|
|
80359
80361
|
if (
|
|
80360
|
-
term === ForInExpression$
|
|
80361
|
-
term === QuantifiedInExpression$
|
|
80362
|
+
term === ForInExpression$1 ||
|
|
80363
|
+
term === QuantifiedInExpression$1
|
|
80362
80364
|
) {
|
|
80363
|
-
return wrap$
|
|
80365
|
+
return wrap$1(variables, 'InExpression', code);
|
|
80364
80366
|
}
|
|
80365
80367
|
|
|
80366
80368
|
// define <partial> within ForExpression body
|
|
80367
|
-
if (term === forExpressionBodyStart$
|
|
80369
|
+
if (term === forExpressionBodyStart$1) {
|
|
80368
80370
|
|
|
80369
80371
|
return variables.define(
|
|
80370
80372
|
'partial',
|
|
80371
|
-
ValueProducer$
|
|
80372
|
-
return last$
|
|
80373
|
+
ValueProducer$1.of(variables => {
|
|
80374
|
+
return last$1(variables.children)?.computedValue();
|
|
80373
80375
|
})
|
|
80374
80376
|
);
|
|
80375
80377
|
}
|
|
80376
80378
|
|
|
80377
80379
|
if (
|
|
80378
|
-
term === ParameterName$
|
|
80380
|
+
term === ParameterName$1
|
|
80379
80381
|
) {
|
|
80380
|
-
const name = last$
|
|
80382
|
+
const name = last$1(variables.children).computedValue();
|
|
80381
80383
|
|
|
80382
80384
|
// TODO: attach type information
|
|
80383
80385
|
return variables.define(name, 1);
|
|
@@ -80385,71 +80387,71 @@
|
|
|
80385
80387
|
|
|
80386
80388
|
// pull <expression> into ArithmeticExpression child
|
|
80387
80389
|
if (
|
|
80388
|
-
term === arithmeticPlusStart$
|
|
80389
|
-
term === arithmeticTimesStart$
|
|
80390
|
-
term === arithmeticExpStart$
|
|
80390
|
+
term === arithmeticPlusStart$1 ||
|
|
80391
|
+
term === arithmeticTimesStart$1 ||
|
|
80392
|
+
term === arithmeticExpStart$1
|
|
80391
80393
|
) {
|
|
80392
80394
|
const children = variables.children.slice(0, -1);
|
|
80393
|
-
const lastChild = last$
|
|
80395
|
+
const lastChild = last$1(variables.children);
|
|
80394
80396
|
|
|
80395
80397
|
return variables.assign({
|
|
80396
80398
|
children
|
|
80397
80399
|
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
80398
80400
|
}
|
|
80399
80401
|
|
|
80400
|
-
if (term === arithmeticUnaryStart$
|
|
80402
|
+
if (term === arithmeticUnaryStart$1) {
|
|
80401
80403
|
return variables.enterScope('ArithmeticExpression');
|
|
80402
80404
|
}
|
|
80403
80405
|
|
|
80404
80406
|
if (
|
|
80405
|
-
term === Identifier$
|
|
80406
|
-
term === AdditionalIdentifier$
|
|
80407
|
-
term === PropertyIdentifier$
|
|
80407
|
+
term === Identifier$1 ||
|
|
80408
|
+
term === AdditionalIdentifier$1 ||
|
|
80409
|
+
term === PropertyIdentifier$1
|
|
80408
80410
|
) {
|
|
80409
80411
|
return variables.token(code);
|
|
80410
80412
|
}
|
|
80411
80413
|
|
|
80412
80414
|
if (
|
|
80413
|
-
term === StringLiteral$
|
|
80415
|
+
term === StringLiteral$1
|
|
80414
80416
|
) {
|
|
80415
80417
|
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
80416
80418
|
}
|
|
80417
80419
|
|
|
80418
|
-
if (term === BooleanLiteral$
|
|
80420
|
+
if (term === BooleanLiteral$1) {
|
|
80419
80421
|
return variables.literal(code === 'true' ? true : false);
|
|
80420
80422
|
}
|
|
80421
80423
|
|
|
80422
|
-
if (term === NumericLiteral$
|
|
80424
|
+
if (term === NumericLiteral$1) {
|
|
80423
80425
|
return variables.literal(parseFloat(code));
|
|
80424
80426
|
}
|
|
80425
80427
|
|
|
80426
|
-
if (term === nil$
|
|
80428
|
+
if (term === nil$1) {
|
|
80427
80429
|
return variables.literal(null);
|
|
80428
80430
|
}
|
|
80429
80431
|
|
|
80430
80432
|
if (
|
|
80431
|
-
term === VariableName$
|
|
80433
|
+
term === VariableName$1
|
|
80432
80434
|
) {
|
|
80433
80435
|
return variables.resolveName();
|
|
80434
80436
|
}
|
|
80435
80437
|
|
|
80436
80438
|
if (
|
|
80437
|
-
term === Name$
|
|
80438
|
-
term === PropertyName$
|
|
80439
|
+
term === Name$1 ||
|
|
80440
|
+
term === PropertyName$1
|
|
80439
80441
|
) {
|
|
80440
80442
|
return variables.declareName();
|
|
80441
80443
|
}
|
|
80442
80444
|
|
|
80443
80445
|
if (
|
|
80444
|
-
term === expression0$
|
|
80445
|
-
term === PositiveUnaryTest$
|
|
80446
|
+
term === expression0$1 ||
|
|
80447
|
+
term === PositiveUnaryTest$1
|
|
80446
80448
|
) {
|
|
80447
80449
|
if (variables.tokens.length > 0) {
|
|
80448
80450
|
throw new Error('uncleared name');
|
|
80449
80451
|
}
|
|
80450
80452
|
}
|
|
80451
80453
|
|
|
80452
|
-
if (term === expression0$
|
|
80454
|
+
if (term === expression0$1) {
|
|
80453
80455
|
|
|
80454
80456
|
let parent = variables;
|
|
80455
80457
|
|
|
@@ -80465,12 +80467,12 @@
|
|
|
80465
80467
|
});
|
|
80466
80468
|
}
|
|
80467
80469
|
|
|
80468
|
-
const variableTracker$
|
|
80470
|
+
const variableTracker$1 = trackVariables$1({});
|
|
80469
80471
|
|
|
80470
80472
|
|
|
80471
80473
|
// helpers //////////////
|
|
80472
80474
|
|
|
80473
|
-
function getContextValue$
|
|
80475
|
+
function getContextValue$1(variables, args) {
|
|
80474
80476
|
|
|
80475
80477
|
if (!args.length) {
|
|
80476
80478
|
return variables.assign({
|
|
@@ -80479,7 +80481,7 @@
|
|
|
80479
80481
|
}
|
|
80480
80482
|
|
|
80481
80483
|
if (args[0].name === 'Name') {
|
|
80482
|
-
args = extractNamedArgs$
|
|
80484
|
+
args = extractNamedArgs$1(args, [ 'm', 'key' ]);
|
|
80483
80485
|
}
|
|
80484
80486
|
|
|
80485
80487
|
if (args.length !== 2) {
|
|
@@ -80505,13 +80507,13 @@
|
|
|
80505
80507
|
}
|
|
80506
80508
|
|
|
80507
80509
|
return variables.assign({
|
|
80508
|
-
value: [ normalizeContextKey$
|
|
80510
|
+
value: [ normalizeContextKey$1(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
80509
80511
|
return contextValue.get(keyValue) || value;
|
|
80510
80512
|
}, null)
|
|
80511
80513
|
});
|
|
80512
80514
|
}
|
|
80513
80515
|
|
|
80514
|
-
function extractNamedArgs$
|
|
80516
|
+
function extractNamedArgs$1(args, argNames) {
|
|
80515
80517
|
|
|
80516
80518
|
const context = {};
|
|
80517
80519
|
|
|
@@ -80524,11 +80526,11 @@
|
|
|
80524
80526
|
return argNames.map(name => context[name]);
|
|
80525
80527
|
}
|
|
80526
80528
|
|
|
80527
|
-
function last$
|
|
80529
|
+
function last$1(arr) {
|
|
80528
80530
|
return arr[arr.length - 1];
|
|
80529
80531
|
}
|
|
80530
80532
|
|
|
80531
|
-
const feelHighlighting$
|
|
80533
|
+
const feelHighlighting$1 = styleTags({
|
|
80532
80534
|
StringLiteral: tags$1.string,
|
|
80533
80535
|
NumericLiteral: tags$1.number,
|
|
80534
80536
|
BooleanLiteral: tags$1.bool,
|
|
@@ -80561,28 +80563,28 @@
|
|
|
80561
80563
|
});
|
|
80562
80564
|
|
|
80563
80565
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
80564
|
-
const spec_identifier$
|
|
80565
|
-
const parser$
|
|
80566
|
+
const spec_identifier$1 = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:57, or:60, and:64, between:72, instance:86, of:89, days:99, time:101, duration:103, years:105, months:107, date:109, list:115, context:121, function:128, null:154, true:326, false:326, "?":168, external:184, not:209};
|
|
80567
|
+
const parser$3 = LRParser.deserialize({
|
|
80566
80568
|
version: 14,
|
|
80567
80569
|
states: "DSO`QYOOO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQYO'#FPOOQQ'#Fe'#FeO&UQYO'#FeO`QYO'#DVOOQU'#Em'#EmO'rQ^O'#D]OOQO'#Fl'#FlO)oQWO'#DuOOQQ'#D|'#D|OOQQ'#D}'#D}OOQQ'#EO'#EOO)tOWO'#ERO)oQWO'#EPOOQQ'#EP'#EPOOQQ'#Fr'#FrOOQQ'#Fp'#FpOOQQ'#Fw'#FwO,iQYO'#FwO.gQYO'#FwOOQQ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j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xQ!q[R!saR#y!pQ!wlR#z!p!mdOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%x!m|OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR%{%c!miOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR#}!t!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR$R!w!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR#Oo",
|
|
80570
80572
|
nodeNames: "⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",
|
|
80571
80573
|
maxTerm: 176,
|
|
80572
|
-
context: variableTracker$
|
|
80574
|
+
context: variableTracker$1,
|
|
80573
80575
|
nodeProps: [
|
|
80574
80576
|
["closedBy", 38,")",70,"]",95,"}"],
|
|
80575
80577
|
["openedBy", 40,"(",68,"[",94,"{"],
|
|
80576
80578
|
["group", -5,77,78,79,80,81,"Literal"]
|
|
80577
80579
|
],
|
|
80578
|
-
propSources: [feelHighlighting$
|
|
80580
|
+
propSources: [feelHighlighting$1],
|
|
80579
80581
|
skippedNodes: [0,1,2],
|
|
80580
80582
|
repeatNodeCount: 14,
|
|
80581
80583
|
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#q~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#r~~$cP!_!`$f~$kOr~~$pW$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$h~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#z~~&mOv~~&rOx~~&wP^~z{&z~'PO_~~'UO[~~'ZO#}~R'`PZP!`!a'cQ'hO$]Q~'mQ#y~!O!P's!Q!['x~'xO#|~~'}P$g~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$g~!O!P*W!Q![){~*ZP!Q!['x~*cO$Z~~*hO$v~R*oP![QsP!_!`*rP*wOsPR+OP!XQsP!_!`*r~+WO$j~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
80582
|
-
tokenizers: [propertyIdentifiers$
|
|
80584
|
+
tokenizers: [propertyIdentifiers$1, identifiers$1, insertSemicolon$1, 0, 1],
|
|
80583
80585
|
topRules: {"Expression":[0,3],"Expressions":[1,101],"UnaryTests":[2,102]},
|
|
80584
80586
|
dynamicPrecedences: {"31":-1,"71":-1,"73":-1},
|
|
80585
|
-
specialized: [{term: 121, get: value => spec_identifier$
|
|
80587
|
+
specialized: [{term: 121, get: value => spec_identifier$1[value] || -1}],
|
|
80586
80588
|
tokenPrec: 2857
|
|
80587
80589
|
});
|
|
80588
80590
|
|
|
@@ -80785,11 +80787,11 @@
|
|
|
80785
80787
|
if (name in context) {
|
|
80786
80788
|
return context[name];
|
|
80787
80789
|
}
|
|
80788
|
-
const normalizedName = normalizeContextKey$
|
|
80790
|
+
const normalizedName = normalizeContextKey$1(name);
|
|
80789
80791
|
if (normalizedName in context) {
|
|
80790
80792
|
return context[normalizedName];
|
|
80791
80793
|
}
|
|
80792
|
-
const entry = Object.entries(context).find(([key]) => normalizedName === normalizeContextKey$
|
|
80794
|
+
const entry = Object.entries(context).find(([key]) => normalizedName === normalizeContextKey$1(key));
|
|
80793
80795
|
if (entry) {
|
|
80794
80796
|
return entry[1];
|
|
80795
80797
|
}
|
|
@@ -81481,15 +81483,15 @@
|
|
|
81481
81483
|
}
|
|
81482
81484
|
|
|
81483
81485
|
function parseExpression(expression, context = {}) {
|
|
81484
|
-
return parser$
|
|
81486
|
+
return parser$3.configure({
|
|
81485
81487
|
top: 'Expression',
|
|
81486
|
-
contextTracker: trackVariables$
|
|
81488
|
+
contextTracker: trackVariables$1(context)
|
|
81487
81489
|
}).parse(expression);
|
|
81488
81490
|
}
|
|
81489
81491
|
function parseUnaryTests(expression, context = {}) {
|
|
81490
|
-
return parser$
|
|
81492
|
+
return parser$3.configure({
|
|
81491
81493
|
top: 'UnaryTests',
|
|
81492
|
-
contextTracker: trackVariables$
|
|
81494
|
+
contextTracker: trackVariables$1(context)
|
|
81493
81495
|
}).parse(expression);
|
|
81494
81496
|
}
|
|
81495
81497
|
|
|
@@ -81987,7 +81989,7 @@
|
|
|
81987
81989
|
}
|
|
81988
81990
|
return equals$1(test, value);
|
|
81989
81991
|
}
|
|
81990
|
-
const chars$
|
|
81992
|
+
const chars$1 = Array.from('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
|
|
81991
81993
|
function isTyped(type, values) {
|
|
81992
81994
|
return (values.some(e => getType$2(e) === type) &&
|
|
81993
81995
|
values.every(e => e === null || getType$2(e) === type));
|
|
@@ -82106,16 +82108,16 @@
|
|
|
82106
82108
|
return (value) => value === null ? null : tests.every(t => t(value));
|
|
82107
82109
|
}
|
|
82108
82110
|
function createStringRange(start, end, startIncluded = true, endIncluded = true) {
|
|
82109
|
-
if (start !== null && !chars$
|
|
82111
|
+
if (start !== null && !chars$1.includes(start)) {
|
|
82110
82112
|
throw new Error('illegal range start: ' + start);
|
|
82111
82113
|
}
|
|
82112
|
-
if (end !== null && !chars$
|
|
82114
|
+
if (end !== null && !chars$1.includes(end)) {
|
|
82113
82115
|
throw new Error('illegal range end: ' + end);
|
|
82114
82116
|
}
|
|
82115
82117
|
let values;
|
|
82116
82118
|
if (start !== null && end !== null) {
|
|
82117
|
-
let startIdx = chars$
|
|
82118
|
-
let endIdx = chars$
|
|
82119
|
+
let startIdx = chars$1.indexOf(start);
|
|
82120
|
+
let endIdx = chars$1.indexOf(end);
|
|
82119
82121
|
const direction = startIdx > endIdx ? -1 : 1;
|
|
82120
82122
|
if (startIncluded === false) {
|
|
82121
82123
|
startIdx += direction;
|
|
@@ -82123,7 +82125,7 @@
|
|
|
82123
82125
|
if (endIncluded === false) {
|
|
82124
82126
|
endIdx -= direction;
|
|
82125
82127
|
}
|
|
82126
|
-
values = chars$
|
|
82128
|
+
values = chars$1.slice(startIdx, endIdx + 1);
|
|
82127
82129
|
}
|
|
82128
82130
|
const map = values ? valuesMap(values) : noopMap();
|
|
82129
82131
|
const includes = values ? valuesIncludes(values) : anyIncludes(start, end, startIncluded, endIncluded);
|
|
@@ -101803,7 +101805,7 @@
|
|
|
101803
101805
|
Paragraph: tags$1.content
|
|
101804
101806
|
});
|
|
101805
101807
|
/// The default CommonMark parser.
|
|
101806
|
-
const parser$
|
|
101808
|
+
const parser$2 = new MarkdownParser(new NodeSet(nodeTypes).extend(markdownHighlighting), Object.keys(DefaultBlockParsers).map(n => DefaultBlockParsers[n]), Object.keys(DefaultBlockParsers).map(n => DefaultLeafBlocks[n]), Object.keys(DefaultBlockParsers), DefaultEndLeaf, DefaultSkipMarkup, Object.keys(DefaultInline).map(n => DefaultInline[n]), Object.keys(DefaultInline), []);
|
|
101807
101809
|
|
|
101808
101810
|
const StrikethroughDelim = { resolve: "Strikethrough", mark: "StrikethroughMark" };
|
|
101809
101811
|
/// An extension that implements
|
|
@@ -102021,72 +102023,72 @@
|
|
|
102021
102023
|
});
|
|
102022
102024
|
|
|
102023
102025
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
102024
|
-
const propertyIdentifier
|
|
102025
|
-
identifier
|
|
102026
|
-
nameIdentifier
|
|
102027
|
-
insertSemi
|
|
102028
|
-
expression0
|
|
102029
|
-
ForExpression
|
|
102030
|
-
forExpressionStart
|
|
102031
|
-
ForInExpression
|
|
102032
|
-
Name
|
|
102033
|
-
Identifier
|
|
102034
|
-
AdditionalIdentifier
|
|
102035
|
-
forExpressionBodyStart
|
|
102036
|
-
IfExpression
|
|
102037
|
-
ifExpressionStart
|
|
102038
|
-
QuantifiedExpression
|
|
102039
|
-
quantifiedExpressionStart
|
|
102040
|
-
QuantifiedInExpression
|
|
102041
|
-
PositiveUnaryTest
|
|
102042
|
-
ArithmeticExpression
|
|
102043
|
-
arithmeticPlusStart
|
|
102044
|
-
arithmeticTimesStart
|
|
102045
|
-
arithmeticExpStart
|
|
102046
|
-
arithmeticUnaryStart
|
|
102047
|
-
VariableName
|
|
102048
|
-
PathExpression
|
|
102049
|
-
pathExpressionStart
|
|
102050
|
-
FilterExpression
|
|
102051
|
-
filterExpressionStart
|
|
102052
|
-
FunctionInvocation
|
|
102053
|
-
functionInvocationStart
|
|
102054
|
-
ParameterName
|
|
102055
|
-
nil
|
|
102056
|
-
NumericLiteral
|
|
102057
|
-
StringLiteral
|
|
102058
|
-
BooleanLiteral
|
|
102059
|
-
List
|
|
102060
|
-
listStart
|
|
102061
|
-
FunctionDefinition
|
|
102062
|
-
functionDefinitionStart
|
|
102063
|
-
Context$
|
|
102064
|
-
contextStart
|
|
102065
|
-
ContextEntry
|
|
102066
|
-
PropertyName
|
|
102067
|
-
PropertyIdentifier
|
|
102026
|
+
const propertyIdentifier = 119,
|
|
102027
|
+
identifier = 120,
|
|
102028
|
+
nameIdentifier = 121,
|
|
102029
|
+
insertSemi = 122,
|
|
102030
|
+
expression0 = 126,
|
|
102031
|
+
ForExpression = 4,
|
|
102032
|
+
forExpressionStart = 129,
|
|
102033
|
+
ForInExpression = 7,
|
|
102034
|
+
Name = 8,
|
|
102035
|
+
Identifier = 9,
|
|
102036
|
+
AdditionalIdentifier = 10,
|
|
102037
|
+
forExpressionBodyStart = 137,
|
|
102038
|
+
IfExpression = 18,
|
|
102039
|
+
ifExpressionStart = 138,
|
|
102040
|
+
QuantifiedExpression = 22,
|
|
102041
|
+
quantifiedExpressionStart = 139,
|
|
102042
|
+
QuantifiedInExpression = 26,
|
|
102043
|
+
PositiveUnaryTest = 36,
|
|
102044
|
+
ArithmeticExpression = 40,
|
|
102045
|
+
arithmeticPlusStart = 143,
|
|
102046
|
+
arithmeticTimesStart = 144,
|
|
102047
|
+
arithmeticExpStart = 145,
|
|
102048
|
+
arithmeticUnaryStart = 146,
|
|
102049
|
+
VariableName = 47,
|
|
102050
|
+
PathExpression = 67,
|
|
102051
|
+
pathExpressionStart = 151,
|
|
102052
|
+
FilterExpression = 69,
|
|
102053
|
+
filterExpressionStart = 152,
|
|
102054
|
+
FunctionInvocation = 71,
|
|
102055
|
+
functionInvocationStart = 153,
|
|
102056
|
+
ParameterName = 75,
|
|
102057
|
+
nil = 158,
|
|
102058
|
+
NumericLiteral = 78,
|
|
102059
|
+
StringLiteral = 79,
|
|
102060
|
+
BooleanLiteral = 80,
|
|
102061
|
+
List = 88,
|
|
102062
|
+
listStart = 169,
|
|
102063
|
+
FunctionDefinition = 89,
|
|
102064
|
+
functionDefinitionStart = 171,
|
|
102065
|
+
Context$1 = 96,
|
|
102066
|
+
contextStart = 173,
|
|
102067
|
+
ContextEntry = 97,
|
|
102068
|
+
PropertyName = 99,
|
|
102069
|
+
PropertyIdentifier = 100;
|
|
102068
102070
|
|
|
102069
102071
|
/* global console,process */
|
|
102070
102072
|
|
|
102071
|
-
const LOG_PARSE
|
|
102072
|
-
const LOG_PARSE_DEBUG
|
|
102073
|
-
const LOG_VARS
|
|
102073
|
+
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
102074
|
+
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
102075
|
+
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
102074
102076
|
|
|
102075
|
-
const spaceChars
|
|
102077
|
+
const spaceChars = [
|
|
102076
102078
|
9, 11, 12, 32, 133, 160,
|
|
102077
102079
|
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
102078
102080
|
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
102079
102081
|
];
|
|
102080
102082
|
|
|
102081
|
-
const newlineChars
|
|
102083
|
+
const newlineChars = chars('\n\r');
|
|
102082
102084
|
|
|
102083
|
-
const additionalNameChars
|
|
102085
|
+
const additionalNameChars = chars("'./-+*");
|
|
102084
102086
|
|
|
102085
102087
|
/**
|
|
102086
102088
|
* @param { string } str
|
|
102087
102089
|
* @return { number[] }
|
|
102088
102090
|
*/
|
|
102089
|
-
function chars
|
|
102091
|
+
function chars(str) {
|
|
102090
102092
|
return Array.from(str).map(s => s.charCodeAt(0));
|
|
102091
102093
|
}
|
|
102092
102094
|
|
|
@@ -102094,7 +102096,7 @@
|
|
|
102094
102096
|
* @param { number } ch
|
|
102095
102097
|
* @return { boolean }
|
|
102096
102098
|
*/
|
|
102097
|
-
function isStartChar
|
|
102099
|
+
function isStartChar(ch) {
|
|
102098
102100
|
return (
|
|
102099
102101
|
ch === 63 // ?
|
|
102100
102102
|
) || (
|
|
@@ -102104,7 +102106,7 @@
|
|
|
102104
102106
|
) || (
|
|
102105
102107
|
ch >= 97 && ch <= 122 // a-z
|
|
102106
102108
|
) || (
|
|
102107
|
-
ch >= 161 && !isPartChar
|
|
102109
|
+
ch >= 161 && !isPartChar(ch) && !isSpace(ch)
|
|
102108
102110
|
);
|
|
102109
102111
|
}
|
|
102110
102112
|
|
|
@@ -102112,15 +102114,15 @@
|
|
|
102112
102114
|
* @param { number } ch
|
|
102113
102115
|
* @return { boolean }
|
|
102114
102116
|
*/
|
|
102115
|
-
function isAdditional
|
|
102116
|
-
return additionalNameChars
|
|
102117
|
+
function isAdditional(ch) {
|
|
102118
|
+
return additionalNameChars.includes(ch);
|
|
102117
102119
|
}
|
|
102118
102120
|
|
|
102119
102121
|
/**
|
|
102120
102122
|
* @param { number } ch
|
|
102121
102123
|
* @return { boolean }
|
|
102122
102124
|
*/
|
|
102123
|
-
function isPartChar
|
|
102125
|
+
function isPartChar(ch) {
|
|
102124
102126
|
return (
|
|
102125
102127
|
ch >= 48 && ch <= 57 // 0-9
|
|
102126
102128
|
) || (
|
|
@@ -102136,12 +102138,12 @@
|
|
|
102136
102138
|
* @param { number } ch
|
|
102137
102139
|
* @return { boolean }
|
|
102138
102140
|
*/
|
|
102139
|
-
function isSpace
|
|
102140
|
-
return spaceChars
|
|
102141
|
+
function isSpace(ch) {
|
|
102142
|
+
return spaceChars.includes(ch);
|
|
102141
102143
|
}
|
|
102142
102144
|
|
|
102143
102145
|
// eslint-disable-next-line
|
|
102144
|
-
function indent
|
|
102146
|
+
function indent(str, spaces) {
|
|
102145
102147
|
return spaces.concat(
|
|
102146
102148
|
str.split(/\n/g).join('\n' + spaces)
|
|
102147
102149
|
);
|
|
@@ -102154,11 +102156,11 @@
|
|
|
102154
102156
|
*
|
|
102155
102157
|
* @return { { token: string, offset: number } | null }
|
|
102156
102158
|
*/
|
|
102157
|
-
function parseAdditionalSymbol
|
|
102159
|
+
function parseAdditionalSymbol(input, offset = 0) {
|
|
102158
102160
|
|
|
102159
102161
|
const next = input.peek(offset);
|
|
102160
102162
|
|
|
102161
|
-
if (isAdditional
|
|
102163
|
+
if (isAdditional(next)) {
|
|
102162
102164
|
return {
|
|
102163
102165
|
offset: 1,
|
|
102164
102166
|
token: String.fromCharCode(next)
|
|
@@ -102175,11 +102177,11 @@
|
|
|
102175
102177
|
*
|
|
102176
102178
|
* @return { { token: string, offset: number } | null }
|
|
102177
102179
|
*/
|
|
102178
|
-
function parseIdentifier
|
|
102180
|
+
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
102179
102181
|
for (let inside = false, chars = [], i = 0;; i++) {
|
|
102180
102182
|
const next = input.peek(offset + i);
|
|
102181
102183
|
|
|
102182
|
-
if (isStartChar
|
|
102184
|
+
if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
|
|
102183
102185
|
if (!inside) {
|
|
102184
102186
|
inside = true;
|
|
102185
102187
|
}
|
|
@@ -102205,12 +102207,12 @@
|
|
|
102205
102207
|
*
|
|
102206
102208
|
* @return { { token: string, offset: number } | null }
|
|
102207
102209
|
*/
|
|
102208
|
-
function parseSpaces
|
|
102210
|
+
function parseSpaces(input, offset) {
|
|
102209
102211
|
|
|
102210
102212
|
for (let inside = false, i = 0;; i++) {
|
|
102211
102213
|
let next = input.peek(offset + i);
|
|
102212
102214
|
|
|
102213
|
-
if (isSpace
|
|
102215
|
+
if (isSpace(next)) {
|
|
102214
102216
|
if (!inside) {
|
|
102215
102217
|
inside = true;
|
|
102216
102218
|
}
|
|
@@ -102235,7 +102237,7 @@
|
|
|
102235
102237
|
*
|
|
102236
102238
|
* @return { { token: string, offset: number, term: number } | null }
|
|
102237
102239
|
*/
|
|
102238
|
-
function parseName$
|
|
102240
|
+
function parseName$1(input, variables) {
|
|
102239
102241
|
const contextKeys = variables.contextKeys();
|
|
102240
102242
|
|
|
102241
102243
|
const start = variables.tokens;
|
|
@@ -102246,9 +102248,9 @@
|
|
|
102246
102248
|
const maybeSpace = tokens.length > 0;
|
|
102247
102249
|
|
|
102248
102250
|
const match = (
|
|
102249
|
-
parseIdentifier
|
|
102250
|
-
namePart && parseAdditionalSymbol
|
|
102251
|
-
maybeSpace && parseSpaces
|
|
102251
|
+
parseIdentifier(input, i, namePart) ||
|
|
102252
|
+
namePart && parseAdditionalSymbol(input, i) ||
|
|
102253
|
+
maybeSpace && parseSpaces(input, i)
|
|
102252
102254
|
);
|
|
102253
102255
|
|
|
102254
102256
|
// match is required
|
|
@@ -102277,11 +102279,11 @@
|
|
|
102277
102279
|
nextMatch = {
|
|
102278
102280
|
token,
|
|
102279
102281
|
offset: token.length,
|
|
102280
|
-
term: nameIdentifier
|
|
102282
|
+
term: nameIdentifier
|
|
102281
102283
|
};
|
|
102282
102284
|
}
|
|
102283
102285
|
|
|
102284
|
-
if (dateTimeIdentifiers
|
|
102286
|
+
if (dateTimeIdentifiers.some(el => el === name)) {
|
|
102285
102287
|
const token = tokens[0];
|
|
102286
102288
|
|
|
102287
102289
|
// parse date time identifiers as normal
|
|
@@ -102291,13 +102293,13 @@
|
|
|
102291
102293
|
nextMatch = {
|
|
102292
102294
|
token,
|
|
102293
102295
|
offset: token.length,
|
|
102294
|
-
term: identifier
|
|
102296
|
+
term: identifier
|
|
102295
102297
|
};
|
|
102296
102298
|
}
|
|
102297
102299
|
|
|
102298
102300
|
if (
|
|
102299
102301
|
!contextKeys.some(el => el.startsWith(name)) &&
|
|
102300
|
-
!dateTimeIdentifiers
|
|
102302
|
+
!dateTimeIdentifiers.some(el => el.startsWith(name))
|
|
102301
102303
|
) {
|
|
102302
102304
|
return nextMatch;
|
|
102303
102305
|
}
|
|
@@ -102305,50 +102307,50 @@
|
|
|
102305
102307
|
|
|
102306
102308
|
}
|
|
102307
102309
|
|
|
102308
|
-
const identifiersMap
|
|
102309
|
-
[ identifier
|
|
102310
|
-
[ nameIdentifier
|
|
102310
|
+
const identifiersMap = {
|
|
102311
|
+
[ identifier ]: 'identifier',
|
|
102312
|
+
[ nameIdentifier ]: 'nameIdentifier'
|
|
102311
102313
|
};
|
|
102312
102314
|
|
|
102313
|
-
const identifiers
|
|
102315
|
+
const identifiers = new ExternalTokenizer((input, stack) => {
|
|
102314
102316
|
|
|
102315
|
-
LOG_PARSE_DEBUG
|
|
102317
|
+
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
102316
102318
|
|
|
102317
|
-
const nameMatch = parseName$
|
|
102319
|
+
const nameMatch = parseName$1(input, stack.context);
|
|
102318
102320
|
|
|
102319
102321
|
const start = stack.context.tokens;
|
|
102320
102322
|
|
|
102321
|
-
const match = nameMatch || parseIdentifier
|
|
102323
|
+
const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
|
|
102322
102324
|
|
|
102323
102325
|
if (match) {
|
|
102324
102326
|
input.advance(match.offset);
|
|
102325
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier
|
|
102327
|
+
input.acceptToken(nameMatch ? nameMatch.term : identifier);
|
|
102326
102328
|
|
|
102327
|
-
LOG_PARSE
|
|
102329
|
+
LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
|
|
102328
102330
|
}
|
|
102329
102331
|
}, { contextual: true });
|
|
102330
102332
|
|
|
102331
102333
|
|
|
102332
|
-
const propertyIdentifiers
|
|
102334
|
+
const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
|
|
102333
102335
|
|
|
102334
|
-
LOG_PARSE_DEBUG
|
|
102336
|
+
LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
102335
102337
|
|
|
102336
102338
|
const start = stack.context.tokens;
|
|
102337
102339
|
|
|
102338
|
-
const match = parseIdentifier
|
|
102340
|
+
const match = parseIdentifier(input, 0, start.length > 0);
|
|
102339
102341
|
|
|
102340
102342
|
if (match) {
|
|
102341
102343
|
input.advance(match.offset);
|
|
102342
|
-
input.acceptToken(propertyIdentifier
|
|
102344
|
+
input.acceptToken(propertyIdentifier);
|
|
102343
102345
|
|
|
102344
|
-
LOG_PARSE
|
|
102346
|
+
LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
102345
102347
|
}
|
|
102346
102348
|
});
|
|
102347
102349
|
|
|
102348
102350
|
|
|
102349
|
-
const insertSemicolon
|
|
102351
|
+
const insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
102350
102352
|
|
|
102351
|
-
LOG_PARSE_DEBUG
|
|
102353
|
+
LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
|
|
102352
102354
|
|
|
102353
102355
|
let offset;
|
|
102354
102356
|
let insert = false;
|
|
@@ -102356,11 +102358,11 @@
|
|
|
102356
102358
|
for (offset = 0;; offset++) {
|
|
102357
102359
|
const char = input.peek(offset);
|
|
102358
102360
|
|
|
102359
|
-
if (spaceChars
|
|
102361
|
+
if (spaceChars.includes(char)) {
|
|
102360
102362
|
continue;
|
|
102361
102363
|
}
|
|
102362
102364
|
|
|
102363
|
-
if (newlineChars
|
|
102365
|
+
if (newlineChars.includes(char)) {
|
|
102364
102366
|
insert = true;
|
|
102365
102367
|
}
|
|
102366
102368
|
|
|
@@ -102369,47 +102371,47 @@
|
|
|
102369
102371
|
|
|
102370
102372
|
if (insert) {
|
|
102371
102373
|
|
|
102372
|
-
const identifier = parseIdentifier
|
|
102373
|
-
const spaces = parseSpaces
|
|
102374
|
+
const identifier = parseIdentifier(input, offset + 1);
|
|
102375
|
+
const spaces = parseSpaces(input, offset + 1);
|
|
102374
102376
|
|
|
102375
102377
|
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
102376
102378
|
return;
|
|
102377
102379
|
}
|
|
102378
102380
|
|
|
102379
|
-
LOG_PARSE
|
|
102380
|
-
input.acceptToken(insertSemi
|
|
102381
|
+
LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
102382
|
+
input.acceptToken(insertSemi);
|
|
102381
102383
|
}
|
|
102382
102384
|
});
|
|
102383
102385
|
|
|
102384
|
-
const prefixedContextStarts
|
|
102385
|
-
[ functionInvocationStart
|
|
102386
|
-
[ filterExpressionStart
|
|
102387
|
-
[ pathExpressionStart
|
|
102386
|
+
const prefixedContextStarts = {
|
|
102387
|
+
[ functionInvocationStart ]: 'FunctionInvocation',
|
|
102388
|
+
[ filterExpressionStart ]: 'FilterExpression',
|
|
102389
|
+
[ pathExpressionStart ]: 'PathExpression'
|
|
102388
102390
|
};
|
|
102389
102391
|
|
|
102390
|
-
const contextStarts
|
|
102391
|
-
[ contextStart
|
|
102392
|
-
[ functionDefinitionStart
|
|
102393
|
-
[ forExpressionStart
|
|
102394
|
-
[ listStart
|
|
102395
|
-
[ ifExpressionStart
|
|
102396
|
-
[ quantifiedExpressionStart
|
|
102392
|
+
const contextStarts = {
|
|
102393
|
+
[ contextStart ]: 'Context',
|
|
102394
|
+
[ functionDefinitionStart ]: 'FunctionDefinition',
|
|
102395
|
+
[ forExpressionStart ]: 'ForExpression',
|
|
102396
|
+
[ listStart ]: 'List',
|
|
102397
|
+
[ ifExpressionStart ]: 'IfExpression',
|
|
102398
|
+
[ quantifiedExpressionStart ]: 'QuantifiedExpression'
|
|
102397
102399
|
};
|
|
102398
102400
|
|
|
102399
|
-
const contextEnds
|
|
102400
|
-
[ Context$
|
|
102401
|
-
[ FunctionDefinition
|
|
102402
|
-
[ ForExpression
|
|
102403
|
-
[ List
|
|
102404
|
-
[ IfExpression
|
|
102405
|
-
[ QuantifiedExpression
|
|
102406
|
-
[ PathExpression
|
|
102407
|
-
[ FunctionInvocation
|
|
102408
|
-
[ FilterExpression
|
|
102409
|
-
[ ArithmeticExpression
|
|
102401
|
+
const contextEnds = {
|
|
102402
|
+
[ Context$1 ]: 'Context',
|
|
102403
|
+
[ FunctionDefinition ]: 'FunctionDefinition',
|
|
102404
|
+
[ ForExpression ]: 'ForExpression',
|
|
102405
|
+
[ List ]: 'List',
|
|
102406
|
+
[ IfExpression ]: 'IfExpression',
|
|
102407
|
+
[ QuantifiedExpression ]: 'QuantifiedExpression',
|
|
102408
|
+
[ PathExpression ]: 'PathExpression',
|
|
102409
|
+
[ FunctionInvocation ]: 'FunctionInvocation',
|
|
102410
|
+
[ FilterExpression ]: 'FilterExpression',
|
|
102411
|
+
[ ArithmeticExpression ]: 'ArithmeticExpression'
|
|
102410
102412
|
};
|
|
102411
102413
|
|
|
102412
|
-
|
|
102414
|
+
class ValueProducer {
|
|
102413
102415
|
|
|
102414
102416
|
/**
|
|
102415
102417
|
* @param { Function } fn
|
|
@@ -102431,18 +102433,18 @@
|
|
|
102431
102433
|
return new ValueProducer(fn);
|
|
102432
102434
|
}
|
|
102433
102435
|
|
|
102434
|
-
}
|
|
102436
|
+
}
|
|
102435
102437
|
|
|
102436
|
-
const dateTimeLiterals
|
|
102438
|
+
const dateTimeLiterals = {
|
|
102437
102439
|
'date and time': 1,
|
|
102438
102440
|
'date': 1,
|
|
102439
102441
|
'time': 1,
|
|
102440
102442
|
'duration': 1
|
|
102441
102443
|
};
|
|
102442
102444
|
|
|
102443
|
-
const dateTimeIdentifiers
|
|
102445
|
+
const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
102444
102446
|
|
|
102445
|
-
|
|
102447
|
+
class Variables {
|
|
102446
102448
|
|
|
102447
102449
|
constructor({
|
|
102448
102450
|
name = 'Expressions',
|
|
@@ -102469,7 +102471,7 @@
|
|
|
102469
102471
|
parent: this
|
|
102470
102472
|
});
|
|
102471
102473
|
|
|
102472
|
-
LOG_VARS
|
|
102474
|
+
LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
|
|
102473
102475
|
|
|
102474
102476
|
return childScope;
|
|
102475
102477
|
}
|
|
@@ -102477,19 +102479,19 @@
|
|
|
102477
102479
|
exitScope(str) {
|
|
102478
102480
|
|
|
102479
102481
|
if (!this.parent) {
|
|
102480
|
-
LOG_VARS
|
|
102482
|
+
LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
102481
102483
|
|
|
102482
102484
|
return this;
|
|
102483
102485
|
}
|
|
102484
102486
|
|
|
102485
|
-
LOG_VARS
|
|
102487
|
+
LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
102486
102488
|
|
|
102487
102489
|
return this.parent.pushChild(this);
|
|
102488
102490
|
}
|
|
102489
102491
|
|
|
102490
102492
|
token(part) {
|
|
102491
102493
|
|
|
102492
|
-
LOG_VARS
|
|
102494
|
+
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
102493
102495
|
|
|
102494
102496
|
return this.assign({
|
|
102495
102497
|
tokens: [ ...this.tokens, part ]
|
|
@@ -102498,7 +102500,7 @@
|
|
|
102498
102500
|
|
|
102499
102501
|
literal(value) {
|
|
102500
102502
|
|
|
102501
|
-
LOG_VARS
|
|
102503
|
+
LOG_VARS && console.log('[%s] literal %o', this.path, value);
|
|
102502
102504
|
|
|
102503
102505
|
return this.pushChild(this.of({
|
|
102504
102506
|
name: 'Literal',
|
|
@@ -102512,7 +102514,7 @@
|
|
|
102512
102514
|
* @return {any}
|
|
102513
102515
|
*/
|
|
102514
102516
|
computedValue() {
|
|
102515
|
-
for (let scope = this;;scope = last
|
|
102517
|
+
for (let scope = this;;scope = last(scope.children)) {
|
|
102516
102518
|
|
|
102517
102519
|
if (!scope) {
|
|
102518
102520
|
return null;
|
|
@@ -102525,7 +102527,7 @@
|
|
|
102525
102527
|
}
|
|
102526
102528
|
|
|
102527
102529
|
contextKeys() {
|
|
102528
|
-
return Object.keys(this.context).map(normalizeContextKey
|
|
102530
|
+
return Object.keys(this.context).map(normalizeContextKey);
|
|
102529
102531
|
}
|
|
102530
102532
|
|
|
102531
102533
|
get path() {
|
|
@@ -102540,10 +102542,10 @@
|
|
|
102540
102542
|
*/
|
|
102541
102543
|
get(variable) {
|
|
102542
102544
|
|
|
102543
|
-
const names = [ variable, variable && normalizeContextKey
|
|
102545
|
+
const names = [ variable, variable && normalizeContextKey(variable) ];
|
|
102544
102546
|
|
|
102545
102547
|
const contextKey = Object.keys(this.context).find(
|
|
102546
|
-
key => names.includes(normalizeContextKey
|
|
102548
|
+
key => names.includes(normalizeContextKey(key))
|
|
102547
102549
|
);
|
|
102548
102550
|
|
|
102549
102551
|
if (typeof contextKey === 'undefined') {
|
|
@@ -102552,7 +102554,7 @@
|
|
|
102552
102554
|
|
|
102553
102555
|
const val = this.context[contextKey];
|
|
102554
102556
|
|
|
102555
|
-
if (val instanceof ValueProducer
|
|
102557
|
+
if (val instanceof ValueProducer) {
|
|
102556
102558
|
return val.get(this);
|
|
102557
102559
|
} else {
|
|
102558
102560
|
return val;
|
|
@@ -102575,7 +102577,7 @@
|
|
|
102575
102577
|
raw: variable
|
|
102576
102578
|
});
|
|
102577
102579
|
|
|
102578
|
-
LOG_VARS
|
|
102580
|
+
LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
102579
102581
|
|
|
102580
102582
|
return parentScope.pushChild(variableScope);
|
|
102581
102583
|
}
|
|
@@ -102614,7 +102616,7 @@
|
|
|
102614
102616
|
|
|
102615
102617
|
const variableName = this.tokens.join(' ');
|
|
102616
102618
|
|
|
102617
|
-
LOG_VARS
|
|
102619
|
+
LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
102618
102620
|
|
|
102619
102621
|
return this.assign({
|
|
102620
102622
|
tokens: []
|
|
@@ -102629,12 +102631,12 @@
|
|
|
102629
102631
|
define(name, value) {
|
|
102630
102632
|
|
|
102631
102633
|
if (typeof name !== 'string') {
|
|
102632
|
-
LOG_VARS
|
|
102634
|
+
LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
102633
102635
|
|
|
102634
102636
|
return this;
|
|
102635
102637
|
}
|
|
102636
102638
|
|
|
102637
|
-
LOG_VARS
|
|
102639
|
+
LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
102638
102640
|
|
|
102639
102641
|
const context = {
|
|
102640
102642
|
...this.context,
|
|
@@ -102701,14 +102703,14 @@
|
|
|
102701
102703
|
});
|
|
102702
102704
|
}
|
|
102703
102705
|
|
|
102704
|
-
}
|
|
102706
|
+
}
|
|
102705
102707
|
|
|
102706
102708
|
/**
|
|
102707
102709
|
* @param { string } name
|
|
102708
102710
|
*
|
|
102709
102711
|
* @return { string } normalizedName
|
|
102710
102712
|
*/
|
|
102711
|
-
function normalizeContextKey
|
|
102713
|
+
function normalizeContextKey(name) {
|
|
102712
102714
|
return name.replace(/\s*([./\-'+*])\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
102713
102715
|
}
|
|
102714
102716
|
|
|
@@ -102720,7 +102722,7 @@
|
|
|
102720
102722
|
* @param { string } code
|
|
102721
102723
|
* @return { Variables }
|
|
102722
102724
|
*/
|
|
102723
|
-
function wrap
|
|
102725
|
+
function wrap(variables, scopeName, code) {
|
|
102724
102726
|
|
|
102725
102727
|
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
102726
102728
|
const children = variables.children.filter(c => c.name === scopeName);
|
|
@@ -102746,9 +102748,9 @@
|
|
|
102746
102748
|
*
|
|
102747
102749
|
* @return { ContextTracker<Variables> }
|
|
102748
102750
|
*/
|
|
102749
|
-
function trackVariables
|
|
102751
|
+
function trackVariables(context = {}) {
|
|
102750
102752
|
|
|
102751
|
-
const start = Variables
|
|
102753
|
+
const start = Variables.of({
|
|
102752
102754
|
context
|
|
102753
102755
|
});
|
|
102754
102756
|
|
|
@@ -102756,7 +102758,7 @@
|
|
|
102756
102758
|
start,
|
|
102757
102759
|
reduce(variables, term, stack, input) {
|
|
102758
102760
|
|
|
102759
|
-
if (term === IfExpression
|
|
102761
|
+
if (term === IfExpression) {
|
|
102760
102762
|
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
102761
102763
|
|
|
102762
102764
|
variables = variables.assign({
|
|
@@ -102767,7 +102769,7 @@
|
|
|
102767
102769
|
});
|
|
102768
102770
|
}
|
|
102769
102771
|
|
|
102770
|
-
if (term === List
|
|
102772
|
+
if (term === List) {
|
|
102771
102773
|
variables = variables.assign({
|
|
102772
102774
|
value: variables.children.reduce((value, child) => {
|
|
102773
102775
|
return {
|
|
@@ -102778,7 +102780,7 @@
|
|
|
102778
102780
|
});
|
|
102779
102781
|
}
|
|
102780
102782
|
|
|
102781
|
-
if (term === FilterExpression
|
|
102783
|
+
if (term === FilterExpression) {
|
|
102782
102784
|
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
102783
102785
|
|
|
102784
102786
|
variables = variables.assign({
|
|
@@ -102786,7 +102788,7 @@
|
|
|
102786
102788
|
});
|
|
102787
102789
|
}
|
|
102788
102790
|
|
|
102789
|
-
if (term === FunctionInvocation
|
|
102791
|
+
if (term === FunctionInvocation) {
|
|
102790
102792
|
|
|
102791
102793
|
const [
|
|
102792
102794
|
name,
|
|
@@ -102795,17 +102797,17 @@
|
|
|
102795
102797
|
|
|
102796
102798
|
// preserve type information through `get value(context, key)` utility
|
|
102797
102799
|
if (name?.raw === 'get value') {
|
|
102798
|
-
variables = getContextValue
|
|
102800
|
+
variables = getContextValue(variables, args);
|
|
102799
102801
|
}
|
|
102800
102802
|
}
|
|
102801
102803
|
|
|
102802
|
-
const start = contextStarts
|
|
102804
|
+
const start = contextStarts[term];
|
|
102803
102805
|
|
|
102804
102806
|
if (start) {
|
|
102805
102807
|
return variables.enterScope(start);
|
|
102806
102808
|
}
|
|
102807
102809
|
|
|
102808
|
-
const prefixedStart = prefixedContextStarts
|
|
102810
|
+
const prefixedStart = prefixedContextStarts[term];
|
|
102809
102811
|
|
|
102810
102812
|
// pull <expression> into new <prefixedStart> context
|
|
102811
102813
|
if (prefixedStart) {
|
|
@@ -102816,15 +102818,15 @@
|
|
|
102816
102818
|
} = variables;
|
|
102817
102819
|
|
|
102818
102820
|
const children = currentChildren.slice(0, -1);
|
|
102819
|
-
const lastChild = last
|
|
102821
|
+
const lastChild = last(currentChildren);
|
|
102820
102822
|
|
|
102821
102823
|
let newContext = null;
|
|
102822
102824
|
|
|
102823
|
-
if (term === pathExpressionStart
|
|
102825
|
+
if (term === pathExpressionStart) {
|
|
102824
102826
|
newContext = lastChild?.computedValue();
|
|
102825
102827
|
}
|
|
102826
102828
|
|
|
102827
|
-
if (term === filterExpressionStart
|
|
102829
|
+
if (term === filterExpressionStart) {
|
|
102828
102830
|
newContext = {
|
|
102829
102831
|
...currentContext,
|
|
102830
102832
|
...lastChild?.computedValue(),
|
|
@@ -102841,19 +102843,19 @@
|
|
|
102841
102843
|
|
|
102842
102844
|
const code = input.read(input.pos, stack.pos);
|
|
102843
102845
|
|
|
102844
|
-
const end = contextEnds
|
|
102846
|
+
const end = contextEnds[term];
|
|
102845
102847
|
|
|
102846
102848
|
if (end) {
|
|
102847
102849
|
return variables.exitScope(code);
|
|
102848
102850
|
}
|
|
102849
102851
|
|
|
102850
|
-
if (term === ContextEntry
|
|
102852
|
+
if (term === ContextEntry) {
|
|
102851
102853
|
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
102852
102854
|
|
|
102853
102855
|
const name = parts[0];
|
|
102854
|
-
const value = last
|
|
102856
|
+
const value = last(parts);
|
|
102855
102857
|
|
|
102856
|
-
return wrap
|
|
102858
|
+
return wrap(variables, 'ContextEntry', code).assign(
|
|
102857
102859
|
{
|
|
102858
102860
|
value: {
|
|
102859
102861
|
...variables.value,
|
|
@@ -102864,27 +102866,27 @@
|
|
|
102864
102866
|
}
|
|
102865
102867
|
|
|
102866
102868
|
if (
|
|
102867
|
-
term === ForInExpression
|
|
102868
|
-
term === QuantifiedInExpression
|
|
102869
|
+
term === ForInExpression ||
|
|
102870
|
+
term === QuantifiedInExpression
|
|
102869
102871
|
) {
|
|
102870
|
-
return wrap
|
|
102872
|
+
return wrap(variables, 'InExpression', code);
|
|
102871
102873
|
}
|
|
102872
102874
|
|
|
102873
102875
|
// define <partial> within ForExpression body
|
|
102874
|
-
if (term === forExpressionBodyStart
|
|
102876
|
+
if (term === forExpressionBodyStart) {
|
|
102875
102877
|
|
|
102876
102878
|
return variables.define(
|
|
102877
102879
|
'partial',
|
|
102878
|
-
ValueProducer
|
|
102879
|
-
return last
|
|
102880
|
+
ValueProducer.of(variables => {
|
|
102881
|
+
return last(variables.children)?.computedValue();
|
|
102880
102882
|
})
|
|
102881
102883
|
);
|
|
102882
102884
|
}
|
|
102883
102885
|
|
|
102884
102886
|
if (
|
|
102885
|
-
term === ParameterName
|
|
102887
|
+
term === ParameterName
|
|
102886
102888
|
) {
|
|
102887
|
-
const name = last
|
|
102889
|
+
const name = last(variables.children).computedValue();
|
|
102888
102890
|
|
|
102889
102891
|
// TODO: attach type information
|
|
102890
102892
|
return variables.define(name, 1);
|
|
@@ -102892,71 +102894,71 @@
|
|
|
102892
102894
|
|
|
102893
102895
|
// pull <expression> into ArithmeticExpression child
|
|
102894
102896
|
if (
|
|
102895
|
-
term === arithmeticPlusStart
|
|
102896
|
-
term === arithmeticTimesStart
|
|
102897
|
-
term === arithmeticExpStart
|
|
102897
|
+
term === arithmeticPlusStart ||
|
|
102898
|
+
term === arithmeticTimesStart ||
|
|
102899
|
+
term === arithmeticExpStart
|
|
102898
102900
|
) {
|
|
102899
102901
|
const children = variables.children.slice(0, -1);
|
|
102900
|
-
const lastChild = last
|
|
102902
|
+
const lastChild = last(variables.children);
|
|
102901
102903
|
|
|
102902
102904
|
return variables.assign({
|
|
102903
102905
|
children
|
|
102904
102906
|
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
102905
102907
|
}
|
|
102906
102908
|
|
|
102907
|
-
if (term === arithmeticUnaryStart
|
|
102909
|
+
if (term === arithmeticUnaryStart) {
|
|
102908
102910
|
return variables.enterScope('ArithmeticExpression');
|
|
102909
102911
|
}
|
|
102910
102912
|
|
|
102911
102913
|
if (
|
|
102912
|
-
term === Identifier
|
|
102913
|
-
term === AdditionalIdentifier
|
|
102914
|
-
term === PropertyIdentifier
|
|
102914
|
+
term === Identifier ||
|
|
102915
|
+
term === AdditionalIdentifier ||
|
|
102916
|
+
term === PropertyIdentifier
|
|
102915
102917
|
) {
|
|
102916
102918
|
return variables.token(code);
|
|
102917
102919
|
}
|
|
102918
102920
|
|
|
102919
102921
|
if (
|
|
102920
|
-
term === StringLiteral
|
|
102922
|
+
term === StringLiteral
|
|
102921
102923
|
) {
|
|
102922
102924
|
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
102923
102925
|
}
|
|
102924
102926
|
|
|
102925
|
-
if (term === BooleanLiteral
|
|
102927
|
+
if (term === BooleanLiteral) {
|
|
102926
102928
|
return variables.literal(code === 'true' ? true : false);
|
|
102927
102929
|
}
|
|
102928
102930
|
|
|
102929
|
-
if (term === NumericLiteral
|
|
102931
|
+
if (term === NumericLiteral) {
|
|
102930
102932
|
return variables.literal(parseFloat(code));
|
|
102931
102933
|
}
|
|
102932
102934
|
|
|
102933
|
-
if (term === nil
|
|
102935
|
+
if (term === nil) {
|
|
102934
102936
|
return variables.literal(null);
|
|
102935
102937
|
}
|
|
102936
102938
|
|
|
102937
102939
|
if (
|
|
102938
|
-
term === VariableName
|
|
102940
|
+
term === VariableName
|
|
102939
102941
|
) {
|
|
102940
102942
|
return variables.resolveName();
|
|
102941
102943
|
}
|
|
102942
102944
|
|
|
102943
102945
|
if (
|
|
102944
|
-
term === Name
|
|
102945
|
-
term === PropertyName
|
|
102946
|
+
term === Name ||
|
|
102947
|
+
term === PropertyName
|
|
102946
102948
|
) {
|
|
102947
102949
|
return variables.declareName();
|
|
102948
102950
|
}
|
|
102949
102951
|
|
|
102950
102952
|
if (
|
|
102951
|
-
term === expression0
|
|
102952
|
-
term === PositiveUnaryTest
|
|
102953
|
+
term === expression0 ||
|
|
102954
|
+
term === PositiveUnaryTest
|
|
102953
102955
|
) {
|
|
102954
102956
|
if (variables.tokens.length > 0) {
|
|
102955
102957
|
throw new Error('uncleared name');
|
|
102956
102958
|
}
|
|
102957
102959
|
}
|
|
102958
102960
|
|
|
102959
|
-
if (term === expression0
|
|
102961
|
+
if (term === expression0) {
|
|
102960
102962
|
|
|
102961
102963
|
let parent = variables;
|
|
102962
102964
|
|
|
@@ -102972,12 +102974,12 @@
|
|
|
102972
102974
|
});
|
|
102973
102975
|
}
|
|
102974
102976
|
|
|
102975
|
-
const variableTracker
|
|
102977
|
+
const variableTracker = trackVariables({});
|
|
102976
102978
|
|
|
102977
102979
|
|
|
102978
102980
|
// helpers //////////////
|
|
102979
102981
|
|
|
102980
|
-
function getContextValue
|
|
102982
|
+
function getContextValue(variables, args) {
|
|
102981
102983
|
|
|
102982
102984
|
if (!args.length) {
|
|
102983
102985
|
return variables.assign({
|
|
@@ -102986,7 +102988,7 @@
|
|
|
102986
102988
|
}
|
|
102987
102989
|
|
|
102988
102990
|
if (args[0].name === 'Name') {
|
|
102989
|
-
args = extractNamedArgs
|
|
102991
|
+
args = extractNamedArgs(args, [ 'm', 'key' ]);
|
|
102990
102992
|
}
|
|
102991
102993
|
|
|
102992
102994
|
if (args.length !== 2) {
|
|
@@ -103012,7 +103014,7 @@
|
|
|
103012
103014
|
}
|
|
103013
103015
|
|
|
103014
103016
|
return variables.assign({
|
|
103015
|
-
value: [ normalizeContextKey
|
|
103017
|
+
value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
103016
103018
|
if (keyValue in contextValue) {
|
|
103017
103019
|
return contextValue[keyValue];
|
|
103018
103020
|
}
|
|
@@ -103022,7 +103024,7 @@
|
|
|
103022
103024
|
});
|
|
103023
103025
|
}
|
|
103024
103026
|
|
|
103025
|
-
function extractNamedArgs
|
|
103027
|
+
function extractNamedArgs(args, argNames) {
|
|
103026
103028
|
|
|
103027
103029
|
const context = {};
|
|
103028
103030
|
|
|
@@ -103035,11 +103037,11 @@
|
|
|
103035
103037
|
return argNames.map(name => context[name]);
|
|
103036
103038
|
}
|
|
103037
103039
|
|
|
103038
|
-
function last
|
|
103040
|
+
function last(arr) {
|
|
103039
103041
|
return arr[arr.length - 1];
|
|
103040
103042
|
}
|
|
103041
103043
|
|
|
103042
|
-
const feelHighlighting
|
|
103044
|
+
const feelHighlighting = styleTags({
|
|
103043
103045
|
StringLiteral: tags$1.string,
|
|
103044
103046
|
NumericLiteral: tags$1.number,
|
|
103045
103047
|
BooleanLiteral: tags$1.bool,
|
|
@@ -103072,28 +103074,28 @@
|
|
|
103072
103074
|
});
|
|
103073
103075
|
|
|
103074
103076
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
103075
|
-
const spec_identifier
|
|
103076
|
-
const parser$
|
|
103077
|
+
const spec_identifier = {__proto__:null,for:10, in:30, return:34, if:38, then:40, else:42, some:46, every:48, satisfies:55, or:58, and:62, between:70, instance:86, of:89, days:99, time:101, duration:103, years:105, months:107, date:109, list:115, context:121, function:128, null:154, true:324, false:324, "?":168, external:184, not:207};
|
|
103078
|
+
const parser$1 = LRParser.deserialize({
|
|
103077
103079
|
version: 14,
|
|
103078
103080
|
states: "IWO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQ^O'#FOOOQQ'#Fd'#FdO'dQYO'#FdO`QYO'#DUOOQU'#Em'#EmO)QQ^O'#D]OOQO'#Fk'#FkO,PQWO'#DuOOQU'#D|'#D|OOQU'#D}'#D}OOQU'#EO'#EOO,UOWO'#ERO,PQWO'#EPOOQU'#EP'#EPO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h#anOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR#Pn",
|
|
103081
103083
|
nodeNames: "⚠ LineComment BlockComment Expressions ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression ArithOp InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier UnaryTests Wildcard not",
|
|
103082
103084
|
maxTerm: 175,
|
|
103083
|
-
context: variableTracker
|
|
103085
|
+
context: variableTracker,
|
|
103084
103086
|
nodeProps: [
|
|
103085
103087
|
["group", -17,4,18,22,28,30,32,40,42,67,69,71,84,85,87,88,89,96,"Expression",47,"Expression Expression",-5,77,78,79,80,81,"Expression Literal"],
|
|
103086
103088
|
["closedBy", 37,")",70,"]",95,"}"],
|
|
103087
103089
|
["openedBy", 39,"(",68,"[",94,"{"]
|
|
103088
103090
|
],
|
|
103089
|
-
propSources: [feelHighlighting
|
|
103091
|
+
propSources: [feelHighlighting],
|
|
103090
103092
|
skippedNodes: [0,1,2],
|
|
103091
103093
|
repeatNodeCount: 14,
|
|
103092
103094
|
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#p~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#q~~$cP!_!`$f~$kOq~~$pW$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$g~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#y~~&mOu~~&rOw~~&wP^~z{&z~'POy~~'UO[~~'ZO#|~R'`PZP!`!a'cQ'hO$[Q~'mQ#x~!O!P's!Q!['x~'xO#{~~'}P$f~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$f~!O!P*W!Q![){~*ZP!Q!['x~*cO$Y~~*hO$u~R*oP![QrP!_!`*rP*wOrPR+OP!XQrP!_!`*r~+WO$i~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
103093
|
-
tokenizers: [propertyIdentifiers
|
|
103095
|
+
tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
|
|
103094
103096
|
topRules: {"Expressions":[0,3],"UnaryTests":[1,101]},
|
|
103095
103097
|
dynamicPrecedences: {"30":-1,"71":-1,"73":-1,"126":-1},
|
|
103096
|
-
specialized: [{term: 120, get: value => spec_identifier
|
|
103098
|
+
specialized: [{term: 120, get: value => spec_identifier[value] || -1}],
|
|
103097
103099
|
tokenPrec: 0
|
|
103098
103100
|
});
|
|
103099
103101
|
|
|
@@ -103645,7 +103647,7 @@
|
|
|
103645
103647
|
});
|
|
103646
103648
|
|
|
103647
103649
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
103648
|
-
const parser
|
|
103650
|
+
const parser = LRParser.deserialize({
|
|
103649
103651
|
version: 14,
|
|
103650
103652
|
states: "$bOQOaOOOfOXO'#CbOOO`'#Cm'#CmOqOWO'#CcOvOWO'#CfOOO`'#Cp'#CpOOO`'#Ci'#CiO{OaO'#ClO!jOSOOQOOOOOO!oOPO,58{O!tOXO,58|OOO`,58|,58|O!|OQO,58}O#ROQO,59QOOO`-E6g-E6gOOO`1G.g1G.gO#WOPO1G.gOOO`1G.h1G.hO#]OaO1G.iO#qOaO1G.lOOO`7+$R7+$RO$VOPO7+$TO$_OPO7+$WOOO`<<Go<<GoOOO`<<Gr<<Gr",
|
|
103651
103653
|
stateData: "$g~ORUO_WObPOeROgSO^`P~OQYO_ZOc[O~OQ]O~OQ^O~ORUObPOeROgSO^`XW`XX`XZ`X[`X~OPXO~Oc`O~OQaOcbO~OfcO~OfdO~OceO~ORUObPOeROgSOW`PX`P~ORUObPOeROgSOZ`P[`P~OWhOXhO~OZiO[iO~O",
|
|
@@ -103712,7 +103714,7 @@
|
|
|
103712
103714
|
strict = false
|
|
103713
103715
|
} = options;
|
|
103714
103716
|
|
|
103715
|
-
const parseTree = parser
|
|
103717
|
+
const parseTree = parser.parse(templateString);
|
|
103716
103718
|
|
|
103717
103719
|
const simpleTreeRoot = buildSimpleTree(parseTree, templateString);
|
|
103718
103720
|
|
|
@@ -103868,12 +103870,12 @@
|
|
|
103868
103870
|
};
|
|
103869
103871
|
|
|
103870
103872
|
function createMixedLanguage(hostLanguage = null) {
|
|
103871
|
-
const _mixedParser = parser
|
|
103873
|
+
const _mixedParser = parser.configure({
|
|
103872
103874
|
|
|
103873
103875
|
wrap: parseMixed(node => {
|
|
103874
103876
|
|
|
103875
103877
|
if (node.name == 'Feel' || node.name == 'FeelBlock') {
|
|
103876
|
-
return { parser: parser$
|
|
103878
|
+
return { parser: parser$1 };
|
|
103877
103879
|
}
|
|
103878
103880
|
|
|
103879
103881
|
if (hostLanguage && node.name == 'SimpleTextBlock') {
|
|
@@ -104049,7 +104051,7 @@
|
|
|
104049
104051
|
const _getHostLanguageParser = (hostLanguage) => {
|
|
104050
104052
|
switch (hostLanguage) {
|
|
104051
104053
|
case 'markdown':
|
|
104052
|
-
return parser$
|
|
104054
|
+
return parser$2;
|
|
104053
104055
|
default:
|
|
104054
104056
|
return null;
|
|
104055
104057
|
}
|
|
@@ -104178,7 +104180,7 @@
|
|
|
104178
104180
|
// / parser](https://github.com/nikku/lezer-feel), extended with
|
|
104179
104181
|
// / highlighting and indentation information.
|
|
104180
104182
|
const feelLanguage = /*@__PURE__*/LRLanguage.define({
|
|
104181
|
-
parser: /*@__PURE__*/parser$
|
|
104183
|
+
parser: /*@__PURE__*/parser$3.configure({
|
|
104182
104184
|
props: [
|
|
104183
104185
|
/*@__PURE__*/indentNodeProp.add({
|
|
104184
104186
|
'Context': /*@__PURE__*/delimitedIndent({
|
|
@@ -107207,20 +107209,24 @@
|
|
|
107207
107209
|
|
|
107208
107210
|
// set edited state depending on all entries
|
|
107209
107211
|
p$2(() => {
|
|
107210
|
-
|
|
107211
|
-
|
|
107212
|
-
|
|
107213
|
-
|
|
107214
|
-
|
|
107215
|
-
|
|
107216
|
-
|
|
107217
|
-
|
|
107218
|
-
|
|
107219
|
-
|
|
107220
|
-
|
|
107212
|
+
// TODO(@barmac): replace with CSS when `:has()` is supported in all major browsers, or rewrite as in https://github.com/camunda/camunda-modeler/issues/3815#issuecomment-1733038161
|
|
107213
|
+
const scheduled = requestAnimationFrame(() => {
|
|
107214
|
+
const hasOneEditedEntry = entries.find(entry => {
|
|
107215
|
+
const {
|
|
107216
|
+
id,
|
|
107217
|
+
isEdited
|
|
107218
|
+
} = entry;
|
|
107219
|
+
const entryNode = query$1(`[data-entry-id="${id}"]`);
|
|
107220
|
+
if (!isFunction$1(isEdited) || !entryNode) {
|
|
107221
|
+
return false;
|
|
107222
|
+
}
|
|
107223
|
+
const inputNode = query$1('.bio-properties-panel-input', entryNode);
|
|
107224
|
+
return isEdited(inputNode);
|
|
107225
|
+
});
|
|
107226
|
+
setEdited(hasOneEditedEntry);
|
|
107221
107227
|
});
|
|
107222
|
-
|
|
107223
|
-
}, [entries]);
|
|
107228
|
+
return () => cancelAnimationFrame(scheduled);
|
|
107229
|
+
}, [entries, setEdited]);
|
|
107224
107230
|
|
|
107225
107231
|
// set error state depending on all entries
|
|
107226
107232
|
const allErrors = useErrors();
|
|
@@ -107654,7 +107660,11 @@
|
|
|
107654
107660
|
// (2) setup drag listeners
|
|
107655
107661
|
|
|
107656
107662
|
// attach drag + cleanup event
|
|
107657
|
-
|
|
107663
|
+
// we need to do this to make sure we track cursor
|
|
107664
|
+
// movements before we reach other drag event handlers,
|
|
107665
|
+
// e.g. in child containers.
|
|
107666
|
+
document.addEventListener('dragover', onDrag, true);
|
|
107667
|
+
document.addEventListener('dragenter', preventDefault, true);
|
|
107658
107668
|
document.addEventListener('dragend', onEnd);
|
|
107659
107669
|
document.addEventListener('drop', preventDefault);
|
|
107660
107670
|
}
|
|
@@ -107668,7 +107678,8 @@
|
|
|
107668
107678
|
return fn.call(self, event, delta);
|
|
107669
107679
|
}
|
|
107670
107680
|
function onEnd() {
|
|
107671
|
-
document.removeEventListener('dragover', onDrag);
|
|
107681
|
+
document.removeEventListener('dragover', onDrag, true);
|
|
107682
|
+
document.removeEventListener('dragenter', preventDefault, true);
|
|
107672
107683
|
document.removeEventListener('dragend', onEnd);
|
|
107673
107684
|
document.removeEventListener('drop', preventDefault);
|
|
107674
107685
|
}
|
|
@@ -107690,6 +107701,7 @@
|
|
|
107690
107701
|
* @param {Object} props
|
|
107691
107702
|
* @param {HTMLElement} [props.container]
|
|
107692
107703
|
* @param {string} [props.className]
|
|
107704
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
107693
107705
|
* @param {{x: number, y: number}} [props.position]
|
|
107694
107706
|
* @param {number} [props.width]
|
|
107695
107707
|
* @param {number} [props.height]
|
|
@@ -107697,12 +107709,15 @@
|
|
|
107697
107709
|
* @param {Function} [props.onPostActivate]
|
|
107698
107710
|
* @param {Function} [props.onPostDeactivate]
|
|
107699
107711
|
* @param {boolean} [props.returnFocus]
|
|
107712
|
+
* @param {boolean} [props.closeOnEscape]
|
|
107700
107713
|
* @param {string} props.title
|
|
107714
|
+
* @param {Ref} [ref]
|
|
107701
107715
|
*/
|
|
107702
|
-
function
|
|
107716
|
+
function PopupComponent(props, globalRef) {
|
|
107703
107717
|
const {
|
|
107704
107718
|
container,
|
|
107705
107719
|
className,
|
|
107720
|
+
delayInitialFocus,
|
|
107706
107721
|
position,
|
|
107707
107722
|
width,
|
|
107708
107723
|
height,
|
|
@@ -107710,12 +107725,16 @@
|
|
|
107710
107725
|
onPostActivate = noop$3,
|
|
107711
107726
|
onPostDeactivate = noop$3,
|
|
107712
107727
|
returnFocus = true,
|
|
107728
|
+
closeOnEscape = true,
|
|
107713
107729
|
title
|
|
107714
107730
|
} = props;
|
|
107715
107731
|
const focusTrapRef = _$2(null);
|
|
107716
|
-
const
|
|
107717
|
-
const
|
|
107718
|
-
|
|
107732
|
+
const localRef = _$2(null);
|
|
107733
|
+
const popupRef = globalRef || localRef;
|
|
107734
|
+
const handleKeydown = event => {
|
|
107735
|
+
// do not allow keyboard events to bubble
|
|
107736
|
+
event.stopPropagation();
|
|
107737
|
+
if (closeOnEscape && event.key === 'Escape') {
|
|
107719
107738
|
onClose();
|
|
107720
107739
|
}
|
|
107721
107740
|
};
|
|
@@ -107740,14 +107759,6 @@
|
|
|
107740
107759
|
if (height) {
|
|
107741
107760
|
style.height = height + 'px';
|
|
107742
107761
|
}
|
|
107743
|
-
p$2(() => {
|
|
107744
|
-
if (popupRef.current) {
|
|
107745
|
-
popupRef.current.addEventListener('keydown', handleKeyPress);
|
|
107746
|
-
}
|
|
107747
|
-
return () => {
|
|
107748
|
-
popupRef.current.removeEventListener('keydown', handleKeyPress);
|
|
107749
|
-
};
|
|
107750
|
-
}, [popupRef]);
|
|
107751
107762
|
p$2(() => {
|
|
107752
107763
|
if (popupRef.current) {
|
|
107753
107764
|
popupRef.current.addEventListener('focusin', handleFocus);
|
|
@@ -107760,6 +107771,7 @@
|
|
|
107760
107771
|
if (popupRef.current) {
|
|
107761
107772
|
focusTrapRef.current = createFocusTrap(popupRef.current, {
|
|
107762
107773
|
clickOutsideDeactivates: true,
|
|
107774
|
+
delayInitialFocus,
|
|
107763
107775
|
fallbackFocus: popupRef.current,
|
|
107764
107776
|
onPostActivate,
|
|
107765
107777
|
onPostDeactivate,
|
|
@@ -107773,12 +107785,14 @@
|
|
|
107773
107785
|
"aria-label": title,
|
|
107774
107786
|
tabIndex: -1,
|
|
107775
107787
|
ref: popupRef,
|
|
107788
|
+
onKeyDown: handleKeydown,
|
|
107776
107789
|
role: "dialog",
|
|
107777
107790
|
class: classNames('bio-properties-panel-popup', className),
|
|
107778
107791
|
style: style,
|
|
107779
107792
|
children: props.children
|
|
107780
107793
|
}), container || document.body);
|
|
107781
107794
|
}
|
|
107795
|
+
const Popup = k(PopupComponent);
|
|
107782
107796
|
Popup.Title = Title;
|
|
107783
107797
|
Popup.Body = Body;
|
|
107784
107798
|
Popup.Footer = Footer;
|
|
@@ -107787,6 +107801,7 @@
|
|
|
107787
107801
|
children,
|
|
107788
107802
|
className,
|
|
107789
107803
|
draggable,
|
|
107804
|
+
emit = () => {},
|
|
107790
107805
|
title,
|
|
107791
107806
|
...rest
|
|
107792
107807
|
} = props;
|
|
@@ -107799,7 +107814,8 @@
|
|
|
107799
107814
|
});
|
|
107800
107815
|
const dragPreviewRef = _$2();
|
|
107801
107816
|
const titleRef = _$2();
|
|
107802
|
-
const onMove =
|
|
107817
|
+
const onMove = (event, delta) => {
|
|
107818
|
+
cancel(event);
|
|
107803
107819
|
const {
|
|
107804
107820
|
x: dx,
|
|
107805
107821
|
y: dy
|
|
@@ -107811,20 +107827,33 @@
|
|
|
107811
107827
|
const popupParent = getPopupParent(titleRef.current);
|
|
107812
107828
|
popupParent.style.top = newPosition.y + 'px';
|
|
107813
107829
|
popupParent.style.left = newPosition.x + 'px';
|
|
107814
|
-
|
|
107830
|
+
|
|
107831
|
+
// notify interested parties
|
|
107832
|
+
emit('dragover', {
|
|
107833
|
+
newPosition,
|
|
107834
|
+
delta
|
|
107835
|
+
});
|
|
107836
|
+
};
|
|
107815
107837
|
const onMoveStart = event => {
|
|
107816
107838
|
// initialize drag handler
|
|
107817
107839
|
const onDragStart = createDragger(onMove, dragPreviewRef.current);
|
|
107818
107840
|
onDragStart(event);
|
|
107841
|
+
event.stopPropagation();
|
|
107819
107842
|
const popupParent = getPopupParent(titleRef.current);
|
|
107820
107843
|
const bounds = popupParent.getBoundingClientRect();
|
|
107821
107844
|
context.current.startPosition = {
|
|
107822
107845
|
x: bounds.left,
|
|
107823
107846
|
y: bounds.top
|
|
107824
107847
|
};
|
|
107848
|
+
|
|
107849
|
+
// notify interested parties
|
|
107850
|
+
emit('dragstart');
|
|
107825
107851
|
};
|
|
107826
107852
|
const onMoveEnd = () => {
|
|
107827
107853
|
context.current.newPosition = null;
|
|
107854
|
+
|
|
107855
|
+
// notify interested parties
|
|
107856
|
+
emit('dragend');
|
|
107828
107857
|
};
|
|
107829
107858
|
return o$3("div", {
|
|
107830
107859
|
class: classNames('bio-properties-panel-popup__header', draggable && 'draggable', className),
|
|
@@ -107877,27 +107906,53 @@
|
|
|
107877
107906
|
function getPopupParent(node) {
|
|
107878
107907
|
return node.closest('.bio-properties-panel-popup');
|
|
107879
107908
|
}
|
|
107909
|
+
function cancel(event) {
|
|
107910
|
+
event.preventDefault();
|
|
107911
|
+
event.stopPropagation();
|
|
107912
|
+
}
|
|
107880
107913
|
|
|
107881
107914
|
const FEEL_POPUP_WIDTH = 700;
|
|
107882
107915
|
const FEEL_POPUP_HEIGHT = 250;
|
|
107883
107916
|
|
|
107884
107917
|
/**
|
|
107885
|
-
* FEEL popup component, built as a singleton.
|
|
107918
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
107919
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
107920
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
107921
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
107922
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
107886
107923
|
*/
|
|
107887
107924
|
function FEELPopupRoot(props) {
|
|
107888
107925
|
const {
|
|
107889
|
-
element
|
|
107926
|
+
element,
|
|
107927
|
+
eventBus = {
|
|
107928
|
+
fire() {},
|
|
107929
|
+
on() {},
|
|
107930
|
+
off() {}
|
|
107931
|
+
},
|
|
107932
|
+
popupContainer
|
|
107890
107933
|
} = props;
|
|
107891
107934
|
const prevElement = usePrevious(element);
|
|
107892
107935
|
const [popupConfig, setPopupConfig] = h({});
|
|
107893
107936
|
const [open, setOpen] = h(false);
|
|
107894
107937
|
const [source, setSource] = h(null);
|
|
107895
107938
|
const [sourceElement, setSourceElement] = h(null);
|
|
107896
|
-
const
|
|
107897
|
-
|
|
107939
|
+
const emit = (type, context) => {
|
|
107940
|
+
eventBus.fire('feelPopup.' + type, context);
|
|
107941
|
+
};
|
|
107942
|
+
const isOpen = T$2(() => {
|
|
107943
|
+
return !!open;
|
|
107944
|
+
}, [open]);
|
|
107945
|
+
useUpdateEffect(() => {
|
|
107946
|
+
if (!open) {
|
|
107947
|
+
emit('closed');
|
|
107948
|
+
}
|
|
107949
|
+
}, [open]);
|
|
107950
|
+
const handleOpen = (entryId, config, _sourceElement) => {
|
|
107951
|
+
setSource(entryId);
|
|
107898
107952
|
setPopupConfig(config);
|
|
107899
107953
|
setOpen(true);
|
|
107900
107954
|
setSourceElement(_sourceElement);
|
|
107955
|
+
emit('open');
|
|
107901
107956
|
};
|
|
107902
107957
|
const handleClose = () => {
|
|
107903
107958
|
setOpen(false);
|
|
@@ -107911,21 +107966,47 @@
|
|
|
107911
107966
|
|
|
107912
107967
|
// close popup on element change, cf. https://github.com/bpmn-io/properties-panel/issues/270
|
|
107913
107968
|
p$2(() => {
|
|
107914
|
-
if (element && element !== prevElement) {
|
|
107969
|
+
if (element && prevElement && element !== prevElement) {
|
|
107915
107970
|
handleClose();
|
|
107916
107971
|
}
|
|
107917
107972
|
}, [element]);
|
|
107973
|
+
|
|
107974
|
+
// allow close and open via events
|
|
107975
|
+
p$2(() => {
|
|
107976
|
+
const handlePopupOpen = context => {
|
|
107977
|
+
const {
|
|
107978
|
+
entryId,
|
|
107979
|
+
popupConfig,
|
|
107980
|
+
sourceElement
|
|
107981
|
+
} = context;
|
|
107982
|
+
handleOpen(entryId, popupConfig, sourceElement);
|
|
107983
|
+
};
|
|
107984
|
+
const handleIsOpen = () => {
|
|
107985
|
+
return isOpen();
|
|
107986
|
+
};
|
|
107987
|
+
eventBus.on('feelPopup._close', handleClose);
|
|
107988
|
+
eventBus.on('feelPopup._open', handlePopupOpen);
|
|
107989
|
+
eventBus.on('feelPopup._isOpen', handleIsOpen);
|
|
107990
|
+
return () => {
|
|
107991
|
+
eventBus.off('feelPopup._close', handleClose);
|
|
107992
|
+
eventBus.off('feelPopup._open', handleOpen);
|
|
107993
|
+
eventBus.off('feelPopup._isOpen', handleIsOpen);
|
|
107994
|
+
};
|
|
107995
|
+
}, [eventBus, isOpen]);
|
|
107918
107996
|
return o$3(FeelPopupContext.Provider, {
|
|
107919
107997
|
value: feelPopupContext,
|
|
107920
107998
|
children: [open && o$3(FeelPopupComponent, {
|
|
107921
107999
|
onClose: handleClose,
|
|
108000
|
+
container: popupContainer,
|
|
107922
108001
|
sourceElement: sourceElement,
|
|
108002
|
+
emit: emit,
|
|
107923
108003
|
...popupConfig
|
|
107924
108004
|
}), props.children]
|
|
107925
108005
|
});
|
|
107926
108006
|
}
|
|
107927
108007
|
function FeelPopupComponent(props) {
|
|
107928
108008
|
const {
|
|
108009
|
+
container,
|
|
107929
108010
|
id,
|
|
107930
108011
|
hostLanguage,
|
|
107931
108012
|
onInput,
|
|
@@ -107937,20 +108018,45 @@
|
|
|
107937
108018
|
tooltipContainer,
|
|
107938
108019
|
type,
|
|
107939
108020
|
value,
|
|
107940
|
-
variables
|
|
108021
|
+
variables,
|
|
108022
|
+
emit
|
|
107941
108023
|
} = props;
|
|
107942
108024
|
const editorRef = _$2();
|
|
108025
|
+
const popupRef = _$2();
|
|
108026
|
+
const isAutoCompletionOpen = _$2(false);
|
|
107943
108027
|
const handleSetReturnFocus = () => {
|
|
107944
108028
|
sourceElement && sourceElement.focus();
|
|
107945
108029
|
};
|
|
107946
|
-
|
|
107947
|
-
|
|
107948
|
-
if (
|
|
107949
|
-
|
|
108030
|
+
const onKeyDownCapture = event => {
|
|
108031
|
+
// we use capture here to make sure we handle the event before the editor does
|
|
108032
|
+
if (event.key === 'Escape') {
|
|
108033
|
+
isAutoCompletionOpen.current = autoCompletionOpen(event.target);
|
|
108034
|
+
}
|
|
108035
|
+
};
|
|
108036
|
+
const onKeyDown = event => {
|
|
108037
|
+
if (event.key === 'Escape') {
|
|
108038
|
+
// close popup only if auto completion is not open
|
|
108039
|
+
// we need to do check this because the editor is not
|
|
108040
|
+
// stop propagating the keydown event
|
|
108041
|
+
// cf. https://discuss.codemirror.net/t/how-can-i-replace-the-default-autocompletion-keymap-v6/3322/5
|
|
108042
|
+
if (!isAutoCompletionOpen.current) {
|
|
108043
|
+
onClose();
|
|
108044
|
+
isAutoCompletionOpen.current = false;
|
|
108045
|
+
}
|
|
107950
108046
|
}
|
|
107951
|
-
}
|
|
108047
|
+
};
|
|
108048
|
+
p$2(() => {
|
|
108049
|
+
emit('opened', {
|
|
108050
|
+
domNode: popupRef.current
|
|
108051
|
+
});
|
|
108052
|
+
return () => emit('close', {
|
|
108053
|
+
domNode: popupRef.current
|
|
108054
|
+
});
|
|
108055
|
+
}, []);
|
|
107952
108056
|
return o$3(Popup, {
|
|
108057
|
+
container: container,
|
|
107953
108058
|
className: "bio-properties-panel-feel-popup",
|
|
108059
|
+
emit: emit,
|
|
107954
108060
|
position: position,
|
|
107955
108061
|
title: title,
|
|
107956
108062
|
onClose: onClose
|
|
@@ -107958,14 +108064,20 @@
|
|
|
107958
108064
|
// handle focus manually on deactivate
|
|
107959
108065
|
,
|
|
107960
108066
|
returnFocus: false,
|
|
108067
|
+
closeOnEscape: false,
|
|
108068
|
+
delayInitialFocus: false,
|
|
107961
108069
|
onPostDeactivate: handleSetReturnFocus,
|
|
107962
108070
|
height: FEEL_POPUP_HEIGHT,
|
|
107963
108071
|
width: FEEL_POPUP_WIDTH,
|
|
108072
|
+
ref: popupRef,
|
|
107964
108073
|
children: [o$3(Popup.Title, {
|
|
107965
108074
|
title: title,
|
|
108075
|
+
emit: emit,
|
|
107966
108076
|
draggable: true
|
|
107967
108077
|
}), o$3(Popup.Body, {
|
|
107968
108078
|
children: o$3("div", {
|
|
108079
|
+
onKeyDownCapture: onKeyDownCapture,
|
|
108080
|
+
onKeyDown: onKeyDown,
|
|
107969
108081
|
class: "bio-properties-panel-feel-popup__body",
|
|
107970
108082
|
children: [type === 'feel' && o$3(CodeEditor, {
|
|
107971
108083
|
enableGutters: true,
|
|
@@ -108007,6 +108119,26 @@
|
|
|
108007
108119
|
function prefixId$8(id) {
|
|
108008
108120
|
return `bio-properties-panel-${id}`;
|
|
108009
108121
|
}
|
|
108122
|
+
function autoCompletionOpen(element) {
|
|
108123
|
+
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
108124
|
+
}
|
|
108125
|
+
|
|
108126
|
+
/**
|
|
108127
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
108128
|
+
*
|
|
108129
|
+
* @param {Function} effect
|
|
108130
|
+
* @param {Array} deps
|
|
108131
|
+
*/
|
|
108132
|
+
function useUpdateEffect(effect, deps) {
|
|
108133
|
+
const isMounted = _$2(false);
|
|
108134
|
+
p$2(() => {
|
|
108135
|
+
if (isMounted.current) {
|
|
108136
|
+
return effect();
|
|
108137
|
+
} else {
|
|
108138
|
+
isMounted.current = true;
|
|
108139
|
+
}
|
|
108140
|
+
}, deps);
|
|
108141
|
+
}
|
|
108010
108142
|
|
|
108011
108143
|
function ToggleSwitch(props) {
|
|
108012
108144
|
const {
|
|
@@ -108675,7 +108807,7 @@
|
|
|
108675
108807
|
setLocalError(err);
|
|
108676
108808
|
}, []);
|
|
108677
108809
|
const temporaryError = useError(id);
|
|
108678
|
-
const error =
|
|
108810
|
+
const error = temporaryError || localError || validationError;
|
|
108679
108811
|
return o$3("div", {
|
|
108680
108812
|
class: classNames(props.class, 'bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
108681
108813
|
"data-entry-id": id,
|
|
@@ -108765,7 +108897,7 @@
|
|
|
108765
108897
|
|
|
108766
108898
|
// todo(pinussilvestrus): make this configurable in the future
|
|
108767
108899
|
function getPopupTitle(element, label) {
|
|
108768
|
-
let popupTitle;
|
|
108900
|
+
let popupTitle = '';
|
|
108769
108901
|
if (element && element.type) {
|
|
108770
108902
|
popupTitle = `${element.type} / `;
|
|
108771
108903
|
}
|
|
@@ -108853,6 +108985,7 @@
|
|
|
108853
108985
|
* @param {Function} [props.descriptionLoaded]
|
|
108854
108986
|
* @param {TooltipConfig} [props.tooltipConfig]
|
|
108855
108987
|
* @param {Function} [props.tooltipLoaded]
|
|
108988
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
108856
108989
|
* @param {Object} [props.eventBus]
|
|
108857
108990
|
*/
|
|
108858
108991
|
function PropertiesPanel(props) {
|
|
@@ -108867,6 +109000,7 @@
|
|
|
108867
109000
|
descriptionLoaded,
|
|
108868
109001
|
tooltipConfig,
|
|
108869
109002
|
tooltipLoaded,
|
|
109003
|
+
feelPopupContainer,
|
|
108870
109004
|
eventBus
|
|
108871
109005
|
} = props;
|
|
108872
109006
|
|
|
@@ -108969,6 +109103,8 @@
|
|
|
108969
109103
|
value: eventContext,
|
|
108970
109104
|
children: o$3(FEELPopupRoot, {
|
|
108971
109105
|
element: element,
|
|
109106
|
+
eventBus: eventBus,
|
|
109107
|
+
popupContainer: feelPopupContainer,
|
|
108972
109108
|
children: o$3("div", {
|
|
108973
109109
|
class: "bio-properties-panel",
|
|
108974
109110
|
children: [o$3(Header$1, {
|
|
@@ -110029,10 +110165,51 @@
|
|
|
110029
110165
|
}
|
|
110030
110166
|
debounceInput.$inject = ['config.debounceInput'];
|
|
110031
110167
|
|
|
110032
|
-
var index$
|
|
110168
|
+
var index$1$3 = {
|
|
110033
110169
|
debounceInput: ['factory', debounceInput]
|
|
110034
110170
|
};
|
|
110035
110171
|
|
|
110172
|
+
class FeelPopupModule {
|
|
110173
|
+
constructor(eventBus) {
|
|
110174
|
+
this._eventBus = eventBus;
|
|
110175
|
+
}
|
|
110176
|
+
|
|
110177
|
+
/**
|
|
110178
|
+
* Check if the FEEL popup is open.
|
|
110179
|
+
* @return {Boolean}
|
|
110180
|
+
*/
|
|
110181
|
+
isOpen() {
|
|
110182
|
+
return this._eventBus.fire('feelPopup._isOpen');
|
|
110183
|
+
}
|
|
110184
|
+
|
|
110185
|
+
/**
|
|
110186
|
+
* Open the FEEL popup.
|
|
110187
|
+
*
|
|
110188
|
+
* @param {String} entryId
|
|
110189
|
+
* @param {Object} popupConfig
|
|
110190
|
+
* @param {HTMLElement} sourceElement
|
|
110191
|
+
*/
|
|
110192
|
+
open(entryId, popupConfig, sourceElement) {
|
|
110193
|
+
return this._eventBus.fire('feelPopup._open', {
|
|
110194
|
+
entryId,
|
|
110195
|
+
popupConfig,
|
|
110196
|
+
sourceElement
|
|
110197
|
+
});
|
|
110198
|
+
}
|
|
110199
|
+
|
|
110200
|
+
/**
|
|
110201
|
+
* Close the FEEL popup.
|
|
110202
|
+
*/
|
|
110203
|
+
close() {
|
|
110204
|
+
return this._eventBus.fire('feelPopup._close');
|
|
110205
|
+
}
|
|
110206
|
+
}
|
|
110207
|
+
FeelPopupModule.$inject = ['eventBus'];
|
|
110208
|
+
|
|
110209
|
+
var index$4 = {
|
|
110210
|
+
feelPopup: ['type', FeelPopupModule]
|
|
110211
|
+
};
|
|
110212
|
+
|
|
110036
110213
|
var zeebe = {};
|
|
110037
110214
|
|
|
110038
110215
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(index_esm);
|
|
@@ -112913,7 +113090,8 @@
|
|
|
112913
113090
|
getProviders,
|
|
112914
113091
|
layoutConfig: initialLayoutConfig,
|
|
112915
113092
|
descriptionConfig,
|
|
112916
|
-
tooltipConfig
|
|
113093
|
+
tooltipConfig,
|
|
113094
|
+
feelPopupContainer
|
|
112917
113095
|
} = props;
|
|
112918
113096
|
const canvas = injector.get('canvas');
|
|
112919
113097
|
const elementRegistry = injector.get('elementRegistry');
|
|
@@ -113089,6 +113267,7 @@
|
|
|
113089
113267
|
descriptionLoaded: onDescriptionLoaded,
|
|
113090
113268
|
tooltipConfig: tooltipConfig,
|
|
113091
113269
|
tooltipLoaded: onTooltipLoaded,
|
|
113270
|
+
feelPopupContainer: feelPopupContainer,
|
|
113092
113271
|
eventBus: eventBus
|
|
113093
113272
|
})
|
|
113094
113273
|
});
|
|
@@ -113121,13 +113300,15 @@
|
|
|
113121
113300
|
parent,
|
|
113122
113301
|
layout: layoutConfig,
|
|
113123
113302
|
description: descriptionConfig,
|
|
113124
|
-
tooltip: tooltipConfig
|
|
113303
|
+
tooltip: tooltipConfig,
|
|
113304
|
+
feelPopupContainer
|
|
113125
113305
|
} = config || {};
|
|
113126
113306
|
this._eventBus = eventBus;
|
|
113127
113307
|
this._injector = injector;
|
|
113128
113308
|
this._layoutConfig = layoutConfig;
|
|
113129
113309
|
this._descriptionConfig = descriptionConfig;
|
|
113130
113310
|
this._tooltipConfig = tooltipConfig;
|
|
113311
|
+
this._feelPopupContainer = feelPopupContainer;
|
|
113131
113312
|
this._container = domify$1('<div style="height: 100%" class="bio-properties-panel-container"></div>');
|
|
113132
113313
|
var commandStack = injector.get('commandStack', false);
|
|
113133
113314
|
commandStack && setupKeyboard(this._container, eventBus, commandStack);
|
|
@@ -113238,7 +113419,8 @@
|
|
|
113238
113419
|
getProviders: this._getProviders.bind(this),
|
|
113239
113420
|
layoutConfig: this._layoutConfig,
|
|
113240
113421
|
descriptionConfig: this._descriptionConfig,
|
|
113241
|
-
tooltipConfig: this._tooltipConfig
|
|
113422
|
+
tooltipConfig: this._tooltipConfig,
|
|
113423
|
+
feelPopupContainer: this._feelPopupContainer
|
|
113242
113424
|
}), this._container);
|
|
113243
113425
|
this._eventBus.fire('propertiesPanel.rendered');
|
|
113244
113426
|
}
|
|
@@ -113326,7 +113508,7 @@
|
|
|
113326
113508
|
};
|
|
113327
113509
|
|
|
113328
113510
|
var index$3$1 = {
|
|
113329
|
-
__depends__: [Commands, index$4],
|
|
113511
|
+
__depends__: [Commands, index$1$3, index$4],
|
|
113330
113512
|
__init__: ['propertiesPanel'],
|
|
113331
113513
|
propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
|
|
113332
113514
|
};
|
|
@@ -118768,7 +118950,8 @@
|
|
|
118768
118950
|
feel: 'optional',
|
|
118769
118951
|
getValue,
|
|
118770
118952
|
setValue,
|
|
118771
|
-
debounce
|
|
118953
|
+
debounce,
|
|
118954
|
+
tooltip: translate('Specifies the number of times the job is retried when a worker signals failure. The default is three.')
|
|
118772
118955
|
});
|
|
118773
118956
|
}
|
|
118774
118957
|
|
|
@@ -119835,159 +120018,235 @@
|
|
|
119835
120018
|
const TooltipProvider = {
|
|
119836
120019
|
'group-assignmentDefinition': element => {
|
|
119837
120020
|
const translate = useService('translate');
|
|
119838
|
-
return o$3("
|
|
119839
|
-
|
|
119840
|
-
|
|
119841
|
-
|
|
119842
|
-
|
|
119843
|
-
|
|
120021
|
+
return o$3("div", {
|
|
120022
|
+
children: [translate('Define who the task is assigned to. One or all of the following attributes can be specified simultaneously. '), o$3("a", {
|
|
120023
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/#assignments",
|
|
120024
|
+
target: "_blank",
|
|
120025
|
+
rel: "noopener",
|
|
120026
|
+
title: translate('User task documentation'),
|
|
120027
|
+
children: translate('Learn more.')
|
|
120028
|
+
})]
|
|
119844
120029
|
});
|
|
119845
120030
|
},
|
|
119846
120031
|
'group-condition': element => {
|
|
119847
120032
|
const translate = useService('translate');
|
|
119848
|
-
return o$3("
|
|
119849
|
-
|
|
119850
|
-
|
|
119851
|
-
|
|
119852
|
-
|
|
119853
|
-
|
|
120033
|
+
return o$3("div", {
|
|
120034
|
+
children: [translate('Define a boolean condition expression that defines when this flow is taken. '), o$3("a", {
|
|
120035
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/exclusive-gateways/#conditions",
|
|
120036
|
+
target: "_blank",
|
|
120037
|
+
rel: "noopener",
|
|
120038
|
+
title: translate('Conditions documentation'),
|
|
120039
|
+
children: translate('Learn how to define conditions.')
|
|
120040
|
+
})]
|
|
119854
120041
|
});
|
|
119855
120042
|
},
|
|
119856
120043
|
'group-businessRuleImplementation': element => {
|
|
119857
120044
|
const translate = useService('translate');
|
|
119858
|
-
return o$3("
|
|
119859
|
-
|
|
119860
|
-
|
|
119861
|
-
|
|
119862
|
-
|
|
119863
|
-
|
|
120045
|
+
return o$3("div", {
|
|
120046
|
+
children: [translate('Evaluate a business rule, for example a DMN. To add a custom implementation, use a job worker. '), o$3("a", {
|
|
120047
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#defining-a-task",
|
|
120048
|
+
target: "_blank",
|
|
120049
|
+
rel: "noopener",
|
|
120050
|
+
title: translate('Business rule task documentation'),
|
|
120051
|
+
children: translate('Learn more.')
|
|
120052
|
+
})]
|
|
120053
|
+
});
|
|
120054
|
+
},
|
|
120055
|
+
'group-scriptImplementation': element => {
|
|
120056
|
+
const translate = useService('translate');
|
|
120057
|
+
return o$3("div", {
|
|
120058
|
+
children: [translate('Implement a script task using an inline FEEL expression. To add a custom implementation, use a job worker. '), o$3("a", {
|
|
120059
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-script-task",
|
|
120060
|
+
target: "_blank",
|
|
120061
|
+
rel: "noopener",
|
|
120062
|
+
title: translate('Script task documentation'),
|
|
120063
|
+
children: translate('Learn more.')
|
|
120064
|
+
})]
|
|
119864
120065
|
});
|
|
119865
120066
|
},
|
|
119866
120067
|
'group-form': element => {
|
|
119867
120068
|
const translate = useService('translate');
|
|
119868
|
-
return o$3("
|
|
119869
|
-
|
|
119870
|
-
|
|
119871
|
-
|
|
119872
|
-
|
|
119873
|
-
|
|
120069
|
+
return o$3("div", {
|
|
120070
|
+
children: [translate('Embed a form created with the Camunda Forms editor. To associate a custom form, application, or URL to the user task, specify a form key. '), o$3("a", {
|
|
120071
|
+
href: "https://docs.camunda.io/docs/guides/utilizing-forms/#connect-your-form-to-a-bpmn-diagram",
|
|
120072
|
+
target: "_blank",
|
|
120073
|
+
rel: "noopener",
|
|
120074
|
+
title: translate('User task form documentation'),
|
|
120075
|
+
children: translate('Learn more.')
|
|
120076
|
+
})]
|
|
119874
120077
|
});
|
|
119875
120078
|
},
|
|
119876
120079
|
'group-message': element => {
|
|
119877
120080
|
const translate = useService('translate');
|
|
119878
120081
|
if (is$6(element, 'bpmn:ReceiveTask')) {
|
|
119879
|
-
return o$3("
|
|
119880
|
-
|
|
119881
|
-
|
|
119882
|
-
|
|
119883
|
-
|
|
119884
|
-
|
|
120082
|
+
return o$3("div", {
|
|
120083
|
+
children: [translate('Define the name of the message (e.g. '), o$3("code", {
|
|
120084
|
+
children: "Money collected"
|
|
120085
|
+
}), translate(') and the '), o$3("code", {
|
|
120086
|
+
children: "correlationKey"
|
|
120087
|
+
}), translate(' expression (e.g. '), o$3("code", {
|
|
120088
|
+
children: "= orderId"
|
|
120089
|
+
}), translate(')'), translate(' to subscribe to. '), translate('Learn more how to '), o$3("a", {
|
|
120090
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks",
|
|
120091
|
+
target: "_blank",
|
|
120092
|
+
rel: "noopener",
|
|
120093
|
+
title: translate('Send task documentation'),
|
|
120094
|
+
children: translate('send ')
|
|
120095
|
+
}), translate('and '), o$3("a", {
|
|
120096
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/receive-tasks",
|
|
120097
|
+
target: "_blank",
|
|
120098
|
+
rel: "noopener",
|
|
120099
|
+
title: translate('Receive task documentation'),
|
|
120100
|
+
children: translate('receive messages. ')
|
|
120101
|
+
})]
|
|
119885
120102
|
});
|
|
119886
120103
|
}
|
|
119887
|
-
return o$3("
|
|
119888
|
-
|
|
119889
|
-
|
|
119890
|
-
|
|
119891
|
-
|
|
119892
|
-
|
|
120104
|
+
return o$3("div", {
|
|
120105
|
+
children: [translate('Define the name of the message (e.g. '), o$3("code", {
|
|
120106
|
+
children: "Money collected"
|
|
120107
|
+
}), translate(') and the '), o$3("code", {
|
|
120108
|
+
children: "correlationKey"
|
|
120109
|
+
}), translate(' expression (e.g. '), o$3("code", {
|
|
120110
|
+
children: "= orderId"
|
|
120111
|
+
}), translate(')'), translate(' to subscribe to. '), o$3("a", {
|
|
120112
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#messages",
|
|
120113
|
+
target: "_blank",
|
|
120114
|
+
rel: "noopener",
|
|
120115
|
+
title: translate('Message event documentation'),
|
|
120116
|
+
children: translate('Learn more.')
|
|
120117
|
+
})]
|
|
119893
120118
|
});
|
|
119894
120119
|
},
|
|
119895
120120
|
'group-calledElement': element => {
|
|
119896
120121
|
const translate = useService('translate');
|
|
119897
|
-
return o$3("
|
|
119898
|
-
|
|
119899
|
-
|
|
119900
|
-
|
|
119901
|
-
|
|
119902
|
-
|
|
120122
|
+
return o$3("div", {
|
|
120123
|
+
children: [translate('Define the ID of the process to call (e.g. '), " ", o$3("code", {
|
|
120124
|
+
children: "shipping-process"
|
|
120125
|
+
}), translate(' or '), o$3("code", {
|
|
120126
|
+
children: "= \"shipping-\" + tenantId"
|
|
120127
|
+
}), " ", translate('). '), o$3("a", {
|
|
120128
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/call-activities/",
|
|
120129
|
+
target: "_blank",
|
|
120130
|
+
rel: "noopener",
|
|
120131
|
+
title: translate('Call activity documentation'),
|
|
120132
|
+
children: translate('Learn more.')
|
|
120133
|
+
})]
|
|
119903
120134
|
});
|
|
119904
120135
|
},
|
|
119905
120136
|
'group-taskDefinition': element => {
|
|
119906
120137
|
const translate = useService('translate');
|
|
119907
120138
|
if (is$6(element, 'bpmn:ServiceTask')) {
|
|
119908
|
-
return o$3("
|
|
119909
|
-
|
|
119910
|
-
|
|
119911
|
-
|
|
119912
|
-
|
|
119913
|
-
|
|
120139
|
+
return o$3("div", {
|
|
120140
|
+
children: [translate('Specify which job workers handle the task work to execute a service (e.g. '), o$3("code", {
|
|
120141
|
+
children: "order-items"
|
|
120142
|
+
}), translate('). '), o$3("a", {
|
|
120143
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/service-tasks",
|
|
120144
|
+
target: "_blank",
|
|
120145
|
+
rel: "noopener",
|
|
120146
|
+
title: translate('Service task documentation'),
|
|
120147
|
+
children: translate('Learn more.')
|
|
120148
|
+
})]
|
|
119914
120149
|
});
|
|
119915
120150
|
}
|
|
119916
120151
|
if (is$6(element, 'bpmn:BusinessRuleTask')) {
|
|
119917
|
-
return o$3("
|
|
119918
|
-
|
|
119919
|
-
|
|
119920
|
-
|
|
119921
|
-
|
|
119922
|
-
|
|
120152
|
+
return o$3("div", {
|
|
120153
|
+
children: [translate('Specify which job workers handle the task work to evaluate business rules. '), o$3("a", {
|
|
120154
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#job-worker-implementation",
|
|
120155
|
+
target: "_blank",
|
|
120156
|
+
rel: "noopener",
|
|
120157
|
+
title: translate('Business rule task documentation'),
|
|
120158
|
+
children: translate('Learn more.')
|
|
120159
|
+
})]
|
|
119923
120160
|
});
|
|
119924
120161
|
}
|
|
119925
120162
|
if (is$6(element, 'bpmn:ScriptTask')) {
|
|
119926
|
-
return o$3("
|
|
119927
|
-
|
|
119928
|
-
|
|
119929
|
-
|
|
119930
|
-
|
|
119931
|
-
|
|
120163
|
+
return o$3("div", {
|
|
120164
|
+
children: [translate('Specify which job workers handle the task work to execute a script. '), o$3("a", {
|
|
120165
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-task",
|
|
120166
|
+
target: "_blank",
|
|
120167
|
+
rel: "noopener",
|
|
120168
|
+
title: translate('Script task documentation'),
|
|
120169
|
+
children: translate('Learn more.')
|
|
120170
|
+
})]
|
|
119932
120171
|
});
|
|
119933
120172
|
}
|
|
119934
120173
|
if (is$6(element, 'bpmn:SendTask')) {
|
|
119935
|
-
return o$3("
|
|
119936
|
-
|
|
119937
|
-
|
|
119938
|
-
|
|
119939
|
-
|
|
119940
|
-
|
|
120174
|
+
return o$3("div", {
|
|
120175
|
+
children: [translate('Specify which job workers handle the task work to send a message (e.g. '), o$3("code", {
|
|
120176
|
+
children: "kafka"
|
|
120177
|
+
}), translate(' or '), o$3("code", {
|
|
120178
|
+
children: "mail"
|
|
120179
|
+
}), translate('). '), o$3("a", {
|
|
120180
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks/#defining-a-task",
|
|
120181
|
+
target: "_blank",
|
|
120182
|
+
rel: "noopener",
|
|
120183
|
+
title: translate('Send task documentation'),
|
|
120184
|
+
children: translate('Learn more.')
|
|
120185
|
+
})]
|
|
119941
120186
|
});
|
|
119942
120187
|
}
|
|
119943
120188
|
if (is$6(element, 'bpmn:ThrowEvent')) {
|
|
119944
|
-
return o$3("
|
|
119945
|
-
|
|
119946
|
-
|
|
119947
|
-
|
|
119948
|
-
|
|
119949
|
-
|
|
120189
|
+
return o$3("div", {
|
|
120190
|
+
children: [translate('Specify which job workers handle the event work. '), o$3("a", {
|
|
120191
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#message-throw-events",
|
|
120192
|
+
target: "_blank",
|
|
120193
|
+
rel: "noopener",
|
|
120194
|
+
title: translate('Message throw event documentation'),
|
|
120195
|
+
children: translate('Learn more.')
|
|
120196
|
+
})]
|
|
119950
120197
|
});
|
|
119951
120198
|
}
|
|
119952
120199
|
},
|
|
119953
120200
|
'group-multiInstance': element => {
|
|
119954
120201
|
const translate = useService('translate');
|
|
119955
|
-
return o$3("
|
|
119956
|
-
|
|
119957
|
-
|
|
119958
|
-
|
|
119959
|
-
|
|
119960
|
-
|
|
120202
|
+
return o$3("div", {
|
|
120203
|
+
children: [translate('Execute this task for each element of a given collection. '), o$3("br", {}), translate('Define an input collection expression that defines the collection to iterate over (e.g. '), o$3("code", {
|
|
120204
|
+
children: "= items"
|
|
120205
|
+
}), translate('). '), translate('To collect the output define the output collection and the output element expressions. '), o$3("a", {
|
|
120206
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/multi-instance/#defining-the-collection-to-iterate-over",
|
|
120207
|
+
target: "_blank",
|
|
120208
|
+
rel: "noopener",
|
|
120209
|
+
title: translate('Multi instance documentation'),
|
|
120210
|
+
children: translate('Learn more.')
|
|
120211
|
+
})]
|
|
119961
120212
|
});
|
|
119962
120213
|
},
|
|
119963
120214
|
'group-error': element => {
|
|
119964
120215
|
const translate = useService('translate');
|
|
119965
|
-
return o$3("
|
|
119966
|
-
|
|
119967
|
-
|
|
119968
|
-
|
|
119969
|
-
|
|
119970
|
-
|
|
120216
|
+
return o$3("div", {
|
|
120217
|
+
children: [translate('Define an error code (e.g. '), o$3("code", {
|
|
120218
|
+
children: "order-not-found"
|
|
120219
|
+
}), translate('). '), o$3("a", {
|
|
120220
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/error-events/#defining-the-error",
|
|
120221
|
+
target: "_blank",
|
|
120222
|
+
rel: "noopener",
|
|
120223
|
+
title: translate('Error event documentation'),
|
|
120224
|
+
children: translate('Learn more.')
|
|
120225
|
+
})]
|
|
119971
120226
|
});
|
|
119972
120227
|
},
|
|
119973
120228
|
'group-inputs': element => {
|
|
119974
120229
|
const translate = useService('translate');
|
|
119975
|
-
return o$3("
|
|
119976
|
-
|
|
119977
|
-
|
|
119978
|
-
|
|
119979
|
-
|
|
119980
|
-
|
|
120230
|
+
return o$3("div", {
|
|
120231
|
+
children: [translate('Create a new local variable in the scope of this task. '), o$3("a", {
|
|
120232
|
+
href: "https://docs.camunda.io/docs/components/concepts/variables/#input-mappings",
|
|
120233
|
+
target: "_blank",
|
|
120234
|
+
rel: "noopener",
|
|
120235
|
+
title: translate('Input mappings documentation'),
|
|
120236
|
+
children: translate('Learn more.')
|
|
120237
|
+
})]
|
|
119981
120238
|
});
|
|
119982
120239
|
},
|
|
119983
120240
|
'group-outputs': element => {
|
|
119984
120241
|
const translate = useService('translate');
|
|
119985
|
-
return o$3("
|
|
119986
|
-
|
|
119987
|
-
|
|
119988
|
-
|
|
119989
|
-
|
|
119990
|
-
|
|
120242
|
+
return o$3("div", {
|
|
120243
|
+
children: [translate('Customize how result variables are merged into the global scope of the process instance. '), o$3("a", {
|
|
120244
|
+
href: "https://docs.camunda.io/docs/components/concepts/variables/#output-mappings",
|
|
120245
|
+
target: "_blank",
|
|
120246
|
+
rel: "noopener",
|
|
120247
|
+
title: translate('Output mappings documentation'),
|
|
120248
|
+
children: translate('Learn more.')
|
|
120249
|
+
})]
|
|
119991
120250
|
});
|
|
119992
120251
|
}
|
|
119993
120252
|
};
|
|
@@ -127339,7 +127598,7 @@
|
|
|
127339
127598
|
*
|
|
127340
127599
|
* @return {Object} the parsed name
|
|
127341
127600
|
*/
|
|
127342
|
-
function parseName
|
|
127601
|
+
function parseName(name, defaultPrefix) {
|
|
127343
127602
|
var parts = name.split(/:/),
|
|
127344
127603
|
localName,
|
|
127345
127604
|
prefix;
|
|
@@ -127441,8 +127700,8 @@
|
|
|
127441
127700
|
DescriptorBuilder.prototype.redefineProperty = function (p, targetPropertyName, replace) {
|
|
127442
127701
|
var nsPrefix = p.ns.prefix;
|
|
127443
127702
|
var parts = targetPropertyName.split('#');
|
|
127444
|
-
var name = parseName
|
|
127445
|
-
var attrName = parseName
|
|
127703
|
+
var name = parseName(parts[0], nsPrefix);
|
|
127704
|
+
var attrName = parseName(parts[1], name.prefix).name;
|
|
127446
127705
|
var redefinedProperty = this.propertiesByName[attrName];
|
|
127447
127706
|
if (!redefinedProperty) {
|
|
127448
127707
|
throw new Error('refined property <' + attrName + '> not found');
|
|
@@ -127577,19 +127836,19 @@
|
|
|
127577
127836
|
properties: (type.properties || []).slice(),
|
|
127578
127837
|
meta: assign$2(type.meta || {})
|
|
127579
127838
|
});
|
|
127580
|
-
var ns = parseName
|
|
127839
|
+
var ns = parseName(type.name, pkg.prefix),
|
|
127581
127840
|
name = ns.name,
|
|
127582
127841
|
propertiesByName = {};
|
|
127583
127842
|
|
|
127584
127843
|
// parse properties
|
|
127585
127844
|
forEach$2(type.properties, bind$2(function (p) {
|
|
127586
127845
|
// namespace property names
|
|
127587
|
-
var propertyNs = parseName
|
|
127846
|
+
var propertyNs = parseName(p.name, ns.prefix),
|
|
127588
127847
|
propertyName = propertyNs.name;
|
|
127589
127848
|
|
|
127590
127849
|
// namespace property types
|
|
127591
127850
|
if (!isBuiltIn(p.type)) {
|
|
127592
|
-
p.type = parseName
|
|
127851
|
+
p.type = parseName(p.type, propertyNs.prefix).name;
|
|
127593
127852
|
}
|
|
127594
127853
|
assign$2(p, {
|
|
127595
127854
|
ns: propertyNs,
|
|
@@ -127605,7 +127864,7 @@
|
|
|
127605
127864
|
propertiesByName: propertiesByName
|
|
127606
127865
|
});
|
|
127607
127866
|
forEach$2(type.extends, bind$2(function (extendsName) {
|
|
127608
|
-
var extendsNameNs = parseName
|
|
127867
|
+
var extendsNameNs = parseName(extendsName, ns.prefix);
|
|
127609
127868
|
var extended = this.typeMap[extendsNameNs.name];
|
|
127610
127869
|
extended.traits = extended.traits || [];
|
|
127611
127870
|
extended.traits.push(name);
|
|
@@ -127640,7 +127899,7 @@
|
|
|
127640
127899
|
* @param {Boolean} [trait=false]
|
|
127641
127900
|
*/
|
|
127642
127901
|
function traverse(cls, trait) {
|
|
127643
|
-
var parentNs = parseName
|
|
127902
|
+
var parentNs = parseName(cls, isBuiltIn(cls) ? '' : nsName.prefix);
|
|
127644
127903
|
self.mapTypes(parentNs, iterator, trait);
|
|
127645
127904
|
}
|
|
127646
127905
|
|
|
@@ -127679,7 +127938,7 @@
|
|
|
127679
127938
|
* @return {Descriptor} the resulting effective descriptor
|
|
127680
127939
|
*/
|
|
127681
127940
|
Registry.prototype.getEffectiveDescriptor = function (name) {
|
|
127682
|
-
var nsName = parseName
|
|
127941
|
+
var nsName = parseName(name);
|
|
127683
127942
|
var builder = new DescriptorBuilder(nsName);
|
|
127684
127943
|
this.mapTypes(nsName, function (type, inherited) {
|
|
127685
127944
|
builder.addTrait(type, inherited);
|
|
@@ -127965,7 +128224,7 @@
|
|
|
127965
128224
|
* @return {Object} the any type instance
|
|
127966
128225
|
*/
|
|
127967
128226
|
Moddle.prototype.createAny = function (name, nsUri, properties) {
|
|
127968
|
-
var nameNs = parseName
|
|
128227
|
+
var nameNs = parseName(name);
|
|
127969
128228
|
var element = {
|
|
127970
128229
|
$type: name,
|
|
127971
128230
|
$instanceOf: function (type) {
|
|
@@ -129070,7 +129329,7 @@
|
|
|
129070
129329
|
}
|
|
129071
129330
|
}
|
|
129072
129331
|
function normalizeXsiTypeName(name, model) {
|
|
129073
|
-
var nameNs = parseName
|
|
129332
|
+
var nameNs = parseName(name);
|
|
129074
129333
|
var pkg = model.getPackage(nameNs.prefix);
|
|
129075
129334
|
return prefixedToName(nameNs, pkg);
|
|
129076
129335
|
}
|
|
@@ -129098,7 +129357,7 @@
|
|
|
129098
129357
|
* @param {ElementHandler} options.rootHandler the root handler for parsing a document
|
|
129099
129358
|
* @param {boolean} [options.lax=false] whether or not to ignore invalid elements
|
|
129100
129359
|
*/
|
|
129101
|
-
function Context
|
|
129360
|
+
function Context(options) {
|
|
129102
129361
|
/**
|
|
129103
129362
|
* @property {ElementHandler} rootHandler
|
|
129104
129363
|
*/
|
|
@@ -129305,7 +129564,7 @@
|
|
|
129305
129564
|
if (prop) {
|
|
129306
129565
|
value = coerceType(prop.type, value);
|
|
129307
129566
|
} else if (name !== 'xmlns') {
|
|
129308
|
-
propNameNs = parseName
|
|
129567
|
+
propNameNs = parseName(name, descriptor.ns.prefix);
|
|
129309
129568
|
|
|
129310
129569
|
// check whether attribute is defined in a well-known namespace
|
|
129311
129570
|
// if that is the case we emit a warning to indicate potential misuse
|
|
@@ -129325,7 +129584,7 @@
|
|
|
129325
129584
|
};
|
|
129326
129585
|
ElementHandler.prototype.getPropertyForNode = function (node) {
|
|
129327
129586
|
var name = node.name;
|
|
129328
|
-
var nameNs = parseName
|
|
129587
|
+
var nameNs = parseName(name);
|
|
129329
129588
|
var type = this.type,
|
|
129330
129589
|
model = this.model,
|
|
129331
129590
|
descriptor = getModdleDescriptor(type);
|
|
@@ -129454,7 +129713,7 @@
|
|
|
129454
129713
|
RootElementHandler.prototype = Object.create(ElementHandler.prototype);
|
|
129455
129714
|
RootElementHandler.prototype.createElement = function (node) {
|
|
129456
129715
|
var name = node.name,
|
|
129457
|
-
nameNs = parseName
|
|
129716
|
+
nameNs = parseName(name),
|
|
129458
129717
|
model = this.model,
|
|
129459
129718
|
type = this.type,
|
|
129460
129719
|
pkg = model.getPackage(nameNs.prefix),
|
|
@@ -129476,7 +129735,7 @@
|
|
|
129476
129735
|
GenericElementHandler.prototype = Object.create(BaseElementHandler.prototype);
|
|
129477
129736
|
GenericElementHandler.prototype.createElement = function (node) {
|
|
129478
129737
|
var name = node.name,
|
|
129479
|
-
ns = parseName
|
|
129738
|
+
ns = parseName(name),
|
|
129480
129739
|
prefix = ns.prefix,
|
|
129481
129740
|
uri = node.ns[prefix + '$uri'],
|
|
129482
129741
|
attributes = node.attributes;
|
|
@@ -129565,7 +129824,7 @@
|
|
|
129565
129824
|
}
|
|
129566
129825
|
var model = this.model,
|
|
129567
129826
|
lax = this.lax;
|
|
129568
|
-
var context = new Context
|
|
129827
|
+
var context = new Context(assign$2({}, options, {
|
|
129569
129828
|
rootHandler: rootHandler
|
|
129570
129829
|
})),
|
|
129571
129830
|
parser = new Parser({
|
|
@@ -130036,7 +130295,7 @@
|
|
|
130036
130295
|
ElementSerializer.prototype.nsAttributeName = function (element) {
|
|
130037
130296
|
var ns;
|
|
130038
130297
|
if (isString$2(element)) {
|
|
130039
|
-
ns = parseName
|
|
130298
|
+
ns = parseName(element);
|
|
130040
130299
|
} else {
|
|
130041
130300
|
ns = element.ns;
|
|
130042
130301
|
}
|
|
@@ -130093,7 +130352,7 @@
|
|
|
130093
130352
|
};
|
|
130094
130353
|
ElementSerializer.prototype.parseNsAttribute = function (element, name, value) {
|
|
130095
130354
|
var model = element.$model;
|
|
130096
|
-
var nameNs = parseName
|
|
130355
|
+
var nameNs = parseName(name);
|
|
130097
130356
|
var ns;
|
|
130098
130357
|
|
|
130099
130358
|
// parse xmlns:foo="http://foo.bar"
|
|
@@ -131021,1187 +131280,6 @@
|
|
|
131021
131280
|
return newVariable;
|
|
131022
131281
|
}
|
|
131023
131282
|
|
|
131024
|
-
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
131025
|
-
const propertyIdentifier = 119,
|
|
131026
|
-
identifier = 120,
|
|
131027
|
-
nameIdentifier = 121,
|
|
131028
|
-
insertSemi = 122,
|
|
131029
|
-
expression0 = 126,
|
|
131030
|
-
ForExpression = 4,
|
|
131031
|
-
forExpressionStart = 129,
|
|
131032
|
-
ForInExpression = 7,
|
|
131033
|
-
Name = 8,
|
|
131034
|
-
Identifier = 9,
|
|
131035
|
-
AdditionalIdentifier = 10,
|
|
131036
|
-
forExpressionBodyStart = 137,
|
|
131037
|
-
IfExpression = 18,
|
|
131038
|
-
ifExpressionStart = 138,
|
|
131039
|
-
QuantifiedExpression = 22,
|
|
131040
|
-
quantifiedExpressionStart = 139,
|
|
131041
|
-
QuantifiedInExpression = 26,
|
|
131042
|
-
PositiveUnaryTest = 36,
|
|
131043
|
-
ArithmeticExpression = 40,
|
|
131044
|
-
arithmeticPlusStart = 143,
|
|
131045
|
-
arithmeticTimesStart = 144,
|
|
131046
|
-
arithmeticExpStart = 145,
|
|
131047
|
-
arithmeticUnaryStart = 146,
|
|
131048
|
-
VariableName = 47,
|
|
131049
|
-
PathExpression = 67,
|
|
131050
|
-
pathExpressionStart = 151,
|
|
131051
|
-
FilterExpression = 69,
|
|
131052
|
-
filterExpressionStart = 152,
|
|
131053
|
-
FunctionInvocation = 71,
|
|
131054
|
-
functionInvocationStart = 153,
|
|
131055
|
-
ParameterName = 75,
|
|
131056
|
-
nil = 158,
|
|
131057
|
-
NumericLiteral = 78,
|
|
131058
|
-
StringLiteral = 79,
|
|
131059
|
-
BooleanLiteral = 80,
|
|
131060
|
-
List = 88,
|
|
131061
|
-
listStart = 169,
|
|
131062
|
-
FunctionDefinition = 89,
|
|
131063
|
-
functionDefinitionStart = 171,
|
|
131064
|
-
Context = 96,
|
|
131065
|
-
contextStart = 173,
|
|
131066
|
-
ContextEntry = 97,
|
|
131067
|
-
PropertyName = 99,
|
|
131068
|
-
PropertyIdentifier = 100;
|
|
131069
|
-
|
|
131070
|
-
/* global console,process */
|
|
131071
|
-
|
|
131072
|
-
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
131073
|
-
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
131074
|
-
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
131075
|
-
|
|
131076
|
-
const spaceChars = [
|
|
131077
|
-
9, 11, 12, 32, 133, 160,
|
|
131078
|
-
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
131079
|
-
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
131080
|
-
];
|
|
131081
|
-
|
|
131082
|
-
const newlineChars = chars('\n\r');
|
|
131083
|
-
|
|
131084
|
-
const additionalNameChars = chars("'./-+*");
|
|
131085
|
-
|
|
131086
|
-
/**
|
|
131087
|
-
* @typedef { VariableContext | any } ContextValue
|
|
131088
|
-
*/
|
|
131089
|
-
|
|
131090
|
-
/**
|
|
131091
|
-
* @param { string } str
|
|
131092
|
-
* @return { number[] }
|
|
131093
|
-
*/
|
|
131094
|
-
function chars(str) {
|
|
131095
|
-
return Array.from(str).map(s => s.charCodeAt(0));
|
|
131096
|
-
}
|
|
131097
|
-
|
|
131098
|
-
/**
|
|
131099
|
-
* @param { number } ch
|
|
131100
|
-
* @return { boolean }
|
|
131101
|
-
*/
|
|
131102
|
-
function isStartChar(ch) {
|
|
131103
|
-
return (
|
|
131104
|
-
ch === 63 // ?
|
|
131105
|
-
) || (
|
|
131106
|
-
ch === 95 // _
|
|
131107
|
-
) || (
|
|
131108
|
-
ch >= 65 && ch <= 90 // A-Z
|
|
131109
|
-
) || (
|
|
131110
|
-
ch >= 97 && ch <= 122 // a-z
|
|
131111
|
-
) || (
|
|
131112
|
-
ch >= 161 && !isPartChar(ch) && !isSpace(ch)
|
|
131113
|
-
);
|
|
131114
|
-
}
|
|
131115
|
-
|
|
131116
|
-
/**
|
|
131117
|
-
* @param { number } ch
|
|
131118
|
-
* @return { boolean }
|
|
131119
|
-
*/
|
|
131120
|
-
function isAdditional(ch) {
|
|
131121
|
-
return additionalNameChars.includes(ch);
|
|
131122
|
-
}
|
|
131123
|
-
|
|
131124
|
-
/**
|
|
131125
|
-
* @param { number } ch
|
|
131126
|
-
* @return { boolean }
|
|
131127
|
-
*/
|
|
131128
|
-
function isPartChar(ch) {
|
|
131129
|
-
return (
|
|
131130
|
-
ch >= 48 && ch <= 57 // 0-9
|
|
131131
|
-
) || (
|
|
131132
|
-
ch === 0xB7
|
|
131133
|
-
) || (
|
|
131134
|
-
ch >= 0x0300 && ch <= 0x036F
|
|
131135
|
-
) || (
|
|
131136
|
-
ch >= 0x203F && ch <= 0x2040
|
|
131137
|
-
);
|
|
131138
|
-
}
|
|
131139
|
-
|
|
131140
|
-
/**
|
|
131141
|
-
* @param { number } ch
|
|
131142
|
-
* @return { boolean }
|
|
131143
|
-
*/
|
|
131144
|
-
function isSpace(ch) {
|
|
131145
|
-
return spaceChars.includes(ch);
|
|
131146
|
-
}
|
|
131147
|
-
|
|
131148
|
-
// eslint-disable-next-line
|
|
131149
|
-
function indent(str, spaces) {
|
|
131150
|
-
return spaces.concat(
|
|
131151
|
-
str.split(/\n/g).join('\n' + spaces)
|
|
131152
|
-
);
|
|
131153
|
-
}
|
|
131154
|
-
|
|
131155
|
-
/**
|
|
131156
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131157
|
-
* @param { number } [offset]
|
|
131158
|
-
* @param { boolean } [includeOperators]
|
|
131159
|
-
*
|
|
131160
|
-
* @return { { token: string, offset: number } | null }
|
|
131161
|
-
*/
|
|
131162
|
-
function parseAdditionalSymbol(input, offset = 0) {
|
|
131163
|
-
|
|
131164
|
-
const next = input.peek(offset);
|
|
131165
|
-
|
|
131166
|
-
if (isAdditional(next)) {
|
|
131167
|
-
return {
|
|
131168
|
-
offset: 1,
|
|
131169
|
-
token: String.fromCharCode(next)
|
|
131170
|
-
};
|
|
131171
|
-
}
|
|
131172
|
-
|
|
131173
|
-
return null;
|
|
131174
|
-
}
|
|
131175
|
-
|
|
131176
|
-
/**
|
|
131177
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131178
|
-
* @param { number } [offset]
|
|
131179
|
-
* @param { boolean } [namePart]
|
|
131180
|
-
*
|
|
131181
|
-
* @return { { token: string, offset: number } | null }
|
|
131182
|
-
*/
|
|
131183
|
-
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
131184
|
-
for (let inside = false, chars = [], i = 0;; i++) {
|
|
131185
|
-
const next = input.peek(offset + i);
|
|
131186
|
-
|
|
131187
|
-
if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
|
|
131188
|
-
if (!inside) {
|
|
131189
|
-
inside = true;
|
|
131190
|
-
}
|
|
131191
|
-
|
|
131192
|
-
chars.push(next);
|
|
131193
|
-
} else {
|
|
131194
|
-
|
|
131195
|
-
if (chars.length) {
|
|
131196
|
-
return {
|
|
131197
|
-
token: String.fromCharCode(...chars),
|
|
131198
|
-
offset: i
|
|
131199
|
-
};
|
|
131200
|
-
}
|
|
131201
|
-
|
|
131202
|
-
return null;
|
|
131203
|
-
}
|
|
131204
|
-
}
|
|
131205
|
-
}
|
|
131206
|
-
|
|
131207
|
-
/**
|
|
131208
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131209
|
-
* @param { number } offset
|
|
131210
|
-
*
|
|
131211
|
-
* @return { { token: string, offset: number } | null }
|
|
131212
|
-
*/
|
|
131213
|
-
function parseSpaces(input, offset) {
|
|
131214
|
-
|
|
131215
|
-
for (let inside = false, i = 0;; i++) {
|
|
131216
|
-
let next = input.peek(offset + i);
|
|
131217
|
-
|
|
131218
|
-
if (isSpace(next)) {
|
|
131219
|
-
if (!inside) {
|
|
131220
|
-
inside = true;
|
|
131221
|
-
}
|
|
131222
|
-
} else {
|
|
131223
|
-
if (inside) {
|
|
131224
|
-
return {
|
|
131225
|
-
token: ' ',
|
|
131226
|
-
offset: i
|
|
131227
|
-
};
|
|
131228
|
-
}
|
|
131229
|
-
|
|
131230
|
-
return null;
|
|
131231
|
-
}
|
|
131232
|
-
}
|
|
131233
|
-
}
|
|
131234
|
-
|
|
131235
|
-
/**
|
|
131236
|
-
* Parse a name from the input and return the first match, if any.
|
|
131237
|
-
*
|
|
131238
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131239
|
-
* @param { Variables } variables
|
|
131240
|
-
*
|
|
131241
|
-
* @return { { token: string, offset: number, term: number } | null }
|
|
131242
|
-
*/
|
|
131243
|
-
function parseName(input, variables) {
|
|
131244
|
-
const contextKeys = variables.contextKeys();
|
|
131245
|
-
|
|
131246
|
-
const start = variables.tokens;
|
|
131247
|
-
|
|
131248
|
-
for (let i = 0, tokens = [], nextMatch = null;;) {
|
|
131249
|
-
|
|
131250
|
-
const namePart = (start.length + tokens.length) > 0;
|
|
131251
|
-
const maybeSpace = tokens.length > 0;
|
|
131252
|
-
|
|
131253
|
-
const match = (
|
|
131254
|
-
parseIdentifier(input, i, namePart) ||
|
|
131255
|
-
namePart && parseAdditionalSymbol(input, i) ||
|
|
131256
|
-
maybeSpace && parseSpaces(input, i)
|
|
131257
|
-
);
|
|
131258
|
-
|
|
131259
|
-
// match is required
|
|
131260
|
-
if (!match) {
|
|
131261
|
-
return nextMatch;
|
|
131262
|
-
}
|
|
131263
|
-
|
|
131264
|
-
const {
|
|
131265
|
-
token,
|
|
131266
|
-
offset
|
|
131267
|
-
} = match;
|
|
131268
|
-
|
|
131269
|
-
i += offset;
|
|
131270
|
-
|
|
131271
|
-
if (token === ' ') {
|
|
131272
|
-
continue;
|
|
131273
|
-
}
|
|
131274
|
-
|
|
131275
|
-
tokens = [ ...tokens, token ];
|
|
131276
|
-
|
|
131277
|
-
const name = [ ...start, ...tokens ].join(' ');
|
|
131278
|
-
|
|
131279
|
-
if (contextKeys.some(el => el === name)) {
|
|
131280
|
-
const token = tokens[0];
|
|
131281
|
-
|
|
131282
|
-
nextMatch = {
|
|
131283
|
-
token,
|
|
131284
|
-
offset: token.length,
|
|
131285
|
-
term: nameIdentifier
|
|
131286
|
-
};
|
|
131287
|
-
}
|
|
131288
|
-
|
|
131289
|
-
if (dateTimeIdentifiers.some(el => el === name)) {
|
|
131290
|
-
const token = tokens[0];
|
|
131291
|
-
|
|
131292
|
-
// parse date time identifiers as normal
|
|
131293
|
-
// identifiers to allow specialization to kick in
|
|
131294
|
-
//
|
|
131295
|
-
// cf. https://github.com/nikku/lezer-feel/issues/8
|
|
131296
|
-
nextMatch = {
|
|
131297
|
-
token,
|
|
131298
|
-
offset: token.length,
|
|
131299
|
-
term: identifier
|
|
131300
|
-
};
|
|
131301
|
-
}
|
|
131302
|
-
|
|
131303
|
-
if (
|
|
131304
|
-
!contextKeys.some(el => el.startsWith(name)) &&
|
|
131305
|
-
!dateTimeIdentifiers.some(el => el.startsWith(name))
|
|
131306
|
-
) {
|
|
131307
|
-
return nextMatch;
|
|
131308
|
-
}
|
|
131309
|
-
}
|
|
131310
|
-
|
|
131311
|
-
}
|
|
131312
|
-
|
|
131313
|
-
const identifiersMap = {
|
|
131314
|
-
[ identifier ]: 'identifier',
|
|
131315
|
-
[ nameIdentifier ]: 'nameIdentifier'
|
|
131316
|
-
};
|
|
131317
|
-
|
|
131318
|
-
const identifiers = new ExternalTokenizer((input, stack) => {
|
|
131319
|
-
|
|
131320
|
-
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
131321
|
-
|
|
131322
|
-
const nameMatch = parseName(input, stack.context);
|
|
131323
|
-
|
|
131324
|
-
const start = stack.context.tokens;
|
|
131325
|
-
|
|
131326
|
-
const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
|
|
131327
|
-
|
|
131328
|
-
if (match) {
|
|
131329
|
-
input.advance(match.offset);
|
|
131330
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier);
|
|
131331
|
-
|
|
131332
|
-
LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
|
|
131333
|
-
}
|
|
131334
|
-
}, { contextual: true });
|
|
131335
|
-
|
|
131336
|
-
|
|
131337
|
-
const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
|
|
131338
|
-
|
|
131339
|
-
LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
131340
|
-
|
|
131341
|
-
const start = stack.context.tokens;
|
|
131342
|
-
|
|
131343
|
-
const match = parseIdentifier(input, 0, start.length > 0);
|
|
131344
|
-
|
|
131345
|
-
if (match) {
|
|
131346
|
-
input.advance(match.offset);
|
|
131347
|
-
input.acceptToken(propertyIdentifier);
|
|
131348
|
-
|
|
131349
|
-
LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
131350
|
-
}
|
|
131351
|
-
});
|
|
131352
|
-
|
|
131353
|
-
|
|
131354
|
-
const insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
131355
|
-
|
|
131356
|
-
LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
|
|
131357
|
-
|
|
131358
|
-
let offset;
|
|
131359
|
-
let insert = false;
|
|
131360
|
-
|
|
131361
|
-
for (offset = 0;; offset++) {
|
|
131362
|
-
const char = input.peek(offset);
|
|
131363
|
-
|
|
131364
|
-
if (spaceChars.includes(char)) {
|
|
131365
|
-
continue;
|
|
131366
|
-
}
|
|
131367
|
-
|
|
131368
|
-
if (newlineChars.includes(char)) {
|
|
131369
|
-
insert = true;
|
|
131370
|
-
}
|
|
131371
|
-
|
|
131372
|
-
break;
|
|
131373
|
-
}
|
|
131374
|
-
|
|
131375
|
-
if (insert) {
|
|
131376
|
-
|
|
131377
|
-
const identifier = parseIdentifier(input, offset + 1);
|
|
131378
|
-
const spaces = parseSpaces(input, offset + 1);
|
|
131379
|
-
|
|
131380
|
-
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
131381
|
-
return;
|
|
131382
|
-
}
|
|
131383
|
-
|
|
131384
|
-
LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
131385
|
-
input.acceptToken(insertSemi);
|
|
131386
|
-
}
|
|
131387
|
-
});
|
|
131388
|
-
|
|
131389
|
-
const prefixedContextStarts = {
|
|
131390
|
-
[ functionInvocationStart ]: 'FunctionInvocation',
|
|
131391
|
-
[ filterExpressionStart ]: 'FilterExpression',
|
|
131392
|
-
[ pathExpressionStart ]: 'PathExpression'
|
|
131393
|
-
};
|
|
131394
|
-
|
|
131395
|
-
const contextStarts = {
|
|
131396
|
-
[ contextStart ]: 'Context',
|
|
131397
|
-
[ functionDefinitionStart ]: 'FunctionDefinition',
|
|
131398
|
-
[ forExpressionStart ]: 'ForExpression',
|
|
131399
|
-
[ listStart ]: 'List',
|
|
131400
|
-
[ ifExpressionStart ]: 'IfExpression',
|
|
131401
|
-
[ quantifiedExpressionStart ]: 'QuantifiedExpression'
|
|
131402
|
-
};
|
|
131403
|
-
|
|
131404
|
-
const contextEnds = {
|
|
131405
|
-
[ Context ]: 'Context',
|
|
131406
|
-
[ FunctionDefinition ]: 'FunctionDefinition',
|
|
131407
|
-
[ ForExpression ]: 'ForExpression',
|
|
131408
|
-
[ List ]: 'List',
|
|
131409
|
-
[ IfExpression ]: 'IfExpression',
|
|
131410
|
-
[ QuantifiedExpression ]: 'QuantifiedExpression',
|
|
131411
|
-
[ PathExpression ]: 'PathExpression',
|
|
131412
|
-
[ FunctionInvocation ]: 'FunctionInvocation',
|
|
131413
|
-
[ FilterExpression ]: 'FilterExpression',
|
|
131414
|
-
[ ArithmeticExpression ]: 'ArithmeticExpression'
|
|
131415
|
-
};
|
|
131416
|
-
|
|
131417
|
-
class ValueProducer {
|
|
131418
|
-
|
|
131419
|
-
/**
|
|
131420
|
-
* @param { Function } fn
|
|
131421
|
-
*/
|
|
131422
|
-
constructor(fn) {
|
|
131423
|
-
this.fn = fn;
|
|
131424
|
-
}
|
|
131425
|
-
|
|
131426
|
-
get(variables) {
|
|
131427
|
-
return this.fn(variables);
|
|
131428
|
-
}
|
|
131429
|
-
|
|
131430
|
-
/**
|
|
131431
|
-
* @param { Function }
|
|
131432
|
-
*
|
|
131433
|
-
* @return { ValueProducer }
|
|
131434
|
-
*/
|
|
131435
|
-
static of(fn) {
|
|
131436
|
-
return new ValueProducer(fn);
|
|
131437
|
-
}
|
|
131438
|
-
|
|
131439
|
-
}
|
|
131440
|
-
|
|
131441
|
-
const dateTimeLiterals = {
|
|
131442
|
-
'date and time': 1,
|
|
131443
|
-
'date': 1,
|
|
131444
|
-
'time': 1,
|
|
131445
|
-
'duration': 1
|
|
131446
|
-
};
|
|
131447
|
-
|
|
131448
|
-
const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
131449
|
-
|
|
131450
|
-
|
|
131451
|
-
/**
|
|
131452
|
-
* A basic key-value store to hold context values.
|
|
131453
|
-
*/
|
|
131454
|
-
class VariableContext {
|
|
131455
|
-
|
|
131456
|
-
/**
|
|
131457
|
-
* Creates a new context from a JavaScript object.
|
|
131458
|
-
*
|
|
131459
|
-
* @param {any} value
|
|
131460
|
-
*/
|
|
131461
|
-
constructor(value = {}) {
|
|
131462
|
-
|
|
131463
|
-
/**
|
|
131464
|
-
* @protected
|
|
131465
|
-
*/
|
|
131466
|
-
this.value = value;
|
|
131467
|
-
}
|
|
131468
|
-
|
|
131469
|
-
/**
|
|
131470
|
-
* Return all defined keys of the context.
|
|
131471
|
-
*
|
|
131472
|
-
* @returns {Array<string>} the keys of the context
|
|
131473
|
-
*/
|
|
131474
|
-
getKeys() {
|
|
131475
|
-
return Object.keys(this.value);
|
|
131476
|
-
}
|
|
131477
|
-
|
|
131478
|
-
/**
|
|
131479
|
-
* Returns the value of the given key.
|
|
131480
|
-
*
|
|
131481
|
-
* If the value represents a context itself, it should be wrapped in a
|
|
131482
|
-
* context class.
|
|
131483
|
-
*
|
|
131484
|
-
* @param {String} key
|
|
131485
|
-
* @returns {VariableContext|ValueProducer|null}
|
|
131486
|
-
*/
|
|
131487
|
-
get(key) {
|
|
131488
|
-
const result = this.value[key];
|
|
131489
|
-
|
|
131490
|
-
if (this.constructor.isAtomic(result)) {
|
|
131491
|
-
return result;
|
|
131492
|
-
}
|
|
131493
|
-
|
|
131494
|
-
return this.constructor.of(result);
|
|
131495
|
-
}
|
|
131496
|
-
|
|
131497
|
-
/**
|
|
131498
|
-
* Creates a new context with the given key added.
|
|
131499
|
-
*
|
|
131500
|
-
* @param {String} key
|
|
131501
|
-
* @param {any} value
|
|
131502
|
-
* @returns {VariableContext} new context with the given key added
|
|
131503
|
-
*/
|
|
131504
|
-
set(key, value) {
|
|
131505
|
-
return this.constructor.of({
|
|
131506
|
-
...this.value,
|
|
131507
|
-
[key]: value
|
|
131508
|
-
});
|
|
131509
|
-
}
|
|
131510
|
-
|
|
131511
|
-
/**
|
|
131512
|
-
* Wether the given value is atomic. Non-atomic values need to be wrapped in a
|
|
131513
|
-
* context Class.
|
|
131514
|
-
*
|
|
131515
|
-
* @param {any} value
|
|
131516
|
-
* @returns {Boolean}
|
|
131517
|
-
*/
|
|
131518
|
-
static isAtomic(value) {
|
|
131519
|
-
return !value ||
|
|
131520
|
-
value instanceof this ||
|
|
131521
|
-
value instanceof ValueProducer ||
|
|
131522
|
-
typeof value !== 'object';
|
|
131523
|
-
}
|
|
131524
|
-
|
|
131525
|
-
/**
|
|
131526
|
-
* Takes any number of Contexts and merges them into a single Context.
|
|
131527
|
-
*
|
|
131528
|
-
* @param {...Context} contexts
|
|
131529
|
-
* @returns {VariableContext}
|
|
131530
|
-
*/
|
|
131531
|
-
static of(...contexts) {
|
|
131532
|
-
const unwrap = (context) => {
|
|
131533
|
-
if (!context || typeof context !== 'object') {
|
|
131534
|
-
return {};
|
|
131535
|
-
}
|
|
131536
|
-
|
|
131537
|
-
if (context instanceof this) {
|
|
131538
|
-
return context.value;
|
|
131539
|
-
}
|
|
131540
|
-
|
|
131541
|
-
return { ...context };
|
|
131542
|
-
};
|
|
131543
|
-
|
|
131544
|
-
const merged = contexts.reduce((merged, context) => {
|
|
131545
|
-
return {
|
|
131546
|
-
...merged,
|
|
131547
|
-
...unwrap(context)
|
|
131548
|
-
};
|
|
131549
|
-
}, {});
|
|
131550
|
-
|
|
131551
|
-
return new this(merged);
|
|
131552
|
-
}
|
|
131553
|
-
|
|
131554
|
-
}
|
|
131555
|
-
|
|
131556
|
-
class Variables {
|
|
131557
|
-
|
|
131558
|
-
constructor({
|
|
131559
|
-
name = 'Expressions',
|
|
131560
|
-
tokens = [],
|
|
131561
|
-
children = [],
|
|
131562
|
-
parent = null,
|
|
131563
|
-
context,
|
|
131564
|
-
value,
|
|
131565
|
-
raw
|
|
131566
|
-
} = {}) {
|
|
131567
|
-
this.name = name;
|
|
131568
|
-
this.tokens = tokens;
|
|
131569
|
-
this.children = children;
|
|
131570
|
-
this.parent = parent;
|
|
131571
|
-
this.context = context;
|
|
131572
|
-
this.value = value;
|
|
131573
|
-
this.raw = raw;
|
|
131574
|
-
}
|
|
131575
|
-
|
|
131576
|
-
enterScope(name) {
|
|
131577
|
-
|
|
131578
|
-
const childScope = this.of({
|
|
131579
|
-
name,
|
|
131580
|
-
parent: this
|
|
131581
|
-
});
|
|
131582
|
-
|
|
131583
|
-
LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
|
|
131584
|
-
|
|
131585
|
-
return childScope;
|
|
131586
|
-
}
|
|
131587
|
-
|
|
131588
|
-
exitScope(str) {
|
|
131589
|
-
|
|
131590
|
-
if (!this.parent) {
|
|
131591
|
-
LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
131592
|
-
|
|
131593
|
-
return this;
|
|
131594
|
-
}
|
|
131595
|
-
|
|
131596
|
-
LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
131597
|
-
|
|
131598
|
-
return this.parent.pushChild(this);
|
|
131599
|
-
}
|
|
131600
|
-
|
|
131601
|
-
token(part) {
|
|
131602
|
-
|
|
131603
|
-
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
131604
|
-
|
|
131605
|
-
return this.assign({
|
|
131606
|
-
tokens: [ ...this.tokens, part ]
|
|
131607
|
-
});
|
|
131608
|
-
}
|
|
131609
|
-
|
|
131610
|
-
literal(value) {
|
|
131611
|
-
|
|
131612
|
-
LOG_VARS && console.log('[%s] literal %o', this.path, value);
|
|
131613
|
-
|
|
131614
|
-
return this.pushChild(this.of({
|
|
131615
|
-
name: 'Literal',
|
|
131616
|
-
value
|
|
131617
|
-
}));
|
|
131618
|
-
}
|
|
131619
|
-
|
|
131620
|
-
/**
|
|
131621
|
-
* Return computed scope value
|
|
131622
|
-
*
|
|
131623
|
-
* @return {any}
|
|
131624
|
-
*/
|
|
131625
|
-
computedValue() {
|
|
131626
|
-
for (let scope = this;;scope = last(scope.children)) {
|
|
131627
|
-
|
|
131628
|
-
if (!scope) {
|
|
131629
|
-
return null;
|
|
131630
|
-
}
|
|
131631
|
-
|
|
131632
|
-
if (scope.value) {
|
|
131633
|
-
return scope.value;
|
|
131634
|
-
}
|
|
131635
|
-
}
|
|
131636
|
-
}
|
|
131637
|
-
|
|
131638
|
-
contextKeys() {
|
|
131639
|
-
return this.context.getKeys().map(normalizeContextKey);
|
|
131640
|
-
}
|
|
131641
|
-
|
|
131642
|
-
get path() {
|
|
131643
|
-
return this.parent?.path?.concat(' > ', this.name) || this.name;
|
|
131644
|
-
}
|
|
131645
|
-
|
|
131646
|
-
/**
|
|
131647
|
-
* Return value of variable.
|
|
131648
|
-
*
|
|
131649
|
-
* @param { string } variable
|
|
131650
|
-
* @return { any } value
|
|
131651
|
-
*/
|
|
131652
|
-
get(variable) {
|
|
131653
|
-
|
|
131654
|
-
const names = [ variable, variable && normalizeContextKey(variable) ];
|
|
131655
|
-
|
|
131656
|
-
const contextKey = this.context.getKeys().find(
|
|
131657
|
-
key => names.includes(normalizeContextKey(key))
|
|
131658
|
-
);
|
|
131659
|
-
|
|
131660
|
-
if (typeof contextKey === 'undefined') {
|
|
131661
|
-
return undefined;
|
|
131662
|
-
}
|
|
131663
|
-
|
|
131664
|
-
const val = this.context.get(contextKey);
|
|
131665
|
-
|
|
131666
|
-
if (val instanceof ValueProducer) {
|
|
131667
|
-
return val.get(this);
|
|
131668
|
-
} else {
|
|
131669
|
-
return val;
|
|
131670
|
-
}
|
|
131671
|
-
}
|
|
131672
|
-
|
|
131673
|
-
resolveName() {
|
|
131674
|
-
|
|
131675
|
-
const variable = this.tokens.join(' ');
|
|
131676
|
-
const tokens = [];
|
|
131677
|
-
|
|
131678
|
-
const parentScope = this.assign({
|
|
131679
|
-
tokens
|
|
131680
|
-
});
|
|
131681
|
-
|
|
131682
|
-
const variableScope = this.of({
|
|
131683
|
-
name: 'VariableName',
|
|
131684
|
-
parent: parentScope,
|
|
131685
|
-
value: this.get(variable),
|
|
131686
|
-
raw: variable
|
|
131687
|
-
});
|
|
131688
|
-
|
|
131689
|
-
LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
131690
|
-
|
|
131691
|
-
return parentScope.pushChild(variableScope);
|
|
131692
|
-
}
|
|
131693
|
-
|
|
131694
|
-
pushChild(child) {
|
|
131695
|
-
|
|
131696
|
-
if (!child) {
|
|
131697
|
-
return this;
|
|
131698
|
-
}
|
|
131699
|
-
|
|
131700
|
-
const parent = this.assign({
|
|
131701
|
-
children: [ ...this.children, child ]
|
|
131702
|
-
});
|
|
131703
|
-
|
|
131704
|
-
child.parent = parent;
|
|
131705
|
-
|
|
131706
|
-
return parent;
|
|
131707
|
-
}
|
|
131708
|
-
|
|
131709
|
-
pushChildren(children) {
|
|
131710
|
-
|
|
131711
|
-
let parent = this;
|
|
131712
|
-
|
|
131713
|
-
for (const child of children) {
|
|
131714
|
-
parent = parent.pushChild(child);
|
|
131715
|
-
}
|
|
131716
|
-
|
|
131717
|
-
return parent;
|
|
131718
|
-
}
|
|
131719
|
-
|
|
131720
|
-
declareName() {
|
|
131721
|
-
|
|
131722
|
-
if (this.tokens.length === 0) {
|
|
131723
|
-
throw Error('no tokens to declare name');
|
|
131724
|
-
}
|
|
131725
|
-
|
|
131726
|
-
const variableName = this.tokens.join(' ');
|
|
131727
|
-
|
|
131728
|
-
LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
131729
|
-
|
|
131730
|
-
return this.assign({
|
|
131731
|
-
tokens: []
|
|
131732
|
-
}).pushChild(
|
|
131733
|
-
this.of({
|
|
131734
|
-
name: 'Name',
|
|
131735
|
-
value: variableName
|
|
131736
|
-
})
|
|
131737
|
-
);
|
|
131738
|
-
}
|
|
131739
|
-
|
|
131740
|
-
define(name, value) {
|
|
131741
|
-
|
|
131742
|
-
if (typeof name !== 'string') {
|
|
131743
|
-
LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
131744
|
-
|
|
131745
|
-
return this;
|
|
131746
|
-
}
|
|
131747
|
-
|
|
131748
|
-
LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
131749
|
-
|
|
131750
|
-
const context = this.context.set(name, value);
|
|
131751
|
-
|
|
131752
|
-
return this.assign({
|
|
131753
|
-
context
|
|
131754
|
-
});
|
|
131755
|
-
}
|
|
131756
|
-
|
|
131757
|
-
/**
|
|
131758
|
-
* @param { Record<string, any> } [options]
|
|
131759
|
-
*
|
|
131760
|
-
* @return { Variables }
|
|
131761
|
-
*/
|
|
131762
|
-
assign(options = {}) {
|
|
131763
|
-
|
|
131764
|
-
return Variables.of({
|
|
131765
|
-
...this,
|
|
131766
|
-
...options
|
|
131767
|
-
});
|
|
131768
|
-
}
|
|
131769
|
-
|
|
131770
|
-
/**
|
|
131771
|
-
* @param { Record<string, any> } [options]
|
|
131772
|
-
*
|
|
131773
|
-
* @return { Variables }
|
|
131774
|
-
*/
|
|
131775
|
-
of(options = {}) {
|
|
131776
|
-
|
|
131777
|
-
const defaultOptions = {
|
|
131778
|
-
context: this.context,
|
|
131779
|
-
parent: this.parent
|
|
131780
|
-
};
|
|
131781
|
-
|
|
131782
|
-
return Variables.of({
|
|
131783
|
-
...defaultOptions,
|
|
131784
|
-
...options
|
|
131785
|
-
});
|
|
131786
|
-
}
|
|
131787
|
-
|
|
131788
|
-
static of(options) {
|
|
131789
|
-
|
|
131790
|
-
const {
|
|
131791
|
-
name,
|
|
131792
|
-
tokens = [],
|
|
131793
|
-
children = [],
|
|
131794
|
-
parent = null,
|
|
131795
|
-
context,
|
|
131796
|
-
value,
|
|
131797
|
-
raw
|
|
131798
|
-
} = options;
|
|
131799
|
-
|
|
131800
|
-
if (!context) {
|
|
131801
|
-
throw new Error('must provide <context>');
|
|
131802
|
-
}
|
|
131803
|
-
|
|
131804
|
-
return new Variables({
|
|
131805
|
-
name,
|
|
131806
|
-
tokens: [ ...tokens ],
|
|
131807
|
-
children: [ ...children ],
|
|
131808
|
-
context,
|
|
131809
|
-
parent,
|
|
131810
|
-
value,
|
|
131811
|
-
raw
|
|
131812
|
-
});
|
|
131813
|
-
}
|
|
131814
|
-
|
|
131815
|
-
}
|
|
131816
|
-
|
|
131817
|
-
/**
|
|
131818
|
-
* @param { string } name
|
|
131819
|
-
*
|
|
131820
|
-
* @return { string } normalizedName
|
|
131821
|
-
*/
|
|
131822
|
-
function normalizeContextKey(name) {
|
|
131823
|
-
return name.replace(/\s*([./\-'+*])\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
131824
|
-
}
|
|
131825
|
-
|
|
131826
|
-
/**
|
|
131827
|
-
* Wrap children of variables under the given named child.
|
|
131828
|
-
*
|
|
131829
|
-
* @param { Variables } variables
|
|
131830
|
-
* @param { string } name
|
|
131831
|
-
* @param { string } code
|
|
131832
|
-
* @return { Variables }
|
|
131833
|
-
*/
|
|
131834
|
-
function wrap(variables, scopeName, code) {
|
|
131835
|
-
|
|
131836
|
-
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
131837
|
-
const children = variables.children.filter(c => c.name === scopeName);
|
|
131838
|
-
|
|
131839
|
-
const namePart = parts[0];
|
|
131840
|
-
const valuePart = parts[Math.max(1, parts.length - 1)];
|
|
131841
|
-
|
|
131842
|
-
const name = namePart.computedValue();
|
|
131843
|
-
const value = valuePart?.computedValue() || null;
|
|
131844
|
-
|
|
131845
|
-
return variables
|
|
131846
|
-
.assign({
|
|
131847
|
-
children
|
|
131848
|
-
})
|
|
131849
|
-
.enterScope(scopeName)
|
|
131850
|
-
.pushChildren(parts)
|
|
131851
|
-
.exitScope(code)
|
|
131852
|
-
.define(name, value);
|
|
131853
|
-
}
|
|
131854
|
-
|
|
131855
|
-
/**
|
|
131856
|
-
* @param { ContextValue } [context]
|
|
131857
|
-
* @param { typeof VariableContext } [Context]
|
|
131858
|
-
*
|
|
131859
|
-
* @return { ContextTracker<Variables> }
|
|
131860
|
-
*/
|
|
131861
|
-
function trackVariables(context = {}, Context = VariableContext) {
|
|
131862
|
-
|
|
131863
|
-
const start = Variables.of({
|
|
131864
|
-
context: Context.of(context)
|
|
131865
|
-
});
|
|
131866
|
-
|
|
131867
|
-
return new ContextTracker({
|
|
131868
|
-
start,
|
|
131869
|
-
reduce(variables, term, stack, input) {
|
|
131870
|
-
|
|
131871
|
-
if (term === IfExpression) {
|
|
131872
|
-
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
131873
|
-
|
|
131874
|
-
variables = variables.assign({
|
|
131875
|
-
value: Context.of(
|
|
131876
|
-
thenPart?.computedValue(),
|
|
131877
|
-
elsePart?.computedValue()
|
|
131878
|
-
)
|
|
131879
|
-
});
|
|
131880
|
-
}
|
|
131881
|
-
|
|
131882
|
-
if (term === List) {
|
|
131883
|
-
variables = variables.assign({
|
|
131884
|
-
value: Context.of(
|
|
131885
|
-
...variables.children.map(
|
|
131886
|
-
c => c?.computedValue()
|
|
131887
|
-
)
|
|
131888
|
-
)
|
|
131889
|
-
});
|
|
131890
|
-
}
|
|
131891
|
-
|
|
131892
|
-
if (term === FilterExpression) {
|
|
131893
|
-
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
131894
|
-
|
|
131895
|
-
variables = variables.assign({
|
|
131896
|
-
value: sourcePart?.computedValue()
|
|
131897
|
-
});
|
|
131898
|
-
}
|
|
131899
|
-
|
|
131900
|
-
if (term === FunctionInvocation) {
|
|
131901
|
-
|
|
131902
|
-
const [
|
|
131903
|
-
name,
|
|
131904
|
-
...args
|
|
131905
|
-
] = variables.children;
|
|
131906
|
-
|
|
131907
|
-
// preserve type information through `get value(context, key)` utility
|
|
131908
|
-
if (name?.raw === 'get value') {
|
|
131909
|
-
variables = getContextValue(variables, args);
|
|
131910
|
-
}
|
|
131911
|
-
}
|
|
131912
|
-
|
|
131913
|
-
const start = contextStarts[term];
|
|
131914
|
-
|
|
131915
|
-
if (start) {
|
|
131916
|
-
return variables.enterScope(start);
|
|
131917
|
-
}
|
|
131918
|
-
|
|
131919
|
-
const prefixedStart = prefixedContextStarts[term];
|
|
131920
|
-
|
|
131921
|
-
// pull <expression> into new <prefixedStart> context
|
|
131922
|
-
if (prefixedStart) {
|
|
131923
|
-
|
|
131924
|
-
const {
|
|
131925
|
-
children: currentChildren,
|
|
131926
|
-
context: currentContext,
|
|
131927
|
-
} = variables;
|
|
131928
|
-
|
|
131929
|
-
const children = currentChildren.slice(0, -1);
|
|
131930
|
-
const lastChild = last(currentChildren);
|
|
131931
|
-
|
|
131932
|
-
let newContext = null;
|
|
131933
|
-
|
|
131934
|
-
if (term === pathExpressionStart) {
|
|
131935
|
-
newContext = Context.of(lastChild?.computedValue());
|
|
131936
|
-
}
|
|
131937
|
-
|
|
131938
|
-
if (term === filterExpressionStart) {
|
|
131939
|
-
newContext = Context.of(
|
|
131940
|
-
currentContext,
|
|
131941
|
-
lastChild?.computedValue()
|
|
131942
|
-
).set('item', lastChild?.computedValue());
|
|
131943
|
-
}
|
|
131944
|
-
|
|
131945
|
-
return variables
|
|
131946
|
-
.assign({ children })
|
|
131947
|
-
.enterScope(prefixedStart)
|
|
131948
|
-
.pushChild(lastChild)
|
|
131949
|
-
.assign({ context: newContext || currentContext });
|
|
131950
|
-
}
|
|
131951
|
-
|
|
131952
|
-
const code = input.read(input.pos, stack.pos);
|
|
131953
|
-
|
|
131954
|
-
const end = contextEnds[term];
|
|
131955
|
-
|
|
131956
|
-
if (end) {
|
|
131957
|
-
return variables.exitScope(code);
|
|
131958
|
-
}
|
|
131959
|
-
|
|
131960
|
-
if (term === ContextEntry) {
|
|
131961
|
-
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
131962
|
-
|
|
131963
|
-
const name = parts[0];
|
|
131964
|
-
const value = last(parts);
|
|
131965
|
-
|
|
131966
|
-
return wrap(variables, 'ContextEntry', code).assign(
|
|
131967
|
-
{
|
|
131968
|
-
value: Context
|
|
131969
|
-
.of(variables.value)
|
|
131970
|
-
.set([ name.computedValue() ], value?.computedValue())
|
|
131971
|
-
}
|
|
131972
|
-
);
|
|
131973
|
-
}
|
|
131974
|
-
|
|
131975
|
-
if (
|
|
131976
|
-
term === ForInExpression ||
|
|
131977
|
-
term === QuantifiedInExpression
|
|
131978
|
-
) {
|
|
131979
|
-
return wrap(variables, 'InExpression', code);
|
|
131980
|
-
}
|
|
131981
|
-
|
|
131982
|
-
// define <partial> within ForExpression body
|
|
131983
|
-
if (term === forExpressionBodyStart) {
|
|
131984
|
-
|
|
131985
|
-
return variables.define(
|
|
131986
|
-
'partial',
|
|
131987
|
-
ValueProducer.of(variables => {
|
|
131988
|
-
return last(variables.children)?.computedValue();
|
|
131989
|
-
})
|
|
131990
|
-
);
|
|
131991
|
-
}
|
|
131992
|
-
|
|
131993
|
-
if (
|
|
131994
|
-
term === ParameterName
|
|
131995
|
-
) {
|
|
131996
|
-
const name = last(variables.children).computedValue();
|
|
131997
|
-
|
|
131998
|
-
// TODO: attach type information
|
|
131999
|
-
return variables.define(name, 1);
|
|
132000
|
-
}
|
|
132001
|
-
|
|
132002
|
-
// pull <expression> into ArithmeticExpression child
|
|
132003
|
-
if (
|
|
132004
|
-
term === arithmeticPlusStart ||
|
|
132005
|
-
term === arithmeticTimesStart ||
|
|
132006
|
-
term === arithmeticExpStart
|
|
132007
|
-
) {
|
|
132008
|
-
const children = variables.children.slice(0, -1);
|
|
132009
|
-
const lastChild = last(variables.children);
|
|
132010
|
-
|
|
132011
|
-
return variables.assign({
|
|
132012
|
-
children
|
|
132013
|
-
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
132014
|
-
}
|
|
132015
|
-
|
|
132016
|
-
if (term === arithmeticUnaryStart) {
|
|
132017
|
-
return variables.enterScope('ArithmeticExpression');
|
|
132018
|
-
}
|
|
132019
|
-
|
|
132020
|
-
if (
|
|
132021
|
-
term === Identifier ||
|
|
132022
|
-
term === AdditionalIdentifier ||
|
|
132023
|
-
term === PropertyIdentifier
|
|
132024
|
-
) {
|
|
132025
|
-
return variables.token(code);
|
|
132026
|
-
}
|
|
132027
|
-
|
|
132028
|
-
if (
|
|
132029
|
-
term === StringLiteral
|
|
132030
|
-
) {
|
|
132031
|
-
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
132032
|
-
}
|
|
132033
|
-
|
|
132034
|
-
if (term === BooleanLiteral) {
|
|
132035
|
-
return variables.literal(code === 'true' ? true : false);
|
|
132036
|
-
}
|
|
132037
|
-
|
|
132038
|
-
if (term === NumericLiteral) {
|
|
132039
|
-
return variables.literal(parseFloat(code));
|
|
132040
|
-
}
|
|
132041
|
-
|
|
132042
|
-
if (term === nil) {
|
|
132043
|
-
return variables.literal(null);
|
|
132044
|
-
}
|
|
132045
|
-
|
|
132046
|
-
if (
|
|
132047
|
-
term === VariableName
|
|
132048
|
-
) {
|
|
132049
|
-
return variables.resolveName();
|
|
132050
|
-
}
|
|
132051
|
-
|
|
132052
|
-
if (
|
|
132053
|
-
term === Name ||
|
|
132054
|
-
term === PropertyName
|
|
132055
|
-
) {
|
|
132056
|
-
return variables.declareName();
|
|
132057
|
-
}
|
|
132058
|
-
|
|
132059
|
-
if (
|
|
132060
|
-
term === expression0 ||
|
|
132061
|
-
term === PositiveUnaryTest
|
|
132062
|
-
) {
|
|
132063
|
-
if (variables.tokens.length > 0) {
|
|
132064
|
-
throw new Error('uncleared name');
|
|
132065
|
-
}
|
|
132066
|
-
}
|
|
132067
|
-
|
|
132068
|
-
if (term === expression0) {
|
|
132069
|
-
|
|
132070
|
-
let parent = variables;
|
|
132071
|
-
|
|
132072
|
-
while (parent.parent) {
|
|
132073
|
-
parent = parent.exitScope(code);
|
|
132074
|
-
}
|
|
132075
|
-
|
|
132076
|
-
return parent;
|
|
132077
|
-
}
|
|
132078
|
-
|
|
132079
|
-
return variables;
|
|
132080
|
-
}
|
|
132081
|
-
});
|
|
132082
|
-
}
|
|
132083
|
-
|
|
132084
|
-
const variableTracker = trackVariables({});
|
|
132085
|
-
|
|
132086
|
-
|
|
132087
|
-
// helpers //////////////
|
|
132088
|
-
|
|
132089
|
-
function getContextValue(variables, args) {
|
|
132090
|
-
|
|
132091
|
-
if (!args.length) {
|
|
132092
|
-
return variables.assign({
|
|
132093
|
-
value: null
|
|
132094
|
-
});
|
|
132095
|
-
}
|
|
132096
|
-
|
|
132097
|
-
if (args[0].name === 'Name') {
|
|
132098
|
-
args = extractNamedArgs(args, [ 'm', 'key' ]);
|
|
132099
|
-
}
|
|
132100
|
-
|
|
132101
|
-
if (args.length !== 2) {
|
|
132102
|
-
return variables.assign({
|
|
132103
|
-
value: null
|
|
132104
|
-
});
|
|
132105
|
-
}
|
|
132106
|
-
|
|
132107
|
-
const [
|
|
132108
|
-
context,
|
|
132109
|
-
key
|
|
132110
|
-
] = args;
|
|
132111
|
-
|
|
132112
|
-
const keyValue = key?.computedValue();
|
|
132113
|
-
const contextValue = context?.computedValue();
|
|
132114
|
-
|
|
132115
|
-
if (
|
|
132116
|
-
(!contextValue || typeof contextValue !== 'object') || typeof keyValue !== 'string'
|
|
132117
|
-
) {
|
|
132118
|
-
return variables.assign({
|
|
132119
|
-
value: null
|
|
132120
|
-
});
|
|
132121
|
-
}
|
|
132122
|
-
|
|
132123
|
-
return variables.assign({
|
|
132124
|
-
value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
132125
|
-
return contextValue.get(keyValue) || value;
|
|
132126
|
-
}, null)
|
|
132127
|
-
});
|
|
132128
|
-
}
|
|
132129
|
-
|
|
132130
|
-
function extractNamedArgs(args, argNames) {
|
|
132131
|
-
|
|
132132
|
-
const context = {};
|
|
132133
|
-
|
|
132134
|
-
for (let i = 0; i < args.length; i += 2) {
|
|
132135
|
-
const [ name, value ] = args.slice(i, i + 2);
|
|
132136
|
-
|
|
132137
|
-
context[name.value] = value;
|
|
132138
|
-
}
|
|
132139
|
-
|
|
132140
|
-
return argNames.map(name => context[name]);
|
|
132141
|
-
}
|
|
132142
|
-
|
|
132143
|
-
function last(arr) {
|
|
132144
|
-
return arr[arr.length - 1];
|
|
132145
|
-
}
|
|
132146
|
-
|
|
132147
|
-
const feelHighlighting = styleTags({
|
|
132148
|
-
StringLiteral: tags$1.string,
|
|
132149
|
-
NumericLiteral: tags$1.number,
|
|
132150
|
-
BooleanLiteral: tags$1.bool,
|
|
132151
|
-
'AtLiteral!': tags$1.special(tags$1.string),
|
|
132152
|
-
CompareOp: tags$1.compareOperator,
|
|
132153
|
-
ArithOp: tags$1.arithmeticOperator,
|
|
132154
|
-
'for if then else some every satisfies between return': tags$1.controlKeyword,
|
|
132155
|
-
'in instance of and or': tags$1.operatorKeyword,
|
|
132156
|
-
function: tags$1.definitionKeyword,
|
|
132157
|
-
as: tags$1.keyword,
|
|
132158
|
-
'Type/...': tags$1.typeName,
|
|
132159
|
-
Wildcard: tags$1.special,
|
|
132160
|
-
null: tags$1.null,
|
|
132161
|
-
LineComment: tags$1.lineComment,
|
|
132162
|
-
BlockComment: tags$1.blockComment,
|
|
132163
|
-
'VariableName! "?"': tags$1.variableName,
|
|
132164
|
-
'DateTimeConstructor! SpecialFunctionName!': tags$1.function(tags$1.special(tags$1.variableName)),
|
|
132165
|
-
'List Interval': tags$1.list,
|
|
132166
|
-
Context: tags$1.definition(tags$1.literal),
|
|
132167
|
-
'Name!': tags$1.definition(tags$1.variableName),
|
|
132168
|
-
'Key/Name! ContextEntryType/Name!': tags$1.definition(tags$1.propertyName),
|
|
132169
|
-
'PathExpression/VariableName!': tags$1.function(tags$1.propertyName),
|
|
132170
|
-
'FormalParameter/ParameterName!': tags$1.function(tags$1.definition(tags$1.variableName)),
|
|
132171
|
-
'( )': tags$1.paren,
|
|
132172
|
-
'[ ]': tags$1.squareBracket,
|
|
132173
|
-
'{ }': tags$1.brace,
|
|
132174
|
-
'.': tags$1.derefOperator,
|
|
132175
|
-
', ;': tags$1.separator,
|
|
132176
|
-
'..': tags$1.punctuation
|
|
132177
|
-
});
|
|
132178
|
-
|
|
132179
|
-
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
132180
|
-
const spec_identifier = {__proto__:null,for:10, in:30, return:34, if:38, then:40, else:42, some:46, every:48, satisfies:55, or:58, and:62, between:70, instance:86, of:89, days:99, time:101, duration:103, years:105, months:107, date:109, list:115, context:121, function:128, null:154, true:324, false:324, "?":168, external:184, not:207};
|
|
132181
|
-
const parser = LRParser.deserialize({
|
|
132182
|
-
version: 14,
|
|
132183
|
-
states: "IWO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQ^O'#FOOOQQ'#Fd'#FdO'dQYO'#FdO`QYO'#DUOOQU'#Em'#EmO)QQ^O'#D]OOQO'#Fk'#FkO,PQWO'#DuOOQU'#D|'#D|OOQU'#D}'#D}OOQU'#EO'#EOO,UOWO'#ERO,PQWO'#EPOOQU'#EP'#EPOOQU'#Fq'#FqOOQU'#Fo'#FoOOQQ'#Fv'#FvO.yQYO'#FvO0wQYO'#FvOOQU'#ET'#ETO2sQYO'#EVOOQU'#FQ'#FQO4UQ^O'#FQO5hQYO'#EWO5rQWO'#EXOOQP'#GP'#GPO5wQXO'#E`OOQU'#Fz'#FzOOQU'#FP'#FPOOQQ'#Eh'#EhQ`QYOOOOQQ'#FR'#FROOQQ'#F['#F[O2sQYO'#CnOOQQ'#F]'#F]O$qQYO'#CrO6SQYO'#DvOOQU'#Fp'#FpO6XQYO'#EQOOQO'#EQ'#EQO2sQYO'#EUO`QYO'#ETOOQO'#F}'#F}O7bQYO'#DQO8UQWO'#F`OOQO'#DS'#DSO8aQYO'#FdQOQWOOO8hQWOOO9[QYO'#CdO9iQYO'#FTOOQQ'#Cc'#CcO9nQYO'#FSOOQQ'#Cb'#CbO9vQYO,58zO`QYO,59hOOQQ'#Fa'#FaOOQQ'#Fb'#FbOOQQ'#Fc'#FcO`QYO,59pO`QYO,59pO`QYO,59pOOQQ'#Fi'#FiO$qQYO,5:]OOQQ'#Fj'#FjO2sQYO,5:_OOQ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s&t&u&v&w&y'P'R'S'X'Y']'g'i'n#a|OPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR%y%a#ahOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR#}!u#akOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR$R!xrlOVr}!]!a!b!c!i!j!l#g$b$p%U%u%v!m'kPhku|!g!k!q#]#_#c#r$O$Y$^$_$e${%b&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nT$U!y'h#anOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR#Pn",
|
|
132186
|
-
nodeNames: "⚠ LineComment BlockComment Expressions ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression ArithOp InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier UnaryTests Wildcard not",
|
|
132187
|
-
maxTerm: 175,
|
|
132188
|
-
context: variableTracker,
|
|
132189
|
-
nodeProps: [
|
|
132190
|
-
["group", -17,4,18,22,28,30,32,40,42,67,69,71,84,85,87,88,89,96,"Expression",47,"Expression Expression",-5,77,78,79,80,81,"Expression Literal"],
|
|
132191
|
-
["closedBy", 37,")",70,"]",95,"}"],
|
|
132192
|
-
["openedBy", 39,"(",68,"[",94,"{"]
|
|
132193
|
-
],
|
|
132194
|
-
propSources: [feelHighlighting],
|
|
132195
|
-
skippedNodes: [0,1,2],
|
|
132196
|
-
repeatNodeCount: 14,
|
|
132197
|
-
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#p~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#q~~$cP!_!`$f~$kOq~~$pW$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$g~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#y~~&mOu~~&rOw~~&wP^~z{&z~'POy~~'UO[~~'ZO#|~R'`PZP!`!a'cQ'hO$[Q~'mQ#x~!O!P's!Q!['x~'xO#{~~'}P$f~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$f~!O!P*W!Q![){~*ZP!Q!['x~*cO$Y~~*hO$u~R*oP![QrP!_!`*rP*wOrPR+OP!XQrP!_!`*r~+WO$i~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
132198
|
-
tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
|
|
132199
|
-
topRules: {"Expressions":[0,3],"UnaryTests":[1,101]},
|
|
132200
|
-
dynamicPrecedences: {"30":-1,"71":-1,"73":-1,"126":-1},
|
|
132201
|
-
specialized: [{term: 120, get: value => spec_identifier[value] || -1}],
|
|
132202
|
-
tokenPrec: 4424
|
|
132203
|
-
});
|
|
132204
|
-
|
|
132205
131283
|
class EntriesContext extends VariableContext {
|
|
132206
131284
|
constructor(value = { entries: {} }) {
|
|
132207
131285
|
super(value);
|
|
@@ -132407,7 +131485,7 @@
|
|
|
132407
131485
|
* @returns {EntriesContext}
|
|
132408
131486
|
*/
|
|
132409
131487
|
function getResultContext(expression, variables = {}) {
|
|
132410
|
-
const contextTracker = trackVariables(variables, EntriesContext);
|
|
131488
|
+
const contextTracker = trackVariables$1(variables, EntriesContext);
|
|
132411
131489
|
|
|
132412
131490
|
// This is a hack to get the latest variables from the context tracker
|
|
132413
131491
|
// lezer does not automatically annotate the parse tree with the context
|
|
@@ -132422,7 +131500,7 @@
|
|
|
132422
131500
|
}
|
|
132423
131501
|
});
|
|
132424
131502
|
|
|
132425
|
-
const contextualParser = parser.configure({
|
|
131503
|
+
const contextualParser = parser$3.configure({
|
|
132426
131504
|
contextTracker: customContextTracker
|
|
132427
131505
|
});
|
|
132428
131506
|
|
|
@@ -142073,7 +141151,7 @@
|
|
|
142073
141151
|
*/
|
|
142074
141152
|
_extractExpressionsWithDepth(template) {
|
|
142075
141153
|
// build simplified feelers syntax tree
|
|
142076
|
-
const parseTree = parser
|
|
141154
|
+
const parseTree = parser.parse(template);
|
|
142077
141155
|
const tree = buildSimpleTree(parseTree, template);
|
|
142078
141156
|
return function _traverse(n, depth = 0) {
|
|
142079
141157
|
if (['Feel', 'FeelBlock'].includes(n.name)) {
|