()
| 277 | } |
| 278 | |
| 279 | private _getBlockName(): string { |
| 280 | // This allows us to capture up something like `@else if`, but not `@ if`. |
| 281 | let spacesInNameAllowed = false; |
| 282 | const nameCursor = this._cursor.clone(); |
| 283 | |
| 284 | this._attemptCharCodeUntilFn((code) => { |
| 285 | if (chars.isWhitespace(code)) { |
| 286 | return !spacesInNameAllowed; |
| 287 | } |
| 288 | if (isBlockNameChar(code)) { |
| 289 | spacesInNameAllowed = true; |
| 290 | return false; |
| 291 | } |
| 292 | return true; |
| 293 | }); |
| 294 | return this._cursor.getChars(nameCursor).trim(); |
| 295 | } |
| 296 | |
| 297 | private _consumeBlockStart(start: CharacterCursor) { |
| 298 | this._requireCharCode(chars.$AT); |
no test coverage detected