()
| 1088 | } |
| 1089 | |
| 1090 | private _consumeAttributeValue() { |
| 1091 | if (this._cursor.peek() === chars.$SQ || this._cursor.peek() === chars.$DQ) { |
| 1092 | const quoteChar = this._cursor.peek(); |
| 1093 | this._consumeQuote(quoteChar); |
| 1094 | // In an attribute then end of the attribute value and the premature end to an interpolation |
| 1095 | // are both triggered by the `quoteChar`. |
| 1096 | const endPredicate = () => this._cursor.peek() === quoteChar; |
| 1097 | this._consumeWithInterpolation( |
| 1098 | TokenType.ATTR_VALUE_TEXT, |
| 1099 | TokenType.ATTR_VALUE_INTERPOLATION, |
| 1100 | endPredicate, |
| 1101 | endPredicate, |
| 1102 | ); |
| 1103 | this._consumeQuote(quoteChar); |
| 1104 | } else { |
| 1105 | const endPredicate = () => isNameEnd(this._cursor.peek()); |
| 1106 | this._consumeWithInterpolation( |
| 1107 | TokenType.ATTR_VALUE_TEXT, |
| 1108 | TokenType.ATTR_VALUE_INTERPOLATION, |
| 1109 | endPredicate, |
| 1110 | endPredicate, |
| 1111 | ); |
| 1112 | } |
| 1113 | } |
| 1114 | |
| 1115 | private _consumeQuote(quoteChar: number) { |
| 1116 | this._beginToken(TokenType.ATTR_QUOTE); |
no test coverage detected