@inheritdoc
(node: Comment)
| 97 | |
| 98 | /** @inheritdoc */ |
| 99 | public override comment(node: Comment): void { |
| 100 | const placeholderPattern = new RegExp(`^${placeholderText}:\\d+$`); |
| 101 | if (placeholderPattern.test(node.text)) { |
| 102 | const [, expressionIndexString] = node.text.split(':'); |
| 103 | const expressionIndex = Number(expressionIndexString); |
| 104 | const root = node.root(); |
| 105 | const expressionStrings = root.raws.linariaTemplateExpressions; |
| 106 | |
| 107 | if (expressionStrings && !Number.isNaN(expressionIndex)) { |
| 108 | const expression = expressionStrings[expressionIndex]; |
| 109 | |
| 110 | if (expression) { |
| 111 | this.builder(expression, node); |
| 112 | return; |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | super.comment(node); |
| 118 | } |
| 119 | |
| 120 | public override decl(node: Declaration, semicolon: boolean): void { |
| 121 | const between = this.raw(node, 'between', 'colon'); |