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