@aeriajs/compiler 0.0.38 → 0.0.39
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/parser.js +3 -0
- package/dist/parser.mjs +3 -0
- package/package.json +1 -1
package/dist/parser.js
CHANGED
|
@@ -70,6 +70,7 @@ const parse = (tokens) => {
|
|
|
70
70
|
};
|
|
71
71
|
const errors = [];
|
|
72
72
|
const advance = () => index++;
|
|
73
|
+
const rollback = () => index--;
|
|
73
74
|
const next = () => {
|
|
74
75
|
const token = tokens[index + 1];
|
|
75
76
|
if (!token) {
|
|
@@ -287,8 +288,10 @@ const parse = (tokens) => {
|
|
|
287
288
|
}
|
|
288
289
|
case 'constraints': {
|
|
289
290
|
const constraintTerms = [];
|
|
291
|
+
rollback();
|
|
290
292
|
property[attributeName] = parseCondition(constraintTerms);
|
|
291
293
|
property[AST.LOCATION_SYMBOL].contraintTerms = constraintTerms;
|
|
294
|
+
rollback();
|
|
292
295
|
return;
|
|
293
296
|
}
|
|
294
297
|
}
|
package/dist/parser.mjs
CHANGED
|
@@ -35,6 +35,7 @@ export const parse = (tokens) => {
|
|
|
35
35
|
};
|
|
36
36
|
const errors = [];
|
|
37
37
|
const advance = () => index++;
|
|
38
|
+
const rollback = () => index--;
|
|
38
39
|
const next = () => {
|
|
39
40
|
const token = tokens[index + 1];
|
|
40
41
|
if (!token) {
|
|
@@ -247,8 +248,10 @@ export const parse = (tokens) => {
|
|
|
247
248
|
}
|
|
248
249
|
case "constraints": {
|
|
249
250
|
const constraintTerms = [];
|
|
251
|
+
rollback();
|
|
250
252
|
property[attributeName] = parseCondition(constraintTerms);
|
|
251
253
|
property[AST.LOCATION_SYMBOL].contraintTerms = constraintTerms;
|
|
254
|
+
rollback();
|
|
252
255
|
return;
|
|
253
256
|
}
|
|
254
257
|
}
|