pacc 8.1.4 → 8.1.5
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/package.json +1 -1
- package/src/ast.mjs +3 -5
- package/src/expression.mjs +0 -6
package/package.json
CHANGED
package/src/ast.mjs
CHANGED
|
@@ -99,11 +99,9 @@ export function pathEval(node, current, context) {
|
|
|
99
99
|
if (collection) {
|
|
100
100
|
current = current.map(x => x[item]);
|
|
101
101
|
} else {
|
|
102
|
-
|
|
103
|
-
current
|
|
104
|
-
|
|
105
|
-
current = current[item] ?? context.getGlobal(item);
|
|
106
|
-
}
|
|
102
|
+
current =
|
|
103
|
+
(current instanceof Map ? current.get(item) : current[item]) ??
|
|
104
|
+
context.getGlobal(item);
|
|
107
105
|
}
|
|
108
106
|
}
|
|
109
107
|
break;
|
package/src/expression.mjs
CHANGED
|
@@ -135,12 +135,6 @@ export function parse(input, context = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
if (last === DOT) {
|
|
138
|
-
switch (typeof left) {
|
|
139
|
-
case "number":
|
|
140
|
-
right.path.unshift(left);
|
|
141
|
-
return right;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
138
|
if (left.path) {
|
|
145
139
|
left.path.push(...right.path);
|
|
146
140
|
return left;
|