(ast: html.Block, visitor: html.Visitor)
| 253 | } |
| 254 | |
| 255 | function parseErrorBlock(ast: html.Block, visitor: html.Visitor): t.DeferredBlockError { |
| 256 | if (ast.parameters.length > 0) { |
| 257 | throw new Error(`@error block cannot have parameters`); |
| 258 | } |
| 259 | |
| 260 | return new t.DeferredBlockError( |
| 261 | html.visitAll(visitor, ast.children, ast.children), |
| 262 | ast.nameSpan, |
| 263 | ast.sourceSpan, |
| 264 | ast.startSourceSpan, |
| 265 | ast.endSourceSpan, |
| 266 | ast.i18n, |
| 267 | ); |
| 268 | } |
| 269 | |
| 270 | function parsePrimaryTriggers( |
| 271 | ast: html.Block, |
no test coverage detected