@xuda.io/runtime-bundle 1.0.488 → 1.0.489
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/js/xuda-runtime-bundle.js +7 -34
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +7 -34
- package/js/xuda-runtime-slim.min.es.js +7 -34
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +7 -34
- package/js/xuda-worker-bundle.js +7 -34
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -35435,50 +35435,23 @@ func.expression.parse = function (input) {
|
|
|
35435
35435
|
const segments = [];
|
|
35436
35436
|
let pos = 0;
|
|
35437
35437
|
|
|
35438
|
-
const parts = input.split(/(
|
|
35438
|
+
const parts = input.split(/(@\w+)/).filter(Boolean);
|
|
35439
35439
|
|
|
35440
|
-
for (
|
|
35441
|
-
|
|
35442
|
-
|
|
35443
|
-
if (part === '@' && i + 1 < parts.length) {
|
|
35444
|
-
const nextPart = parts[i + 1];
|
|
35445
|
-
const varEnd = nextPart.search(/[.\[]/); // Split at first . or [
|
|
35446
|
-
let fieldId, remainder;
|
|
35447
|
-
|
|
35448
|
-
if (varEnd > 0) {
|
|
35449
|
-
fieldId = nextPart.slice(0, varEnd);
|
|
35450
|
-
remainder = nextPart.slice(varEnd);
|
|
35451
|
-
} else {
|
|
35452
|
-
fieldId = nextPart;
|
|
35453
|
-
remainder = '';
|
|
35454
|
-
}
|
|
35455
|
-
|
|
35456
|
-
// Add @variable segment
|
|
35457
|
-
const fullVarValue = `@${fieldId}`;
|
|
35440
|
+
for (const part of parts) {
|
|
35441
|
+
if (part.startsWith('@')) {
|
|
35442
|
+
const fieldId = part.slice(1);
|
|
35458
35443
|
segments.push({
|
|
35459
|
-
value:
|
|
35444
|
+
value: part,
|
|
35460
35445
|
fieldId,
|
|
35461
35446
|
pos,
|
|
35462
35447
|
});
|
|
35463
|
-
|
|
35464
|
-
|
|
35465
|
-
// Add remainder as a separate segment, if any
|
|
35466
|
-
if (remainder) {
|
|
35467
|
-
segments.push({
|
|
35468
|
-
value: remainder,
|
|
35469
|
-
pos,
|
|
35470
|
-
});
|
|
35471
|
-
pos += remainder.length;
|
|
35472
|
-
}
|
|
35473
|
-
|
|
35474
|
-
i++; // Skip the next part since we consumed it
|
|
35475
|
-
} else if (part !== '@') {
|
|
35448
|
+
} else {
|
|
35476
35449
|
segments.push({
|
|
35477
35450
|
value: part,
|
|
35478
35451
|
pos,
|
|
35479
35452
|
});
|
|
35480
|
-
pos += part.length;
|
|
35481
35453
|
}
|
|
35454
|
+
pos += part.length;
|
|
35482
35455
|
}
|
|
35483
35456
|
|
|
35484
35457
|
return segments;
|