@aeriajs/compiler 0.0.37 → 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 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
  }
package/dist/semantic.js CHANGED
@@ -124,7 +124,7 @@ const analyze = async (ast, options, errors = []) => {
124
124
  await checkCollectionForeignProperties(foreignCollection, node.property, 'form');
125
125
  if (node.property.constraints) {
126
126
  for (const [name, symbol] of node.property[AST.LOCATION_SYMBOL].contraintTerms) {
127
- if (!await collectionHasProperty(foreignCollection, name)) {
127
+ if (!await collectionHasProperty(foreignCollection, name, options)) {
128
128
  const location = parser_js_1.locationMap.get(symbol);
129
129
  errors.push(new diagnostic_js_1.Diagnostic(`left operand "${name}" does not exist on collection "${foreignCollection.name}"`, location));
130
130
  }
package/dist/semantic.mjs CHANGED
@@ -88,7 +88,7 @@ export const analyze = async (ast, options, errors = []) => {
88
88
  await checkCollectionForeignProperties(foreignCollection, node.property, "form");
89
89
  if (node.property.constraints) {
90
90
  for (const [name, symbol] of node.property[AST.LOCATION_SYMBOL].contraintTerms) {
91
- if (!await collectionHasProperty(foreignCollection, name)) {
91
+ if (!await collectionHasProperty(foreignCollection, name, options)) {
92
92
  const location = locationMap.get(symbol);
93
93
  errors.push(new Diagnostic(`left operand "${name}" does not exist on collection "${foreignCollection.name}"`, location));
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/compiler",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",