generate method

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

Implementation

generate([builder, output]) {
  var previousContext = builder.getContext();

  Map _context = {};
  _context.addAll(builder.context);
  _context.addAll(this.context);

  builder.setContext(_context);

  var snippet = this.node.build(builder, output);

  builder.setContext(previousContext);

  return snippet;
}