convertHostAttributeToBinding function
Binding
convertHostAttributeToBinding(
- String name,
- ASTWithSource value,
- CompileDirectiveMetadata compileDirectiveMetadata
Converts a host attribute to an ir.Binding instance.
Currently host attributes are represented as a map from name
to value
.
Implementation
// TODO(b/130184376): Create a better HostAttribute representation.
ir.Binding convertHostAttributeToBinding(
String name,
expression_ast.ASTWithSource value,
CompileDirectiveMetadata compileDirectiveMetadata) =>
ir.Binding(
source: ir.BoundExpression(value, null, compileDirectiveMetadata),
target: _attributeName(name));