(ast: any, env: TransformerEnv)
| 750 | } |
| 751 | |
| 752 | function transformAstro(ast: any, env: TransformerEnv) { |
| 753 | let { matcher } = env |
| 754 | |
| 755 | if (ast.type === 'element' || ast.type === 'custom-element' || ast.type === 'component') { |
| 756 | for (let attr of ast.attributes ?? []) { |
| 757 | if (matcher.hasStaticAttr(attr.name) && attr.type === 'attribute' && attr.kind === 'quoted') { |
| 758 | attr.value = sortClasses(attr.value, { |
| 759 | env, |
| 760 | }) |
| 761 | } else if ( |
| 762 | matcher.hasDynamicAttr(attr.name) && |
| 763 | attr.type === 'attribute' && |
| 764 | attr.kind === 'expression' && |
| 765 | typeof attr.value === 'string' |
| 766 | ) { |
| 767 | transformDynamicJsAttribute(attr, env) |
| 768 | } |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | for (let child of ast.children ?? []) { |
| 773 | transformAstro(child, env) |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | function transformMarko(ast: any, env: TransformerEnv) { |
| 778 | let { matcher } = env |
nothing calls this directly
no test coverage detected
searching dependent graphs…