generate method

dynamic generate([
  1. dynamic builder,
  2. dynamic output
])

Implementation

generate([builder, output]) {
  var type = builder.getVectorType(this.getNodeType(builder));
  var node = this.node;
  var name = this.name;

  var snippet = node.build(builder, type);

  var nodeVar = builder.getVarFromNode(this, type);

  if (name != null) {
    nodeVar.name = name;
  }

  var propertyName = builder.getPropertyName(nodeVar);

  builder.addFlowCode("${propertyName} = ${snippet}");

  return propertyName;
}