(n: Node)
| 81 | } |
| 82 | |
| 83 | function* formatAttributes(n: Node) { |
| 84 | for (const [key, value] of Object.entries(n.attributes)) { |
| 85 | /** |
| 86 | * In cases where the class attribute is not a valid identifer, we treat it as a |
| 87 | * regular attribute without the '.' sigil |
| 88 | */ |
| 89 | if (key === 'class' && typeof value === 'object' && !Ast.isAst(value)) |
| 90 | for (const name of Object.keys(value)) { |
| 91 | yield formatAnnotationValue({ type: 'class', name, value }); |
| 92 | } |
| 93 | else yield formatAnnotationValue({ type: 'attribute', name: key, value }); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | function* formatAnnotations(n: Node) { |
| 98 | if (n.annotations.length) { |
no test coverage detected
searching dependent graphs…