(context, func)
| 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 | /* |
no test coverage detected