New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aurelia/jit

Package Overview
Dependencies
Maintainers
1
Versions
554
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelia/jit - npm Package Compare versions

Comparing version 0.8.0-dev.202010031322 to 0.8.0-dev.202010031518

75

dist/esnext/common.js

@@ -65,39 +65,40 @@ export function unescapeCode(code) {

Token[Token["ThisScope"] = 3076] = "ThisScope";
Token[Token["ParentScope"] = 3077] = "ParentScope";
Token[Token["OpenParen"] = 671750] = "OpenParen";
Token[Token["OpenBrace"] = 131079] = "OpenBrace";
Token[Token["Dot"] = 16392] = "Dot";
Token[Token["CloseBrace"] = 1835017] = "CloseBrace";
Token[Token["CloseParen"] = 1835018] = "CloseParen";
Token[Token["Comma"] = 1572875] = "Comma";
Token[Token["OpenBracket"] = 671756] = "OpenBracket";
Token[Token["CloseBracket"] = 1835021] = "CloseBracket";
Token[Token["Colon"] = 1572878] = "Colon";
Token[Token["Question"] = 1572879] = "Question";
Token[Token["Ampersand"] = 1572880] = "Ampersand";
Token[Token["Bar"] = 1572883] = "Bar";
Token[Token["BarBar"] = 1638548] = "BarBar";
Token[Token["AmpersandAmpersand"] = 1638613] = "AmpersandAmpersand";
Token[Token["EqualsEquals"] = 1638678] = "EqualsEquals";
Token[Token["ExclamationEquals"] = 1638679] = "ExclamationEquals";
Token[Token["EqualsEqualsEquals"] = 1638680] = "EqualsEqualsEquals";
Token[Token["ExclamationEqualsEquals"] = 1638681] = "ExclamationEqualsEquals";
Token[Token["LessThan"] = 1638746] = "LessThan";
Token[Token["GreaterThan"] = 1638747] = "GreaterThan";
Token[Token["LessThanEquals"] = 1638748] = "LessThanEquals";
Token[Token["GreaterThanEquals"] = 1638749] = "GreaterThanEquals";
Token[Token["InKeyword"] = 1640798] = "InKeyword";
Token[Token["InstanceOfKeyword"] = 1640799] = "InstanceOfKeyword";
Token[Token["Plus"] = 623008] = "Plus";
Token[Token["Minus"] = 623009] = "Minus";
Token[Token["TypeofKeyword"] = 34850] = "TypeofKeyword";
Token[Token["VoidKeyword"] = 34851] = "VoidKeyword";
Token[Token["Asterisk"] = 1638884] = "Asterisk";
Token[Token["Percent"] = 1638885] = "Percent";
Token[Token["Slash"] = 1638886] = "Slash";
Token[Token["Equals"] = 1048615] = "Equals";
Token[Token["Exclamation"] = 32808] = "Exclamation";
Token[Token["TemplateTail"] = 540713] = "TemplateTail";
Token[Token["TemplateContinuation"] = 540714] = "TemplateContinuation";
Token[Token["OfKeyword"] = 1051179] = "OfKeyword";
Token[Token["HostScope"] = 3077] = "HostScope";
Token[Token["ParentScope"] = 3078] = "ParentScope";
Token[Token["OpenParen"] = 671751] = "OpenParen";
Token[Token["OpenBrace"] = 131080] = "OpenBrace";
Token[Token["Dot"] = 16393] = "Dot";
Token[Token["CloseBrace"] = 1835018] = "CloseBrace";
Token[Token["CloseParen"] = 1835019] = "CloseParen";
Token[Token["Comma"] = 1572876] = "Comma";
Token[Token["OpenBracket"] = 671757] = "OpenBracket";
Token[Token["CloseBracket"] = 1835022] = "CloseBracket";
Token[Token["Colon"] = 1572879] = "Colon";
Token[Token["Question"] = 1572880] = "Question";
Token[Token["Ampersand"] = 1572883] = "Ampersand";
Token[Token["Bar"] = 1572884] = "Bar";
Token[Token["BarBar"] = 1638549] = "BarBar";
Token[Token["AmpersandAmpersand"] = 1638614] = "AmpersandAmpersand";
Token[Token["EqualsEquals"] = 1638679] = "EqualsEquals";
Token[Token["ExclamationEquals"] = 1638680] = "ExclamationEquals";
Token[Token["EqualsEqualsEquals"] = 1638681] = "EqualsEqualsEquals";
Token[Token["ExclamationEqualsEquals"] = 1638682] = "ExclamationEqualsEquals";
Token[Token["LessThan"] = 1638747] = "LessThan";
Token[Token["GreaterThan"] = 1638748] = "GreaterThan";
Token[Token["LessThanEquals"] = 1638749] = "LessThanEquals";
Token[Token["GreaterThanEquals"] = 1638750] = "GreaterThanEquals";
Token[Token["InKeyword"] = 1640799] = "InKeyword";
Token[Token["InstanceOfKeyword"] = 1640800] = "InstanceOfKeyword";
Token[Token["Plus"] = 623009] = "Plus";
Token[Token["Minus"] = 623010] = "Minus";
Token[Token["TypeofKeyword"] = 34851] = "TypeofKeyword";
Token[Token["VoidKeyword"] = 34852] = "VoidKeyword";
Token[Token["Asterisk"] = 1638885] = "Asterisk";
Token[Token["Percent"] = 1638886] = "Percent";
Token[Token["Slash"] = 1638887] = "Slash";
Token[Token["Equals"] = 1048616] = "Equals";
Token[Token["Exclamation"] = 32809] = "Exclamation";
Token[Token["TemplateTail"] = 540714] = "TemplateTail";
Token[Token["TemplateContinuation"] = 540715] = "TemplateContinuation";
Token[Token["OfKeyword"] = 1051180] = "OfKeyword";
})(Token || (Token = {}));

@@ -104,0 +105,0 @@ export var Char;

@@ -9,2 +9,3 @@ import { Reporter } from '@aurelia/kernel';

const $this = AccessThisExpression.$this;
const $host = AccessThisExpression.$host;
const $parent = AccessThisExpression.$parent;

@@ -133,3 +134,3 @@ /** @internal */

primary: switch (state.currentToken) {
case 3077 /* ParentScope */: // $parent
case 3078 /* ParentScope */: // $parent
state.assignable = false;

@@ -139,4 +140,4 @@ do {

access++; // ancestor
if (consumeOpt(state, 16392 /* Dot */)) {
if (state.currentToken === 16392 /* Dot */) {
if (consumeOpt(state, 16393 /* Dot */)) {
if (state.currentToken === 16393 /* Dot */) {
throw Reporter.error(102 /* DoubleDot */, { state });

@@ -157,3 +158,3 @@ }

}
} while (state.currentToken === 3077 /* ParentScope */);
} while (state.currentToken === 3078 /* ParentScope */);
// falls through

@@ -177,17 +178,23 @@ case 1024 /* Identifier */: // identifier

break;
case 671750 /* OpenParen */: // parenthesized expression
case 3077 /* HostScope */: // $host
state.assignable = false;
nextToken(state);
result = $host;
access = 512 /* This */;
break;
case 671751 /* OpenParen */: // parenthesized expression
nextToken(state);
result = parse(state, 0 /* Reset */, 62 /* Assign */, bindingType);
consume(state, 1835018 /* CloseParen */);
consume(state, 1835019 /* CloseParen */);
access = 0 /* Reset */;
break;
case 671756 /* OpenBracket */:
case 671757 /* OpenBracket */:
result = parseArrayLiteralExpression(state, access, bindingType);
access = 0 /* Reset */;
break;
case 131079 /* OpenBrace */:
case 131080 /* OpenBrace */:
result = parseObjectLiteralExpression(state, bindingType);
access = 0 /* Reset */;
break;
case 540713 /* TemplateTail */:
case 540714 /* TemplateTail */:
result = new TemplateExpression([state.tokenValue]);

@@ -198,3 +205,3 @@ state.assignable = false;

break;
case 540714 /* TemplateContinuation */:
case 540715 /* TemplateContinuation */:
result = parseTemplate(state, access, bindingType, result, false);

@@ -264,3 +271,3 @@ access = 0 /* Reset */;

switch (state.currentToken) {
case 16392 /* Dot */:
case 16393 /* Dot */:
state.assignable = true;

@@ -275,3 +282,3 @@ nextToken(state);

access = ((access & (512 /* This */ | 1024 /* Scope */)) << 1) | (access & 2048 /* Member */) | ((access & 4096 /* Keyed */) >> 1);
if (state.currentToken === 671750 /* OpenParen */) {
if (state.currentToken === 671751 /* OpenParen */) {
if (access === 0 /* Reset */) { // if the left hand side is a literal, make sure we parse a CallMemberExpression

@@ -283,3 +290,3 @@ access = 2048 /* Member */;

if (access & 1024 /* Scope */) {
result = new AccessScopeExpression(name, result.ancestor);
result = new AccessScopeExpression(name, result.ancestor, result === $host);
}

@@ -290,3 +297,3 @@ else { // if it's not $Scope, it's $Member

continue;
case 671756 /* OpenBracket */:
case 671757 /* OpenBracket */:
state.assignable = true;

@@ -296,16 +303,16 @@ nextToken(state);

result = new AccessKeyedExpression(result, parse(state, 0 /* Reset */, 62 /* Assign */, bindingType));
consume(state, 1835021 /* CloseBracket */);
consume(state, 1835022 /* CloseBracket */);
break;
case 671750 /* OpenParen */:
case 671751 /* OpenParen */:
state.assignable = false;
nextToken(state);
while (state.currentToken !== 1835018 /* CloseParen */) {
while (state.currentToken !== 1835019 /* CloseParen */) {
args.push(parse(state, 0 /* Reset */, 62 /* Assign */, bindingType));
if (!consumeOpt(state, 1572875 /* Comma */)) {
if (!consumeOpt(state, 1572876 /* Comma */)) {
break;
}
}
consume(state, 1835018 /* CloseParen */);
consume(state, 1835019 /* CloseParen */);
if (access & 1024 /* Scope */) {
result = new CallScopeExpression(name, args, result.ancestor);
result = new CallScopeExpression(name, args, result.ancestor, result === $host);
}

@@ -320,3 +327,3 @@ else if (access & 2048 /* Member */) {

break;
case 540713 /* TemplateTail */:
case 540714 /* TemplateTail */:
state.assignable = false;

@@ -327,3 +334,3 @@ strings = [state.tokenValue];

break;
case 540714 /* TemplateContinuation */:
case 540715 /* TemplateContinuation */:
result = parseTemplate(state, access, bindingType, result, true);

@@ -389,5 +396,5 @@ default:

*/
if (consumeOpt(state, 1572879 /* Question */)) {
if (consumeOpt(state, 1572880 /* Question */)) {
const yes = parse(state, access, 62 /* Assign */, bindingType);
consume(state, 1572878 /* Colon */);
consume(state, 1572879 /* Colon */);
result = new ConditionalExpression(result, yes, parse(state, access, 62 /* Assign */, bindingType));

@@ -411,3 +418,3 @@ state.assignable = false;

*/
if (consumeOpt(state, 1048615 /* Equals */)) {
if (consumeOpt(state, 1048616 /* Equals */)) {
if (!state.assignable) {

@@ -424,3 +431,3 @@ throw Reporter.error(150 /* NotAssignable */, { state });

*/
while (consumeOpt(state, 1572883 /* Bar */)) {
while (consumeOpt(state, 1572884 /* Bar */)) {
if (state.currentToken === 1572864 /* EOF */) {

@@ -432,3 +439,3 @@ throw Reporter.error(112);

const args = new Array();
while (consumeOpt(state, 1572878 /* Colon */)) {
while (consumeOpt(state, 1572879 /* Colon */)) {
args.push(parse(state, access, 62 /* Assign */, bindingType));

@@ -440,3 +447,3 @@ }

*/
while (consumeOpt(state, 1572880 /* Ampersand */)) {
while (consumeOpt(state, 1572883 /* Ampersand */)) {
if (state.currentToken === 1572864 /* EOF */) {

@@ -448,3 +455,3 @@ throw Reporter.error(113);

const args = new Array();
while (consumeOpt(state, 1572878 /* Colon */)) {
while (consumeOpt(state, 1572879 /* Colon */)) {
args.push(parse(state, access, 62 /* Assign */, bindingType));

@@ -487,6 +494,6 @@ }

const elements = new Array();
while (state.currentToken !== 1835021 /* CloseBracket */) {
if (consumeOpt(state, 1572875 /* Comma */)) {
while (state.currentToken !== 1835022 /* CloseBracket */) {
if (consumeOpt(state, 1572876 /* Comma */)) {
elements.push($undefined);
if (state.currentToken === 1835021 /* CloseBracket */) {
if (state.currentToken === 1835022 /* CloseBracket */) {
break;

@@ -497,4 +504,4 @@ }

elements.push(parse(state, access, 62 /* Assign */, bindingType & ~512 /* IsIterator */));
if (consumeOpt(state, 1572875 /* Comma */)) {
if (state.currentToken === 1835021 /* CloseBracket */) {
if (consumeOpt(state, 1572876 /* Comma */)) {
if (state.currentToken === 1835022 /* CloseBracket */) {
break;

@@ -508,3 +515,3 @@ }

}
consume(state, 1835021 /* CloseBracket */);
consume(state, 1835022 /* CloseBracket */);
if (bindingType & 512 /* IsIterator */) {

@@ -522,3 +529,3 @@ return new ArrayBindingPattern(elements);

}
if (state.currentToken !== 1051179 /* OfKeyword */) {
if (state.currentToken !== 1051180 /* OfKeyword */) {
throw Reporter.error(106 /* InvalidForDeclaration */, { state });

@@ -556,3 +563,3 @@ }

nextToken(state);
while (state.currentToken !== 1835017 /* CloseBrace */) {
while (state.currentToken !== 1835018 /* CloseBrace */) {
keys.push(state.tokenValue);

@@ -562,3 +569,3 @@ // Literal = mandatory colon

nextToken(state);
consume(state, 1572878 /* Colon */);
consume(state, 1572879 /* Colon */);
values.push(parse(state, 0 /* Reset */, 62 /* Assign */, bindingType & ~512 /* IsIterator */));

@@ -570,3 +577,3 @@ }

nextToken(state);
if (consumeOpt(state, 1572878 /* Colon */)) {
if (consumeOpt(state, 1572879 /* Colon */)) {
values.push(parse(state, 0 /* Reset */, 62 /* Assign */, bindingType & ~512 /* IsIterator */));

@@ -585,7 +592,7 @@ }

}
if (state.currentToken !== 1835017 /* CloseBrace */) {
consume(state, 1572875 /* Comma */);
if (state.currentToken !== 1835018 /* CloseBrace */) {
consume(state, 1572876 /* Comma */);
}
}
consume(state, 1835017 /* CloseBrace */);
consume(state, 1835018 /* CloseBrace */);
if (bindingType & 512 /* IsIterator */) {

@@ -670,7 +677,7 @@ return new ObjectBindingPattern(keys, values);

// TODO: properly implement raw parts / decide whether we want this
consume(state, 540714 /* TemplateContinuation */);
consume(state, 540715 /* TemplateContinuation */);
const expressions = [parse(state, access, 62 /* Assign */, bindingType)];
while ((state.currentToken = scanTemplateTail(state)) !== 540713 /* TemplateTail */) {
while ((state.currentToken = scanTemplateTail(state)) !== 540714 /* TemplateTail */) {
cooked.push(state.tokenValue);
consume(state, 540714 /* TemplateContinuation */);
consume(state, 540715 /* TemplateContinuation */);
expressions.push(parse(state, access, 62 /* Assign */, bindingType));

@@ -795,5 +802,5 @@ }

if (tail) {
return 540713 /* TemplateTail */;
return 540714 /* TemplateTail */;
}
return 540714 /* TemplateContinuation */;
return 540715 /* TemplateContinuation */;
}

@@ -830,7 +837,7 @@ function scanTemplateTail(state) {

const TokenValues = [
$false, $true, $null, $undefined, '$this', '$parent',
$false, $true, $null, $undefined, '$this', '$host', '$parent',
'(', '{', '.', '}', ')', ',', '[', ']', ':', '?', '\'', '"',
'&', '|', '||', '&&', '==', '!=', '===', '!==', '<', '>',
'<=', '>=', 'in', 'instanceof', '+', '-', 'typeof', 'void', '*', '%', '/', '=', '!',
540713 /* TemplateTail */, 540714 /* TemplateContinuation */,
540714 /* TemplateTail */, 540715 /* TemplateContinuation */,
'of'

@@ -844,8 +851,9 @@ ];

KeywordLookup.$this = 3076 /* ThisScope */;
KeywordLookup.$parent = 3077 /* ParentScope */;
KeywordLookup.in = 1640798 /* InKeyword */;
KeywordLookup.instanceof = 1640799 /* InstanceOfKeyword */;
KeywordLookup.typeof = 34850 /* TypeofKeyword */;
KeywordLookup.void = 34851 /* VoidKeyword */;
KeywordLookup.of = 1051179 /* OfKeyword */;
KeywordLookup.$host = 3077 /* HostScope */;
KeywordLookup.$parent = 3078 /* ParentScope */;
KeywordLookup.in = 1640799 /* InKeyword */;
KeywordLookup.instanceof = 1640800 /* InstanceOfKeyword */;
KeywordLookup.typeof = 34851 /* TypeofKeyword */;
KeywordLookup.void = 34852 /* VoidKeyword */;
KeywordLookup.of = 1051180 /* OfKeyword */;
/**

@@ -925,9 +933,9 @@ * Ranges of code points in pairs of 2 (eg 0x41-0x5B, 0x61-0x7B, ...) where the second value is not inclusive (5-7 means 5 and 6)

if (nextChar(s) !== 61 /* Equals */) {
return 32808 /* Exclamation */;
return 32809 /* Exclamation */;
}
if (nextChar(s) !== 61 /* Equals */) {
return 1638679 /* ExclamationEquals */;
return 1638680 /* ExclamationEquals */;
}
nextChar(s);
return 1638681 /* ExclamationEqualsEquals */;
return 1638682 /* ExclamationEqualsEquals */;
};

@@ -937,9 +945,9 @@ // =, ==, ===

if (nextChar(s) !== 61 /* Equals */) {
return 1048615 /* Equals */;
return 1048616 /* Equals */;
}
if (nextChar(s) !== 61 /* Equals */) {
return 1638678 /* EqualsEquals */;
return 1638679 /* EqualsEquals */;
}
nextChar(s);
return 1638680 /* EqualsEqualsEquals */;
return 1638681 /* EqualsEqualsEquals */;
};

@@ -949,6 +957,6 @@ // &, &&

if (nextChar(s) !== 38 /* Ampersand */) {
return 1572880 /* Ampersand */;
return 1572883 /* Ampersand */;
}
nextChar(s);
return 1638613 /* AmpersandAmpersand */;
return 1638614 /* AmpersandAmpersand */;
};

@@ -958,6 +966,6 @@ // |, ||

if (nextChar(s) !== 124 /* Bar */) {
return 1572883 /* Bar */;
return 1572884 /* Bar */;
}
nextChar(s);
return 1638548 /* BarBar */;
return 1638549 /* BarBar */;
};

@@ -969,3 +977,3 @@ // .

}
return 16392 /* Dot */;
return 16393 /* Dot */;
};

@@ -975,6 +983,6 @@ // <, <=

if (nextChar(s) !== 61 /* Equals */) {
return 1638746 /* LessThan */;
return 1638747 /* LessThan */;
}
nextChar(s);
return 1638748 /* LessThanEquals */;
return 1638749 /* LessThanEquals */;
};

@@ -984,21 +992,21 @@ // >, >=

if (nextChar(s) !== 61 /* Equals */) {
return 1638747 /* GreaterThan */;
return 1638748 /* GreaterThan */;
}
nextChar(s);
return 1638749 /* GreaterThanEquals */;
return 1638750 /* GreaterThanEquals */;
};
CharScanners[37 /* Percent */] = returnToken(1638885 /* Percent */);
CharScanners[40 /* OpenParen */] = returnToken(671750 /* OpenParen */);
CharScanners[41 /* CloseParen */] = returnToken(1835018 /* CloseParen */);
CharScanners[42 /* Asterisk */] = returnToken(1638884 /* Asterisk */);
CharScanners[43 /* Plus */] = returnToken(623008 /* Plus */);
CharScanners[44 /* Comma */] = returnToken(1572875 /* Comma */);
CharScanners[45 /* Minus */] = returnToken(623009 /* Minus */);
CharScanners[47 /* Slash */] = returnToken(1638886 /* Slash */);
CharScanners[58 /* Colon */] = returnToken(1572878 /* Colon */);
CharScanners[63 /* Question */] = returnToken(1572879 /* Question */);
CharScanners[91 /* OpenBracket */] = returnToken(671756 /* OpenBracket */);
CharScanners[93 /* CloseBracket */] = returnToken(1835021 /* CloseBracket */);
CharScanners[123 /* OpenBrace */] = returnToken(131079 /* OpenBrace */);
CharScanners[125 /* CloseBrace */] = returnToken(1835017 /* CloseBrace */);
CharScanners[37 /* Percent */] = returnToken(1638886 /* Percent */);
CharScanners[40 /* OpenParen */] = returnToken(671751 /* OpenParen */);
CharScanners[41 /* CloseParen */] = returnToken(1835019 /* CloseParen */);
CharScanners[42 /* Asterisk */] = returnToken(1638885 /* Asterisk */);
CharScanners[43 /* Plus */] = returnToken(623009 /* Plus */);
CharScanners[44 /* Comma */] = returnToken(1572876 /* Comma */);
CharScanners[45 /* Minus */] = returnToken(623010 /* Minus */);
CharScanners[47 /* Slash */] = returnToken(1638887 /* Slash */);
CharScanners[58 /* Colon */] = returnToken(1572879 /* Colon */);
CharScanners[63 /* Question */] = returnToken(1572880 /* Question */);
CharScanners[91 /* OpenBracket */] = returnToken(671757 /* OpenBracket */);
CharScanners[93 /* CloseBracket */] = returnToken(1835022 /* CloseBracket */);
CharScanners[123 /* OpenBrace */] = returnToken(131080 /* OpenBrace */);
CharScanners[125 /* CloseBrace */] = returnToken(1835018 /* CloseBrace */);
//# sourceMappingURL=expression-parser.js.map

@@ -11,3 +11,3 @@ export { AttrSyntax } from './ast';

export { ResourceModel, BindableInfo, ElementInfo, AttrInfo } from './resource-model';
export { BindingSymbol, CustomAttributeSymbol, CustomElementSymbol, LetElementSymbol, PlainAttributeSymbol, PlainElementSymbol, ReplacePartSymbol, SymbolFlags, TemplateControllerSymbol, TextSymbol, } from './semantic-model';
export { BindingSymbol, CustomAttributeSymbol, CustomElementSymbol, LetElementSymbol, PlainAttributeSymbol, PlainElementSymbol, SymbolFlags, TemplateControllerSymbol, TextSymbol, ProjectionSymbol, } from './semantic-model';
//# sourceMappingURL=index.js.map
export var SymbolFlags;
(function (SymbolFlags) {
SymbolFlags[SymbolFlags["type"] = 511] = "type";
SymbolFlags[SymbolFlags["type"] = 1023] = "type";
SymbolFlags[SymbolFlags["isTemplateController"] = 1] = "isTemplateController";
SymbolFlags[SymbolFlags["isReplacePart"] = 2] = "isReplacePart";
SymbolFlags[SymbolFlags["isProjection"] = 2] = "isProjection";
SymbolFlags[SymbolFlags["isCustomAttribute"] = 4] = "isCustomAttribute";

@@ -13,8 +13,9 @@ SymbolFlags[SymbolFlags["isPlainAttribute"] = 8] = "isPlainAttribute";

SymbolFlags[SymbolFlags["isBinding"] = 256] = "isBinding";
SymbolFlags[SymbolFlags["hasMarker"] = 512] = "hasMarker";
SymbolFlags[SymbolFlags["hasTemplate"] = 1024] = "hasTemplate";
SymbolFlags[SymbolFlags["hasAttributes"] = 2048] = "hasAttributes";
SymbolFlags[SymbolFlags["hasBindings"] = 4096] = "hasBindings";
SymbolFlags[SymbolFlags["hasChildNodes"] = 8192] = "hasChildNodes";
SymbolFlags[SymbolFlags["hasParts"] = 16384] = "hasParts";
SymbolFlags[SymbolFlags["isAuSlot"] = 512] = "isAuSlot";
SymbolFlags[SymbolFlags["hasMarker"] = 1024] = "hasMarker";
SymbolFlags[SymbolFlags["hasTemplate"] = 2048] = "hasTemplate";
SymbolFlags[SymbolFlags["hasAttributes"] = 4096] = "hasAttributes";
SymbolFlags[SymbolFlags["hasBindings"] = 8192] = "hasBindings";
SymbolFlags[SymbolFlags["hasChildNodes"] = 16384] = "hasChildNodes";
SymbolFlags[SymbolFlags["hasProjections"] = 32768] = "hasProjections";
})(SymbolFlags || (SymbolFlags = {}));

@@ -30,7 +31,7 @@ function createMarker(dom) {

export class TemplateControllerSymbol {
constructor(dom, syntax, info, partName, res = info.name) {
constructor(dom, syntax, info, res = info.name) {
this.syntax = syntax;
this.info = info;
this.res = res;
this.flags = 1 /* isTemplateController */ | 512 /* hasMarker */;
this.flags = 1 /* isTemplateController */ | 1024 /* hasMarker */;
this.physicalNode = null;

@@ -40,4 +41,2 @@ this.template = null;

this._bindings = null;
this._parts = null;
this.partName = info.name === 'replaceable' ? partName : null;
this.marker = createMarker(dom);

@@ -48,27 +47,12 @@ }

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}
return this._bindings;
}
get parts() {
if (this._parts === null) {
this._parts = [];
this.flags |= 16384 /* hasParts */;
}
return this._parts;
}
}
/**
* Wrapper for an element (with all of its attributes, regardless of the order in which they are declared)
* that has a replace attribute on it.
*
* This element will be lifted from the DOM just like a template controller.
*/
export class ReplacePartSymbol {
constructor(name, physicalNode = null, parent = null, template = null) {
export class ProjectionSymbol {
constructor(name, template) {
this.name = name;
this.physicalNode = physicalNode;
this.parent = parent;
this.template = template;
this.flags = 2 /* isReplacePart */;
this.flags = 2 /* isProjection */;
}

@@ -90,3 +74,3 @@ }

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}

@@ -144,7 +128,7 @@ return this._bindings;

this._childNodes = null;
this._parts = null;
this._projections = null;
if (info.containerless) {
this.isContainerless = true;
this.marker = createMarker(dom);
this.flags |= 512 /* hasMarker */;
this.flags |= 1024 /* hasMarker */;
}

@@ -159,3 +143,3 @@ else {

this._customAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -167,3 +151,3 @@ return this._customAttributes;

this._plainAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -175,3 +159,3 @@ return this._plainAttributes;

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}

@@ -183,12 +167,12 @@ return this._bindings;

this._childNodes = [];
this.flags |= 8192 /* hasChildNodes */;
this.flags |= 16384 /* hasChildNodes */;
}
return this._childNodes;
}
get parts() {
if (this._parts === null) {
this._parts = [];
this.flags |= 16384 /* hasParts */;
get projections() {
if (this._projections === null) {
this._projections = [];
this.flags |= 32768 /* hasProjections */;
}
return this._parts;
return this._projections;
}

@@ -200,3 +184,3 @@ }

this.marker = marker;
this.flags = 32 /* isLetElement */ | 512 /* hasMarker */;
this.flags = 32 /* isLetElement */ | 1024 /* hasMarker */;
this.toBindingContext = false;

@@ -208,3 +192,3 @@ this._bindings = null;

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}

@@ -233,3 +217,3 @@ return this._bindings;

this._customAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -241,3 +225,3 @@ return this._customAttributes;

this._plainAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -249,3 +233,3 @@ return this._plainAttributes;

this._childNodes = [];
this.flags |= 8192 /* hasChildNodes */;
this.flags |= 16384 /* hasChildNodes */;
}

@@ -263,5 +247,5 @@ return this._childNodes;

this.marker = marker;
this.flags = 128 /* isText */ | 512 /* hasMarker */;
this.flags = 128 /* isText */ | 1024 /* hasMarker */;
}
}
//# sourceMappingURL=semantic-model.js.map

@@ -11,3 +11,3 @@ export { AttrSyntax } from './ast';

export { ResourceModel, BindableInfo, ElementInfo, AttrInfo } from './resource-model';
export { AnySymbol, BindingSymbol, CustomAttributeSymbol, CustomElementSymbol, ElementSymbol, LetElementSymbol, NodeSymbol, ParentNodeSymbol, PlainAttributeSymbol, PlainElementSymbol, ReplacePartSymbol, ResourceAttributeSymbol, SymbolFlags, SymbolWithBindings, SymbolWithMarker, SymbolWithTemplate, TemplateControllerSymbol, TextSymbol, } from './semantic-model';
export { AnySymbol, BindingSymbol, CustomAttributeSymbol, CustomElementSymbol, ElementSymbol, LetElementSymbol, NodeSymbol, ParentNodeSymbol, PlainAttributeSymbol, PlainElementSymbol, ResourceAttributeSymbol, SymbolFlags, SymbolWithBindings, SymbolWithMarker, SymbolWithTemplate, TemplateControllerSymbol, TextSymbol, ProjectionSymbol, } from './semantic-model';
//# sourceMappingURL=index.d.ts.map

@@ -6,5 +6,5 @@ import { AnyBindingExpression, IDOM, IInterpolationExpression, INode } from '@aurelia/runtime';

export declare const enum SymbolFlags {
type = 511,
type = 1023,
isTemplateController = 1,
isReplacePart = 2,
isProjection = 2,
isCustomAttribute = 4,

@@ -17,17 +17,18 @@ isPlainAttribute = 8,

isBinding = 256,
hasMarker = 512,
hasTemplate = 1024,
hasAttributes = 2048,
hasBindings = 4096,
hasChildNodes = 8192,
hasParts = 16384
isAuSlot = 512,
hasMarker = 1024,
hasTemplate = 2048,
hasAttributes = 4096,
hasBindings = 8192,
hasChildNodes = 16384,
hasProjections = 32768
}
export declare type AnySymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomAttributeSymbol | CustomElementSymbol<TText, TElement, TMarker> | LetElementSymbol<TElement, TMarker> | PlainAttributeSymbol | PlainElementSymbol<TText, TElement, TMarker> | ReplacePartSymbol<TText, TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker> | TextSymbol<TText, TMarker>);
export declare type AnySymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomAttributeSymbol | CustomElementSymbol<TText, TElement, TMarker> | LetElementSymbol<TElement, TMarker> | PlainAttributeSymbol | PlainElementSymbol<TText, TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker> | TextSymbol<TText, TMarker>);
export declare type AttributeSymbol = (CustomAttributeSymbol | PlainAttributeSymbol);
export declare type SymbolWithBindings<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomAttributeSymbol | CustomElementSymbol<TText, TElement, TMarker> | LetElementSymbol<TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker>);
export declare type ResourceAttributeSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomAttributeSymbol | TemplateControllerSymbol<TText, TElement, TMarker>);
export declare type NodeSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomElementSymbol<TText, TElement, TMarker> | LetElementSymbol<TElement, TMarker> | PlainElementSymbol<TText, TElement, TMarker> | ReplacePartSymbol<TText, TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker> | TextSymbol<TText, TMarker>);
export declare type NodeSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomElementSymbol<TText, TElement, TMarker> | LetElementSymbol<TElement, TMarker> | PlainElementSymbol<TText, TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker> | TextSymbol<TText, TMarker>);
export declare type ParentNodeSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomElementSymbol<TText, TElement, TMarker> | PlainElementSymbol<TText, TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker>);
export declare type ElementSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomElementSymbol<TText, TElement, TMarker> | PlainElementSymbol<TText, TElement, TMarker>);
export declare type SymbolWithTemplate<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (ReplacePartSymbol<TText, TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker>);
export declare type SymbolWithTemplate<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (TemplateControllerSymbol<TText, TElement, TMarker>);
export declare type SymbolWithMarker<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (CustomElementSymbol<TText, TElement, TMarker> | LetElementSymbol<TElement, TMarker> | TemplateControllerSymbol<TText, TElement, TMarker> | TextSymbol<TText, TMarker>);

@@ -42,3 +43,2 @@ /**

flags: SymbolFlags;
partName: string | null;
physicalNode: TElement | null;

@@ -50,19 +50,9 @@ template: ParentNodeSymbol<TText, TElement, TMarker> | null;

get bindings(): BindingSymbol[];
private _parts;
get parts(): ReplacePartSymbol<TText, TElement, TMarker>[];
constructor(dom: IDOM, syntax: AttrSyntax, info: AttrInfo, partName: string | null, res?: string);
constructor(dom: IDOM, syntax: AttrSyntax, info: AttrInfo, res?: string);
}
/**
* Wrapper for an element (with all of its attributes, regardless of the order in which they are declared)
* that has a replace attribute on it.
*
* This element will be lifted from the DOM just like a template controller.
*/
export declare class ReplacePartSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> {
export declare class ProjectionSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> {
name: string;
physicalNode: TElement | null;
parent: ParentNodeSymbol<TText, TElement, TMarker> | null;
template: ParentNodeSymbol<TText, TElement, TMarker> | null;
flags: SymbolFlags;
constructor(name: string, physicalNode?: TElement | null, parent?: ParentNodeSymbol<TText, TElement, TMarker> | null, template?: ParentNodeSymbol<TText, TElement, TMarker> | null);
constructor(name: string, template: ParentNodeSymbol<TText, TElement, TMarker> | null);
}

@@ -124,2 +114,3 @@ /**

marker: TMarker;
slotName: string | undefined;
private _customAttributes;

@@ -133,4 +124,4 @@ get customAttributes(): CustomAttributeSymbol[];

get childNodes(): NodeSymbol<TText, TElement, TMarker>[];
private _parts;
get parts(): ReplacePartSymbol<TText, TElement, TMarker>[];
private _projections;
get projections(): ProjectionSymbol<TText, TElement, TMarker>[];
constructor(dom: IDOM, physicalNode: TElement, info: ElementInfo, res?: string, bindables?: Record<string, BindableInfo | undefined>);

@@ -137,0 +128,0 @@ }

@@ -78,39 +78,40 @@ (function (factory) {

Token[Token["ThisScope"] = 3076] = "ThisScope";
Token[Token["ParentScope"] = 3077] = "ParentScope";
Token[Token["OpenParen"] = 671750] = "OpenParen";
Token[Token["OpenBrace"] = 131079] = "OpenBrace";
Token[Token["Dot"] = 16392] = "Dot";
Token[Token["CloseBrace"] = 1835017] = "CloseBrace";
Token[Token["CloseParen"] = 1835018] = "CloseParen";
Token[Token["Comma"] = 1572875] = "Comma";
Token[Token["OpenBracket"] = 671756] = "OpenBracket";
Token[Token["CloseBracket"] = 1835021] = "CloseBracket";
Token[Token["Colon"] = 1572878] = "Colon";
Token[Token["Question"] = 1572879] = "Question";
Token[Token["Ampersand"] = 1572880] = "Ampersand";
Token[Token["Bar"] = 1572883] = "Bar";
Token[Token["BarBar"] = 1638548] = "BarBar";
Token[Token["AmpersandAmpersand"] = 1638613] = "AmpersandAmpersand";
Token[Token["EqualsEquals"] = 1638678] = "EqualsEquals";
Token[Token["ExclamationEquals"] = 1638679] = "ExclamationEquals";
Token[Token["EqualsEqualsEquals"] = 1638680] = "EqualsEqualsEquals";
Token[Token["ExclamationEqualsEquals"] = 1638681] = "ExclamationEqualsEquals";
Token[Token["LessThan"] = 1638746] = "LessThan";
Token[Token["GreaterThan"] = 1638747] = "GreaterThan";
Token[Token["LessThanEquals"] = 1638748] = "LessThanEquals";
Token[Token["GreaterThanEquals"] = 1638749] = "GreaterThanEquals";
Token[Token["InKeyword"] = 1640798] = "InKeyword";
Token[Token["InstanceOfKeyword"] = 1640799] = "InstanceOfKeyword";
Token[Token["Plus"] = 623008] = "Plus";
Token[Token["Minus"] = 623009] = "Minus";
Token[Token["TypeofKeyword"] = 34850] = "TypeofKeyword";
Token[Token["VoidKeyword"] = 34851] = "VoidKeyword";
Token[Token["Asterisk"] = 1638884] = "Asterisk";
Token[Token["Percent"] = 1638885] = "Percent";
Token[Token["Slash"] = 1638886] = "Slash";
Token[Token["Equals"] = 1048615] = "Equals";
Token[Token["Exclamation"] = 32808] = "Exclamation";
Token[Token["TemplateTail"] = 540713] = "TemplateTail";
Token[Token["TemplateContinuation"] = 540714] = "TemplateContinuation";
Token[Token["OfKeyword"] = 1051179] = "OfKeyword";
Token[Token["HostScope"] = 3077] = "HostScope";
Token[Token["ParentScope"] = 3078] = "ParentScope";
Token[Token["OpenParen"] = 671751] = "OpenParen";
Token[Token["OpenBrace"] = 131080] = "OpenBrace";
Token[Token["Dot"] = 16393] = "Dot";
Token[Token["CloseBrace"] = 1835018] = "CloseBrace";
Token[Token["CloseParen"] = 1835019] = "CloseParen";
Token[Token["Comma"] = 1572876] = "Comma";
Token[Token["OpenBracket"] = 671757] = "OpenBracket";
Token[Token["CloseBracket"] = 1835022] = "CloseBracket";
Token[Token["Colon"] = 1572879] = "Colon";
Token[Token["Question"] = 1572880] = "Question";
Token[Token["Ampersand"] = 1572883] = "Ampersand";
Token[Token["Bar"] = 1572884] = "Bar";
Token[Token["BarBar"] = 1638549] = "BarBar";
Token[Token["AmpersandAmpersand"] = 1638614] = "AmpersandAmpersand";
Token[Token["EqualsEquals"] = 1638679] = "EqualsEquals";
Token[Token["ExclamationEquals"] = 1638680] = "ExclamationEquals";
Token[Token["EqualsEqualsEquals"] = 1638681] = "EqualsEqualsEquals";
Token[Token["ExclamationEqualsEquals"] = 1638682] = "ExclamationEqualsEquals";
Token[Token["LessThan"] = 1638747] = "LessThan";
Token[Token["GreaterThan"] = 1638748] = "GreaterThan";
Token[Token["LessThanEquals"] = 1638749] = "LessThanEquals";
Token[Token["GreaterThanEquals"] = 1638750] = "GreaterThanEquals";
Token[Token["InKeyword"] = 1640799] = "InKeyword";
Token[Token["InstanceOfKeyword"] = 1640800] = "InstanceOfKeyword";
Token[Token["Plus"] = 623009] = "Plus";
Token[Token["Minus"] = 623010] = "Minus";
Token[Token["TypeofKeyword"] = 34851] = "TypeofKeyword";
Token[Token["VoidKeyword"] = 34852] = "VoidKeyword";
Token[Token["Asterisk"] = 1638885] = "Asterisk";
Token[Token["Percent"] = 1638886] = "Percent";
Token[Token["Slash"] = 1638887] = "Slash";
Token[Token["Equals"] = 1048616] = "Equals";
Token[Token["Exclamation"] = 32809] = "Exclamation";
Token[Token["TemplateTail"] = 540714] = "TemplateTail";
Token[Token["TemplateContinuation"] = 540715] = "TemplateContinuation";
Token[Token["OfKeyword"] = 1051180] = "OfKeyword";
})(Token = exports.Token || (exports.Token = {}));

@@ -117,0 +118,0 @@ var Char;

@@ -21,2 +21,3 @@ (function (factory) {

const $this = runtime_1.AccessThisExpression.$this;
const $host = runtime_1.AccessThisExpression.$host;
const $parent = runtime_1.AccessThisExpression.$parent;

@@ -147,3 +148,3 @@ /** @internal */

primary: switch (state.currentToken) {
case 3077 /* ParentScope */: // $parent
case 3078 /* ParentScope */: // $parent
state.assignable = false;

@@ -153,4 +154,4 @@ do {

access++; // ancestor
if (consumeOpt(state, 16392 /* Dot */)) {
if (state.currentToken === 16392 /* Dot */) {
if (consumeOpt(state, 16393 /* Dot */)) {
if (state.currentToken === 16393 /* Dot */) {
throw kernel_1.Reporter.error(102 /* DoubleDot */, { state });

@@ -171,3 +172,3 @@ }

}
} while (state.currentToken === 3077 /* ParentScope */);
} while (state.currentToken === 3078 /* ParentScope */);
// falls through

@@ -191,17 +192,23 @@ case 1024 /* Identifier */: // identifier

break;
case 671750 /* OpenParen */: // parenthesized expression
case 3077 /* HostScope */: // $host
state.assignable = false;
nextToken(state);
result = $host;
access = 512 /* This */;
break;
case 671751 /* OpenParen */: // parenthesized expression
nextToken(state);
result = parse(state, 0 /* Reset */, 62 /* Assign */, bindingType);
consume(state, 1835018 /* CloseParen */);
consume(state, 1835019 /* CloseParen */);
access = 0 /* Reset */;
break;
case 671756 /* OpenBracket */:
case 671757 /* OpenBracket */:
result = parseArrayLiteralExpression(state, access, bindingType);
access = 0 /* Reset */;
break;
case 131079 /* OpenBrace */:
case 131080 /* OpenBrace */:
result = parseObjectLiteralExpression(state, bindingType);
access = 0 /* Reset */;
break;
case 540713 /* TemplateTail */:
case 540714 /* TemplateTail */:
result = new runtime_1.TemplateExpression([state.tokenValue]);

@@ -212,3 +219,3 @@ state.assignable = false;

break;
case 540714 /* TemplateContinuation */:
case 540715 /* TemplateContinuation */:
result = parseTemplate(state, access, bindingType, result, false);

@@ -278,3 +285,3 @@ access = 0 /* Reset */;

switch (state.currentToken) {
case 16392 /* Dot */:
case 16393 /* Dot */:
state.assignable = true;

@@ -289,3 +296,3 @@ nextToken(state);

access = ((access & (512 /* This */ | 1024 /* Scope */)) << 1) | (access & 2048 /* Member */) | ((access & 4096 /* Keyed */) >> 1);
if (state.currentToken === 671750 /* OpenParen */) {
if (state.currentToken === 671751 /* OpenParen */) {
if (access === 0 /* Reset */) { // if the left hand side is a literal, make sure we parse a CallMemberExpression

@@ -297,3 +304,3 @@ access = 2048 /* Member */;

if (access & 1024 /* Scope */) {
result = new runtime_1.AccessScopeExpression(name, result.ancestor);
result = new runtime_1.AccessScopeExpression(name, result.ancestor, result === $host);
}

@@ -304,3 +311,3 @@ else { // if it's not $Scope, it's $Member

continue;
case 671756 /* OpenBracket */:
case 671757 /* OpenBracket */:
state.assignable = true;

@@ -310,16 +317,16 @@ nextToken(state);

result = new runtime_1.AccessKeyedExpression(result, parse(state, 0 /* Reset */, 62 /* Assign */, bindingType));
consume(state, 1835021 /* CloseBracket */);
consume(state, 1835022 /* CloseBracket */);
break;
case 671750 /* OpenParen */:
case 671751 /* OpenParen */:
state.assignable = false;
nextToken(state);
while (state.currentToken !== 1835018 /* CloseParen */) {
while (state.currentToken !== 1835019 /* CloseParen */) {
args.push(parse(state, 0 /* Reset */, 62 /* Assign */, bindingType));
if (!consumeOpt(state, 1572875 /* Comma */)) {
if (!consumeOpt(state, 1572876 /* Comma */)) {
break;
}
}
consume(state, 1835018 /* CloseParen */);
consume(state, 1835019 /* CloseParen */);
if (access & 1024 /* Scope */) {
result = new runtime_1.CallScopeExpression(name, args, result.ancestor);
result = new runtime_1.CallScopeExpression(name, args, result.ancestor, result === $host);
}

@@ -334,3 +341,3 @@ else if (access & 2048 /* Member */) {

break;
case 540713 /* TemplateTail */:
case 540714 /* TemplateTail */:
state.assignable = false;

@@ -341,3 +348,3 @@ strings = [state.tokenValue];

break;
case 540714 /* TemplateContinuation */:
case 540715 /* TemplateContinuation */:
result = parseTemplate(state, access, bindingType, result, true);

@@ -403,5 +410,5 @@ default:

*/
if (consumeOpt(state, 1572879 /* Question */)) {
if (consumeOpt(state, 1572880 /* Question */)) {
const yes = parse(state, access, 62 /* Assign */, bindingType);
consume(state, 1572878 /* Colon */);
consume(state, 1572879 /* Colon */);
result = new runtime_1.ConditionalExpression(result, yes, parse(state, access, 62 /* Assign */, bindingType));

@@ -425,3 +432,3 @@ state.assignable = false;

*/
if (consumeOpt(state, 1048615 /* Equals */)) {
if (consumeOpt(state, 1048616 /* Equals */)) {
if (!state.assignable) {

@@ -438,3 +445,3 @@ throw kernel_1.Reporter.error(150 /* NotAssignable */, { state });

*/
while (consumeOpt(state, 1572883 /* Bar */)) {
while (consumeOpt(state, 1572884 /* Bar */)) {
if (state.currentToken === 1572864 /* EOF */) {

@@ -446,3 +453,3 @@ throw kernel_1.Reporter.error(112);

const args = new Array();
while (consumeOpt(state, 1572878 /* Colon */)) {
while (consumeOpt(state, 1572879 /* Colon */)) {
args.push(parse(state, access, 62 /* Assign */, bindingType));

@@ -454,3 +461,3 @@ }

*/
while (consumeOpt(state, 1572880 /* Ampersand */)) {
while (consumeOpt(state, 1572883 /* Ampersand */)) {
if (state.currentToken === 1572864 /* EOF */) {

@@ -462,3 +469,3 @@ throw kernel_1.Reporter.error(113);

const args = new Array();
while (consumeOpt(state, 1572878 /* Colon */)) {
while (consumeOpt(state, 1572879 /* Colon */)) {
args.push(parse(state, access, 62 /* Assign */, bindingType));

@@ -502,6 +509,6 @@ }

const elements = new Array();
while (state.currentToken !== 1835021 /* CloseBracket */) {
if (consumeOpt(state, 1572875 /* Comma */)) {
while (state.currentToken !== 1835022 /* CloseBracket */) {
if (consumeOpt(state, 1572876 /* Comma */)) {
elements.push($undefined);
if (state.currentToken === 1835021 /* CloseBracket */) {
if (state.currentToken === 1835022 /* CloseBracket */) {
break;

@@ -512,4 +519,4 @@ }

elements.push(parse(state, access, 62 /* Assign */, bindingType & ~512 /* IsIterator */));
if (consumeOpt(state, 1572875 /* Comma */)) {
if (state.currentToken === 1835021 /* CloseBracket */) {
if (consumeOpt(state, 1572876 /* Comma */)) {
if (state.currentToken === 1835022 /* CloseBracket */) {
break;

@@ -523,3 +530,3 @@ }

}
consume(state, 1835021 /* CloseBracket */);
consume(state, 1835022 /* CloseBracket */);
if (bindingType & 512 /* IsIterator */) {

@@ -537,3 +544,3 @@ return new runtime_1.ArrayBindingPattern(elements);

}
if (state.currentToken !== 1051179 /* OfKeyword */) {
if (state.currentToken !== 1051180 /* OfKeyword */) {
throw kernel_1.Reporter.error(106 /* InvalidForDeclaration */, { state });

@@ -571,3 +578,3 @@ }

nextToken(state);
while (state.currentToken !== 1835017 /* CloseBrace */) {
while (state.currentToken !== 1835018 /* CloseBrace */) {
keys.push(state.tokenValue);

@@ -577,3 +584,3 @@ // Literal = mandatory colon

nextToken(state);
consume(state, 1572878 /* Colon */);
consume(state, 1572879 /* Colon */);
values.push(parse(state, 0 /* Reset */, 62 /* Assign */, bindingType & ~512 /* IsIterator */));

@@ -585,3 +592,3 @@ }

nextToken(state);
if (consumeOpt(state, 1572878 /* Colon */)) {
if (consumeOpt(state, 1572879 /* Colon */)) {
values.push(parse(state, 0 /* Reset */, 62 /* Assign */, bindingType & ~512 /* IsIterator */));

@@ -600,7 +607,7 @@ }

}
if (state.currentToken !== 1835017 /* CloseBrace */) {
consume(state, 1572875 /* Comma */);
if (state.currentToken !== 1835018 /* CloseBrace */) {
consume(state, 1572876 /* Comma */);
}
}
consume(state, 1835017 /* CloseBrace */);
consume(state, 1835018 /* CloseBrace */);
if (bindingType & 512 /* IsIterator */) {

@@ -685,7 +692,7 @@ return new runtime_1.ObjectBindingPattern(keys, values);

// TODO: properly implement raw parts / decide whether we want this
consume(state, 540714 /* TemplateContinuation */);
consume(state, 540715 /* TemplateContinuation */);
const expressions = [parse(state, access, 62 /* Assign */, bindingType)];
while ((state.currentToken = scanTemplateTail(state)) !== 540713 /* TemplateTail */) {
while ((state.currentToken = scanTemplateTail(state)) !== 540714 /* TemplateTail */) {
cooked.push(state.tokenValue);
consume(state, 540714 /* TemplateContinuation */);
consume(state, 540715 /* TemplateContinuation */);
expressions.push(parse(state, access, 62 /* Assign */, bindingType));

@@ -810,5 +817,5 @@ }

if (tail) {
return 540713 /* TemplateTail */;
return 540714 /* TemplateTail */;
}
return 540714 /* TemplateContinuation */;
return 540715 /* TemplateContinuation */;
}

@@ -845,7 +852,7 @@ function scanTemplateTail(state) {

const TokenValues = [
$false, $true, $null, $undefined, '$this', '$parent',
$false, $true, $null, $undefined, '$this', '$host', '$parent',
'(', '{', '.', '}', ')', ',', '[', ']', ':', '?', '\'', '"',
'&', '|', '||', '&&', '==', '!=', '===', '!==', '<', '>',
'<=', '>=', 'in', 'instanceof', '+', '-', 'typeof', 'void', '*', '%', '/', '=', '!',
540713 /* TemplateTail */, 540714 /* TemplateContinuation */,
540714 /* TemplateTail */, 540715 /* TemplateContinuation */,
'of'

@@ -859,8 +866,9 @@ ];

KeywordLookup.$this = 3076 /* ThisScope */;
KeywordLookup.$parent = 3077 /* ParentScope */;
KeywordLookup.in = 1640798 /* InKeyword */;
KeywordLookup.instanceof = 1640799 /* InstanceOfKeyword */;
KeywordLookup.typeof = 34850 /* TypeofKeyword */;
KeywordLookup.void = 34851 /* VoidKeyword */;
KeywordLookup.of = 1051179 /* OfKeyword */;
KeywordLookup.$host = 3077 /* HostScope */;
KeywordLookup.$parent = 3078 /* ParentScope */;
KeywordLookup.in = 1640799 /* InKeyword */;
KeywordLookup.instanceof = 1640800 /* InstanceOfKeyword */;
KeywordLookup.typeof = 34851 /* TypeofKeyword */;
KeywordLookup.void = 34852 /* VoidKeyword */;
KeywordLookup.of = 1051180 /* OfKeyword */;
/**

@@ -940,9 +948,9 @@ * Ranges of code points in pairs of 2 (eg 0x41-0x5B, 0x61-0x7B, ...) where the second value is not inclusive (5-7 means 5 and 6)

if (nextChar(s) !== 61 /* Equals */) {
return 32808 /* Exclamation */;
return 32809 /* Exclamation */;
}
if (nextChar(s) !== 61 /* Equals */) {
return 1638679 /* ExclamationEquals */;
return 1638680 /* ExclamationEquals */;
}
nextChar(s);
return 1638681 /* ExclamationEqualsEquals */;
return 1638682 /* ExclamationEqualsEquals */;
};

@@ -952,9 +960,9 @@ // =, ==, ===

if (nextChar(s) !== 61 /* Equals */) {
return 1048615 /* Equals */;
return 1048616 /* Equals */;
}
if (nextChar(s) !== 61 /* Equals */) {
return 1638678 /* EqualsEquals */;
return 1638679 /* EqualsEquals */;
}
nextChar(s);
return 1638680 /* EqualsEqualsEquals */;
return 1638681 /* EqualsEqualsEquals */;
};

@@ -964,6 +972,6 @@ // &, &&

if (nextChar(s) !== 38 /* Ampersand */) {
return 1572880 /* Ampersand */;
return 1572883 /* Ampersand */;
}
nextChar(s);
return 1638613 /* AmpersandAmpersand */;
return 1638614 /* AmpersandAmpersand */;
};

@@ -973,6 +981,6 @@ // |, ||

if (nextChar(s) !== 124 /* Bar */) {
return 1572883 /* Bar */;
return 1572884 /* Bar */;
}
nextChar(s);
return 1638548 /* BarBar */;
return 1638549 /* BarBar */;
};

@@ -984,3 +992,3 @@ // .

}
return 16392 /* Dot */;
return 16393 /* Dot */;
};

@@ -990,6 +998,6 @@ // <, <=

if (nextChar(s) !== 61 /* Equals */) {
return 1638746 /* LessThan */;
return 1638747 /* LessThan */;
}
nextChar(s);
return 1638748 /* LessThanEquals */;
return 1638749 /* LessThanEquals */;
};

@@ -999,22 +1007,22 @@ // >, >=

if (nextChar(s) !== 61 /* Equals */) {
return 1638747 /* GreaterThan */;
return 1638748 /* GreaterThan */;
}
nextChar(s);
return 1638749 /* GreaterThanEquals */;
return 1638750 /* GreaterThanEquals */;
};
CharScanners[37 /* Percent */] = returnToken(1638885 /* Percent */);
CharScanners[40 /* OpenParen */] = returnToken(671750 /* OpenParen */);
CharScanners[41 /* CloseParen */] = returnToken(1835018 /* CloseParen */);
CharScanners[42 /* Asterisk */] = returnToken(1638884 /* Asterisk */);
CharScanners[43 /* Plus */] = returnToken(623008 /* Plus */);
CharScanners[44 /* Comma */] = returnToken(1572875 /* Comma */);
CharScanners[45 /* Minus */] = returnToken(623009 /* Minus */);
CharScanners[47 /* Slash */] = returnToken(1638886 /* Slash */);
CharScanners[58 /* Colon */] = returnToken(1572878 /* Colon */);
CharScanners[63 /* Question */] = returnToken(1572879 /* Question */);
CharScanners[91 /* OpenBracket */] = returnToken(671756 /* OpenBracket */);
CharScanners[93 /* CloseBracket */] = returnToken(1835021 /* CloseBracket */);
CharScanners[123 /* OpenBrace */] = returnToken(131079 /* OpenBrace */);
CharScanners[125 /* CloseBrace */] = returnToken(1835017 /* CloseBrace */);
CharScanners[37 /* Percent */] = returnToken(1638886 /* Percent */);
CharScanners[40 /* OpenParen */] = returnToken(671751 /* OpenParen */);
CharScanners[41 /* CloseParen */] = returnToken(1835019 /* CloseParen */);
CharScanners[42 /* Asterisk */] = returnToken(1638885 /* Asterisk */);
CharScanners[43 /* Plus */] = returnToken(623009 /* Plus */);
CharScanners[44 /* Comma */] = returnToken(1572876 /* Comma */);
CharScanners[45 /* Minus */] = returnToken(623010 /* Minus */);
CharScanners[47 /* Slash */] = returnToken(1638887 /* Slash */);
CharScanners[58 /* Colon */] = returnToken(1572879 /* Colon */);
CharScanners[63 /* Question */] = returnToken(1572880 /* Question */);
CharScanners[91 /* OpenBracket */] = returnToken(671757 /* OpenBracket */);
CharScanners[93 /* CloseBracket */] = returnToken(1835022 /* CloseBracket */);
CharScanners[123 /* OpenBrace */] = returnToken(131080 /* OpenBrace */);
CharScanners[125 /* CloseBrace */] = returnToken(1835018 /* CloseBrace */);
});
//# sourceMappingURL=expression-parser.js.map

@@ -78,7 +78,7 @@ (function (factory) {

Object.defineProperty(exports, "PlainElementSymbol", { enumerable: true, get: function () { return semantic_model_1.PlainElementSymbol; } });
Object.defineProperty(exports, "ReplacePartSymbol", { enumerable: true, get: function () { return semantic_model_1.ReplacePartSymbol; } });
Object.defineProperty(exports, "SymbolFlags", { enumerable: true, get: function () { return semantic_model_1.SymbolFlags; } });
Object.defineProperty(exports, "TemplateControllerSymbol", { enumerable: true, get: function () { return semantic_model_1.TemplateControllerSymbol; } });
Object.defineProperty(exports, "TextSymbol", { enumerable: true, get: function () { return semantic_model_1.TextSymbol; } });
Object.defineProperty(exports, "ProjectionSymbol", { enumerable: true, get: function () { return semantic_model_1.ProjectionSymbol; } });
});
//# sourceMappingURL=index.js.map

@@ -12,8 +12,8 @@ (function (factory) {

Object.defineProperty(exports, "__esModule", { value: true });
exports.TextSymbol = exports.PlainElementSymbol = exports.LetElementSymbol = exports.CustomElementSymbol = exports.BindingSymbol = exports.PlainAttributeSymbol = exports.CustomAttributeSymbol = exports.ReplacePartSymbol = exports.TemplateControllerSymbol = exports.SymbolFlags = void 0;
exports.TextSymbol = exports.PlainElementSymbol = exports.LetElementSymbol = exports.CustomElementSymbol = exports.BindingSymbol = exports.PlainAttributeSymbol = exports.CustomAttributeSymbol = exports.ProjectionSymbol = exports.TemplateControllerSymbol = exports.SymbolFlags = void 0;
var SymbolFlags;
(function (SymbolFlags) {
SymbolFlags[SymbolFlags["type"] = 511] = "type";
SymbolFlags[SymbolFlags["type"] = 1023] = "type";
SymbolFlags[SymbolFlags["isTemplateController"] = 1] = "isTemplateController";
SymbolFlags[SymbolFlags["isReplacePart"] = 2] = "isReplacePart";
SymbolFlags[SymbolFlags["isProjection"] = 2] = "isProjection";
SymbolFlags[SymbolFlags["isCustomAttribute"] = 4] = "isCustomAttribute";

@@ -26,8 +26,9 @@ SymbolFlags[SymbolFlags["isPlainAttribute"] = 8] = "isPlainAttribute";

SymbolFlags[SymbolFlags["isBinding"] = 256] = "isBinding";
SymbolFlags[SymbolFlags["hasMarker"] = 512] = "hasMarker";
SymbolFlags[SymbolFlags["hasTemplate"] = 1024] = "hasTemplate";
SymbolFlags[SymbolFlags["hasAttributes"] = 2048] = "hasAttributes";
SymbolFlags[SymbolFlags["hasBindings"] = 4096] = "hasBindings";
SymbolFlags[SymbolFlags["hasChildNodes"] = 8192] = "hasChildNodes";
SymbolFlags[SymbolFlags["hasParts"] = 16384] = "hasParts";
SymbolFlags[SymbolFlags["isAuSlot"] = 512] = "isAuSlot";
SymbolFlags[SymbolFlags["hasMarker"] = 1024] = "hasMarker";
SymbolFlags[SymbolFlags["hasTemplate"] = 2048] = "hasTemplate";
SymbolFlags[SymbolFlags["hasAttributes"] = 4096] = "hasAttributes";
SymbolFlags[SymbolFlags["hasBindings"] = 8192] = "hasBindings";
SymbolFlags[SymbolFlags["hasChildNodes"] = 16384] = "hasChildNodes";
SymbolFlags[SymbolFlags["hasProjections"] = 32768] = "hasProjections";
})(SymbolFlags = exports.SymbolFlags || (exports.SymbolFlags = {}));

@@ -43,7 +44,7 @@ function createMarker(dom) {

class TemplateControllerSymbol {
constructor(dom, syntax, info, partName, res = info.name) {
constructor(dom, syntax, info, res = info.name) {
this.syntax = syntax;
this.info = info;
this.res = res;
this.flags = 1 /* isTemplateController */ | 512 /* hasMarker */;
this.flags = 1 /* isTemplateController */ | 1024 /* hasMarker */;
this.physicalNode = null;

@@ -53,4 +54,2 @@ this.template = null;

this._bindings = null;
this._parts = null;
this.partName = info.name === 'replaceable' ? partName : null;
this.marker = createMarker(dom);

@@ -61,31 +60,16 @@ }

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}
return this._bindings;
}
get parts() {
if (this._parts === null) {
this._parts = [];
this.flags |= 16384 /* hasParts */;
}
return this._parts;
}
}
exports.TemplateControllerSymbol = TemplateControllerSymbol;
/**
* Wrapper for an element (with all of its attributes, regardless of the order in which they are declared)
* that has a replace attribute on it.
*
* This element will be lifted from the DOM just like a template controller.
*/
class ReplacePartSymbol {
constructor(name, physicalNode = null, parent = null, template = null) {
class ProjectionSymbol {
constructor(name, template) {
this.name = name;
this.physicalNode = physicalNode;
this.parent = parent;
this.template = template;
this.flags = 2 /* isReplacePart */;
this.flags = 2 /* isProjection */;
}
}
exports.ReplacePartSymbol = ReplacePartSymbol;
exports.ProjectionSymbol = ProjectionSymbol;
/**

@@ -105,3 +89,3 @@ * A html attribute that is associated with a registered resource, but not a template controller.

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}

@@ -162,7 +146,7 @@ return this._bindings;

this._childNodes = null;
this._parts = null;
this._projections = null;
if (info.containerless) {
this.isContainerless = true;
this.marker = createMarker(dom);
this.flags |= 512 /* hasMarker */;
this.flags |= 1024 /* hasMarker */;
}

@@ -177,3 +161,3 @@ else {

this._customAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -185,3 +169,3 @@ return this._customAttributes;

this._plainAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -193,3 +177,3 @@ return this._plainAttributes;

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}

@@ -201,12 +185,12 @@ return this._bindings;

this._childNodes = [];
this.flags |= 8192 /* hasChildNodes */;
this.flags |= 16384 /* hasChildNodes */;
}
return this._childNodes;
}
get parts() {
if (this._parts === null) {
this._parts = [];
this.flags |= 16384 /* hasParts */;
get projections() {
if (this._projections === null) {
this._projections = [];
this.flags |= 32768 /* hasProjections */;
}
return this._parts;
return this._projections;
}

@@ -219,3 +203,3 @@ }

this.marker = marker;
this.flags = 32 /* isLetElement */ | 512 /* hasMarker */;
this.flags = 32 /* isLetElement */ | 1024 /* hasMarker */;
this.toBindingContext = false;

@@ -227,3 +211,3 @@ this._bindings = null;

this._bindings = [];
this.flags |= 4096 /* hasBindings */;
this.flags |= 8192 /* hasBindings */;
}

@@ -253,3 +237,3 @@ return this._bindings;

this._customAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -261,3 +245,3 @@ return this._customAttributes;

this._plainAttributes = [];
this.flags |= 2048 /* hasAttributes */;
this.flags |= 4096 /* hasAttributes */;
}

@@ -269,3 +253,3 @@ return this._plainAttributes;

this._childNodes = [];
this.flags |= 8192 /* hasChildNodes */;
this.flags |= 16384 /* hasChildNodes */;
}

@@ -284,3 +268,3 @@ return this._childNodes;

this.marker = marker;
this.flags = 128 /* isText */ | 512 /* hasMarker */;
this.flags = 128 /* isText */ | 1024 /* hasMarker */;
}

@@ -287,0 +271,0 @@ }

{
"name": "@aurelia/jit",
"version": "0.8.0-dev.202010031322",
"version": "0.8.0-dev.202010031518",
"main": "dist/umd/index.js",

@@ -31,3 +31,3 @@ "module": "dist/esnext/index.js",

"build": "tsc -b",
"dev": "tsc -b -w"
"dev": "tsc -b -w --preserveWatchOutput"
},

@@ -38,6 +38,6 @@ "publishConfig": {

"dependencies": {
"@aurelia/kernel": "^0.8.0-dev.202010031322",
"@aurelia/metadata": "^0.8.0-dev.202010031322",
"@aurelia/runtime": "^0.8.0-dev.202010031322",
"@aurelia/scheduler": "^0.8.0-dev.202010031322"
"@aurelia/kernel": "^0.8.0-dev.202010031518",
"@aurelia/metadata": "^0.8.0-dev.202010031518",
"@aurelia/runtime": "^0.8.0-dev.202010031518",
"@aurelia/scheduler": "^0.8.0-dev.202010031518"
},

@@ -47,3 +47,3 @@ "devDependencies": {

},
"gitHead": "1e3894bc1ef0353a02072cf41c902ac3b6eb6628"
"gitHead": "78689e3dd5e58f39dbb4d450cc87d723f2c763bd"
}

@@ -64,39 +64,40 @@ export function unescapeCode(code: number): number {

ThisScope = 0b000000000110_000_000100,
ParentScope = 0b000000000110_000_000101,
OpenParen = 0b010100100000_000_000110,
OpenBrace = 0b000100000000_000_000111,
Dot = 0b000000100000_000_001000,
CloseBrace = 0b111000000000_000_001001,
CloseParen = 0b111000000000_000_001010,
Comma = 0b110000000000_000_001011,
OpenBracket = 0b010100100000_000_001100,
CloseBracket = 0b111000000000_000_001101,
Colon = 0b110000000000_000_001110,
Question = 0b110000000000_000_001111,
Ampersand = 0b110000000000_000_010000,
Bar = 0b110000000000_000_010011,
BarBar = 0b110010000000_010_010100,
AmpersandAmpersand = 0b110010000000_011_010101,
EqualsEquals = 0b110010000000_100_010110,
ExclamationEquals = 0b110010000000_100_010111,
EqualsEqualsEquals = 0b110010000000_100_011000,
ExclamationEqualsEquals = 0b110010000000_100_011001,
LessThan = 0b110010000000_101_011010,
GreaterThan = 0b110010000000_101_011011,
LessThanEquals = 0b110010000000_101_011100,
GreaterThanEquals = 0b110010000000_101_011101,
InKeyword = 0b110010000100_101_011110,
InstanceOfKeyword = 0b110010000100_101_011111,
Plus = 0b010011000000_110_100000,
Minus = 0b010011000000_110_100001,
TypeofKeyword = 0b000001000100_000_100010,
VoidKeyword = 0b000001000100_000_100011,
Asterisk = 0b110010000000_111_100100,
Percent = 0b110010000000_111_100101,
Slash = 0b110010000000_111_100110,
Equals = 0b100000000000_000_100111,
Exclamation = 0b000001000000_000_101000,
TemplateTail = 0b010000100000_000_101001,
TemplateContinuation = 0b010000100000_000_101010,
OfKeyword = 0b100000000101_000_101011
HostScope = 0b000000000110_000_000101,
ParentScope = 0b000000000110_000_000110,
OpenParen = 0b010100100000_000_000111,
OpenBrace = 0b000100000000_000_001000,
Dot = 0b000000100000_000_001001,
CloseBrace = 0b111000000000_000_001010,
CloseParen = 0b111000000000_000_001011,
Comma = 0b110000000000_000_001100,
OpenBracket = 0b010100100000_000_001101,
CloseBracket = 0b111000000000_000_001110,
Colon = 0b110000000000_000_001111,
Question = 0b110000000000_000_010000,
Ampersand = 0b110000000000_000_010011,
Bar = 0b110000000000_000_010100,
BarBar = 0b110010000000_010_010101,
AmpersandAmpersand = 0b110010000000_011_010110,
EqualsEquals = 0b110010000000_100_010111,
ExclamationEquals = 0b110010000000_100_011000,
EqualsEqualsEquals = 0b110010000000_100_011001,
ExclamationEqualsEquals = 0b110010000000_100_011010,
LessThan = 0b110010000000_101_011011,
GreaterThan = 0b110010000000_101_011100,
LessThanEquals = 0b110010000000_101_011101,
GreaterThanEquals = 0b110010000000_101_011110,
InKeyword = 0b110010000100_101_011111,
InstanceOfKeyword = 0b110010000100_101_100000,
Plus = 0b010011000000_110_100001,
Minus = 0b010011000000_110_100010,
TypeofKeyword = 0b000001000100_000_100011,
VoidKeyword = 0b000001000100_000_100100,
Asterisk = 0b110010000000_111_100101,
Percent = 0b110010000000_111_100110,
Slash = 0b110010000000_111_100111,
Equals = 0b100000000000_000_101000,
Exclamation = 0b000001000000_000_101001,
TemplateTail = 0b010000100000_000_101010,
TemplateContinuation = 0b010000100000_000_101011,
OfKeyword = 0b100000000101_000_101100
}

@@ -103,0 +104,0 @@

@@ -53,2 +53,3 @@ import { Profiler, Reporter } from '@aurelia/kernel';

const $this = AccessThisExpression.$this;
const $host = AccessThisExpression.$host;
const $parent = AccessThisExpression.$parent;

@@ -245,2 +246,8 @@

break;
case Token.HostScope: // $host
state.assignable = false;
nextToken(state);
result = $host;
access = Access.This;
break;
case Token.OpenParen: // parenthesized expression

@@ -349,3 +356,3 @@ nextToken(state);

if (access & Access.Scope) {
result = new AccessScopeExpression(name, (result as AccessScopeExpression | AccessThisExpression).ancestor);
result = new AccessScopeExpression(name, (result as AccessScopeExpression | AccessThisExpression).ancestor, result === $host);
} else { // if it's not $Scope, it's $Member

@@ -373,3 +380,3 @@ result = new AccessMemberExpression(result as IsLeftHandSide, name);

if (access & Access.Scope) {
result = new CallScopeExpression(name, args, (result as AccessScopeExpression | AccessThisExpression).ancestor);
result = new CallScopeExpression(name, args, (result as AccessScopeExpression | AccessThisExpression).ancestor, result === $host);
} else if (access & Access.Member) {

@@ -892,3 +899,3 @@ result = new CallMemberExpression(result as IsLeftHandSide, name, args);

const TokenValues = [
$false, $true, $null, $undefined, '$this', '$parent',
$false, $true, $null, $undefined, '$this', '$host', '$parent',

@@ -911,2 +918,3 @@ '(', '{', '.', '}', ')', ',', '[', ']', ':', '?', '\'', '"',

KeywordLookup.$this = Token.ThisScope;
KeywordLookup.$host = Token.HostScope;
KeywordLookup.$parent = Token.ParentScope;

@@ -913,0 +921,0 @@ KeywordLookup.in = Token.InKeyword;

@@ -94,3 +94,2 @@ export {

PlainElementSymbol,
ReplacePartSymbol,
ResourceAttributeSymbol,

@@ -103,2 +102,3 @@ SymbolFlags,

TextSymbol,
ProjectionSymbol,
} from './semantic-model';

@@ -7,18 +7,19 @@ import { AnyBindingExpression, IDOM, IInterpolationExpression, INode } from '@aurelia/runtime';

export const enum SymbolFlags {
type = 0b000000_111111111,
isTemplateController = 0b000000_000000001,
isReplacePart = 0b000000_000000010,
isCustomAttribute = 0b000000_000000100,
isPlainAttribute = 0b000000_000001000,
isCustomElement = 0b000000_000010000,
isLetElement = 0b000000_000100000,
isPlainElement = 0b000000_001000000,
isText = 0b000000_010000000,
isBinding = 0b000000_100000000,
hasMarker = 0b000001_000000000,
hasTemplate = 0b000010_000000000,
hasAttributes = 0b000100_000000000,
hasBindings = 0b001000_000000000,
hasChildNodes = 0b010000_000000000,
hasParts = 0b100000_000000000,
type = 0b000000_1111111111,
isTemplateController = 0b000000_0000000001,
isProjection = 0b000000_0000000010,
isCustomAttribute = 0b000000_0000000100,
isPlainAttribute = 0b000000_0000001000,
isCustomElement = 0b000000_0000010000,
isLetElement = 0b000000_0000100000,
isPlainElement = 0b000000_0001000000,
isText = 0b000000_0010000000,
isBinding = 0b000000_0100000000,
isAuSlot = 0b000000_1000000000,
hasMarker = 0b000001_0000000000,
hasTemplate = 0b000010_0000000000,
hasAttributes = 0b000100_0000000000,
hasBindings = 0b001000_0000000000,
hasChildNodes = 0b010000_0000000000,
hasProjections = 0b100000_0000000000,
}

@@ -38,3 +39,2 @@

PlainElementSymbol<TText, TElement, TMarker> |
ReplacePartSymbol<TText, TElement, TMarker> |
TemplateControllerSymbol<TText, TElement, TMarker> |

@@ -65,3 +65,2 @@ TextSymbol<TText, TMarker>

PlainElementSymbol<TText, TElement, TMarker> |
ReplacePartSymbol<TText, TElement, TMarker> |
TemplateControllerSymbol<TText, TElement, TMarker> |

@@ -83,3 +82,2 @@ TextSymbol<TText, TMarker>

export type SymbolWithTemplate<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> = (
ReplacePartSymbol<TText, TElement, TMarker> |
TemplateControllerSymbol<TText, TElement, TMarker>

@@ -100,3 +98,2 @@ );

public flags: SymbolFlags = SymbolFlags.isTemplateController | SymbolFlags.hasMarker;
public partName: string | null;
public physicalNode: TElement | null = null;

@@ -116,11 +113,2 @@ public template: ParentNodeSymbol<TText, TElement, TMarker> | null = null;

private _parts: ReplacePartSymbol<TText, TElement, TMarker>[] | null = null;
public get parts(): ReplacePartSymbol<TText, TElement, TMarker>[] {
if (this._parts === null) {
this._parts = [];
this.flags |= SymbolFlags.hasParts;
}
return this._parts;
}
public constructor(

@@ -130,6 +118,4 @@ dom: IDOM,

public info: AttrInfo,
partName: string | null,
public res: string = info.name,
) {
this.partName = info.name === 'replaceable' ? partName : null;
this.marker = createMarker(dom);

@@ -139,16 +125,8 @@ }

/**
* Wrapper for an element (with all of its attributes, regardless of the order in which they are declared)
* that has a replace attribute on it.
*
* This element will be lifted from the DOM just like a template controller.
*/
export class ReplacePartSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> {
public flags: SymbolFlags = SymbolFlags.isReplacePart;
export class ProjectionSymbol<TText extends INode = INode, TElement extends INode = INode, TMarker extends INode = INode> {
public flags: SymbolFlags = SymbolFlags.isProjection;
public constructor(
public name: string,
public physicalNode: TElement | null = null,
public parent: ParentNodeSymbol<TText, TElement, TMarker> | null = null,
public template: ParentNodeSymbol<TText, TElement, TMarker> | null = null,
public template: ParentNodeSymbol<TText, TElement, TMarker> | null,
) {}

@@ -224,2 +202,3 @@ }

public marker: TMarker;
public slotName: string | undefined;

@@ -262,9 +241,9 @@ private _customAttributes: CustomAttributeSymbol[] | null = null;

private _parts: ReplacePartSymbol<TText, TElement, TMarker>[] | null = null;
public get parts(): ReplacePartSymbol<TText, TElement, TMarker>[] {
if (this._parts === null) {
this._parts = [];
this.flags |= SymbolFlags.hasParts;
private _projections: ProjectionSymbol<TText, TElement, TMarker>[] | null = null;
public get projections(): ProjectionSymbol<TText, TElement, TMarker>[] {
if (this._projections === null) {
this._projections = [];
this.flags |= SymbolFlags.hasProjections;
}
return this._parts;
return this._projections;
}

@@ -271,0 +250,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc