@aeriajs/compiler 0.0.18 → 0.0.20
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 +7 -7
- package/dist/parser.mjs +7 -7
- package/package.json +3 -3
package/dist/parser.js
CHANGED
|
@@ -381,6 +381,13 @@ const parse = (tokens) => {
|
|
|
381
381
|
let nestedAdditionalProperties;
|
|
382
382
|
let modifierToken;
|
|
383
383
|
const typeSymbol = Symbol();
|
|
384
|
+
if (options.allowModifiers) {
|
|
385
|
+
const nextToken = next();
|
|
386
|
+
const currentTokenValue = current().value;
|
|
387
|
+
if (match(token_js_1.TokenType.Identifier) && typeof currentTokenValue === 'string' && guards.isValidPropertyModifier(currentTokenValue) && (nextToken.type === token_js_1.TokenType.LeftBracket || nextToken.type === token_js_1.TokenType.LeftSquareBracket || nextToken.type === token_js_1.TokenType.Identifier)) {
|
|
388
|
+
modifierToken = consume(token_js_1.TokenType.Identifier);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
384
391
|
if (match(token_js_1.TokenType.LeftSquareBracket)) {
|
|
385
392
|
consume(token_js_1.TokenType.LeftSquareBracket);
|
|
386
393
|
const arrayProperty = {
|
|
@@ -435,13 +442,6 @@ const parse = (tokens) => {
|
|
|
435
442
|
nestedProperties,
|
|
436
443
|
};
|
|
437
444
|
}
|
|
438
|
-
if (options.allowModifiers) {
|
|
439
|
-
const nextToken = next();
|
|
440
|
-
const currentTokenValue = current().value;
|
|
441
|
-
if (match(token_js_1.TokenType.Identifier) && typeof currentTokenValue === 'string' && guards.isValidPropertyModifier(currentTokenValue) && (nextToken.type === token_js_1.TokenType.LeftBracket || nextToken.type === token_js_1.TokenType.Identifier)) {
|
|
442
|
-
modifierToken = consume(token_js_1.TokenType.Identifier);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
445
|
exports.locationMap.set(typeSymbol, current().location);
|
|
446
446
|
if (match(token_js_1.TokenType.LeftBracket)) {
|
|
447
447
|
consume(token_js_1.TokenType.LeftBracket);
|
package/dist/parser.mjs
CHANGED
|
@@ -339,6 +339,13 @@ export const parse = (tokens) => {
|
|
|
339
339
|
let nestedAdditionalProperties;
|
|
340
340
|
let modifierToken;
|
|
341
341
|
const typeSymbol = Symbol();
|
|
342
|
+
if (options.allowModifiers) {
|
|
343
|
+
const nextToken = next();
|
|
344
|
+
const currentTokenValue = current().value;
|
|
345
|
+
if (match(TokenType.Identifier) && typeof currentTokenValue === "string" && guards.isValidPropertyModifier(currentTokenValue) && (nextToken.type === TokenType.LeftBracket || nextToken.type === TokenType.LeftSquareBracket || nextToken.type === TokenType.Identifier)) {
|
|
346
|
+
modifierToken = consume(TokenType.Identifier);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
342
349
|
if (match(TokenType.LeftSquareBracket)) {
|
|
343
350
|
consume(TokenType.LeftSquareBracket);
|
|
344
351
|
const arrayProperty = {
|
|
@@ -391,13 +398,6 @@ export const parse = (tokens) => {
|
|
|
391
398
|
nestedProperties: nestedProperties2
|
|
392
399
|
};
|
|
393
400
|
}
|
|
394
|
-
if (options.allowModifiers) {
|
|
395
|
-
const nextToken = next();
|
|
396
|
-
const currentTokenValue = current().value;
|
|
397
|
-
if (match(TokenType.Identifier) && typeof currentTokenValue === "string" && guards.isValidPropertyModifier(currentTokenValue) && (nextToken.type === TokenType.LeftBracket || nextToken.type === TokenType.Identifier)) {
|
|
398
|
-
modifierToken = consume(TokenType.Identifier);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
401
|
locationMap.set(typeSymbol, current().location);
|
|
402
402
|
if (match(TokenType.LeftBracket)) {
|
|
403
403
|
consume(TokenType.LeftBracket);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/compiler",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@aeriajs/common": "^0.0.
|
|
25
|
-
"@aeriajs/types": "^0.0.
|
|
24
|
+
"@aeriajs/common": "^0.0.137",
|
|
25
|
+
"@aeriajs/types": "^0.0.119"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@aeriajs/common": "link:../common",
|