convertElement function
Element
convertElement(
- ElementAst elementAst,
- CompileElement compileElement,
- CompileDirectiveMetadata? compileDirectiveMetadata
Implementation
ir.Element convertElement(
ast.ElementAst elementAst,
CompileElement compileElement,
CompileDirectiveMetadata? compileDirectiveMetadata,
) {
var inputs = convertAllToBinding(
elementAst.inputs,
compileDirectiveMetadata: compileDirectiveMetadata,
compileElement: compileElement,
);
var outputs = convertAllToBinding(
elementAst.outputs,
compileDirectiveMetadata: compileDirectiveMetadata,
compileElement: compileElement,
);
outputs = mergeEvents(outputs);
var directives = convertMatchedDirectives(
elementAst.directives,
compileElement,
compileDirectiveMetadata!,
);
directives = directives.map(optimizeLifecycles).toList();
return ir.Element(
compileElement, inputs, outputs, directives, elementAst.children, []);
}