@aurelia/jit
Advanced tools
Comparing version 0.3.0-dev.20181024 to 0.3.0-dev.20181025
{ | ||
"name": "@aurelia/jit", | ||
"version": "0.3.0-dev.20181024", | ||
"version": "0.3.0-dev.20181025", | ||
"main": "dist/index.umd.js", | ||
@@ -46,4 +46,4 @@ "module": "dist/index.es6.js", | ||
"dependencies": { | ||
"@aurelia/kernel": "^0.3.0-dev.20181024", | ||
"@aurelia/runtime": "^0.3.0-dev.20181024" | ||
"@aurelia/kernel": "^0.3.0-dev.20181025", | ||
"@aurelia/runtime": "^0.3.0-dev.20181025" | ||
}, | ||
@@ -84,3 +84,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "f0ac6e33033eec98e3769671dc9c6dd50bd869a3" | ||
"gitHead": "acf6a8f8feb6a3d128572a56f03e8099788beb99" | ||
} |
@@ -113,3 +113,3 @@ // tslint:disable:no-non-null-assertion | ||
if (state.index === 0) { | ||
if ((bindingType & BindingType.Interpolation) > 0) { | ||
if (bindingType & BindingType.Interpolation) { | ||
// tslint:disable-next-line:no-any | ||
@@ -119,3 +119,3 @@ return parseInterpolation(state) as any; | ||
nextToken(state); | ||
if ((state.currentToken & Token.ExpressionTerminal) > 0) { | ||
if (state.currentToken & Token.ExpressionTerminal) { | ||
throw Reporter.error(SyntaxError.InvalidExpressionStart, { state }); | ||
@@ -128,3 +128,3 @@ } | ||
if ((state.currentToken & Token.UnaryOp) > 0) { | ||
if (state.currentToken & Token.UnaryOp) { | ||
/** parseUnaryExpression | ||
@@ -190,3 +190,3 @@ * https://tc39.github.io/ecma262/#sec-unary-operators | ||
continue; | ||
} else if ((state.currentToken & Token.AccessScopeTerminal) > 0) { | ||
} else if (state.currentToken & Token.AccessScopeTerminal) { | ||
const ancestor = access & Access.Ancestor; | ||
@@ -202,3 +202,3 @@ result = ancestor === 0 ? $this : ancestor === 1 ? $parent : new AccessThis(ancestor); | ||
case Token.Identifier: // identifier | ||
if ((bindingType & BindingType.IsIterator) > 0) { | ||
if (bindingType & BindingType.IsIterator) { | ||
result = new BindingIdentifier(<string>state.tokenValue); | ||
@@ -266,3 +266,3 @@ } else { | ||
if ((bindingType & BindingType.IsIterator) > 0) { | ||
if (bindingType & BindingType.IsIterator) { | ||
// tslint:disable-next-line:no-any | ||
@@ -317,3 +317,3 @@ return parseForOfStatement(state, result as BindingIdentifierOrPattern) as any; | ||
} | ||
if ((access & Access.Scope) > 0) { | ||
if (access & Access.Scope) { | ||
result = new AccessScope(name, (result as AccessScope | AccessThis).ancestor); | ||
@@ -342,5 +342,5 @@ } else { // if it's not $Scope, it's $Member | ||
consume(state, Token.CloseParen); | ||
if ((access & Access.Scope) > 0) { | ||
if (access & Access.Scope) { | ||
result = new CallScope(name, args, (result as AccessScope | AccessThis).ancestor); | ||
} else if ((access & Access.Member) > 0) { | ||
} else if (access & Access.Member) { | ||
result = new CallMember(result as IsLeftHandSide, name, args); | ||
@@ -478,3 +478,3 @@ } else { | ||
if (state.currentToken !== Token.EOF) { | ||
if ((bindingType & BindingType.Interpolation) > 0) { | ||
if (bindingType & BindingType.Interpolation) { | ||
// tslint:disable-next-line:no-any | ||
@@ -532,3 +532,3 @@ return result as any; | ||
consume(state, Token.CloseBracket); | ||
if ((bindingType & BindingType.IsIterator) > 0) { | ||
if (bindingType & BindingType.IsIterator) { | ||
return new ArrayBindingPattern(elements); | ||
@@ -582,7 +582,7 @@ } else { | ||
// Literal = mandatory colon | ||
if ((state.currentToken & Token.StringOrNumericLiteral) > 0) { | ||
if (state.currentToken & Token.StringOrNumericLiteral) { | ||
nextToken(state); | ||
consume(state, Token.Colon); | ||
values.push(parse(state, Access.Reset, Precedence.Assign, bindingType & ~BindingType.IsIterator)); | ||
} else if ((state.currentToken & Token.IdentifierName) > 0) { | ||
} else if (state.currentToken & Token.IdentifierName) { | ||
// IdentifierName = optional colon | ||
@@ -608,3 +608,3 @@ const { currentChar, currentToken, index } = state; | ||
consume(state, Token.CloseBrace); | ||
if ((bindingType & BindingType.IsIterator) > 0) { | ||
if (bindingType & BindingType.IsIterator) { | ||
return new ObjectBindingPattern(keys, values); | ||
@@ -611,0 +611,0 @@ } else { |
@@ -462,3 +462,3 @@ import { Immutable, IServiceLocator, PLATFORM } from '@aurelia/kernel'; | ||
public lift(instruction: HydrateTemplateController): ElementSymbol { | ||
const template = instruction.def.template = DOM.createTemplate() as HTMLTemplateElement; | ||
const template = instruction.def.template = DOM.createElement('template') as HTMLTemplateElement; | ||
const node = this.node as HTMLTemplateElement; | ||
@@ -487,3 +487,7 @@ if (this.isTemplate) { | ||
public addInstructions(instructions: TargetedInstruction[]): void { | ||
this.$root.definition.instructions.push(instructions); | ||
const def = this.$root.definition; | ||
if (def.instructions === PLATFORM.emptyArray) { | ||
def.instructions = []; | ||
} | ||
def.instructions.push(instructions); | ||
} | ||
@@ -490,0 +494,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
664078
7310