convertToBinding function

Binding convertToBinding(
  1. TemplateAst node, {
  2. CompileDirectiveMetadata? directive,
  3. CompileDirectiveMetadata? compileDirectiveMetadata,
  4. CompileElement? compileElement,
})

Converts a single ast.TemplateAst node into an ir.Binding instance.

Implementation

ir.Binding convertToBinding(
  ast.TemplateAst node, {
  CompileDirectiveMetadata? directive,
  CompileDirectiveMetadata? compileDirectiveMetadata,
  CompileElement? compileElement,
}) =>
    node.visit(
      _ToBindingVisitor(),
      _IrBindingContext(compileDirectiveMetadata, directive, compileElement),
    );