MCPcopy Create free account
hub / github.com/aurelia/binding / parseTemplate

Method parseTemplate

src/parser.js:325–346  ·  view source on GitHub ↗
(context, func)

Source from the content-addressed store, hash-verified

323 }
324
325 parseTemplate(context, func) {
326 const cooked = [this.val];
327 const raw = context & C$Tagged ? [this.raw] : undefined;
328 this.expect(T$TemplateContinuation);
329 const expressions = [this.parseExpression()];
330
331 while ((this.tkn = this.scanTemplateTail()) !== T$TemplateTail) {
332 cooked.push(this.val);
333 if (context & C$Tagged) {
334 raw.push(this.raw);
335 }
336 this.expect(T$TemplateContinuation);
337 expressions.push(this.parseExpression());
338 }
339
340 cooked.push(this.val);
341 if (context & C$Tagged) {
342 raw.push(this.raw);
343 }
344 this.nextToken();
345 return new LiteralTemplate(cooked, expressions, raw, func);
346 }
347
348 nextToken() {
349 /*

Callers 1

parseLeftHandSideMethod · 0.95

Calls 4

expectMethod · 0.95
parseExpressionMethod · 0.95
scanTemplateTailMethod · 0.95
nextTokenMethod · 0.95

Tested by

no test coverage detected