createCallPipeExpression static method

Expression createCallPipeExpression(
  1. CompileView view,
  2. String name,
  3. Expression input,
  4. List<Expression> args,
)

Implementation

static o.Expression createCallPipeExpression(
  CompileView view,
  String name,
  o.Expression input,
  List<o.Expression> args,
) {
  final compView = view.componentView;
  final meta = _findPipeMeta(compView, name);
  CompilePipe? pipe;
  if (meta.pure!) {
    // pure pipes live on the component view
    pipe = compView.purePipes[name];
    if (pipe == null) {
      pipe = CompilePipe(compView, meta);
      compView.purePipes[name] = pipe;
      compView.pipes.add(pipe);
    }
  } else {
    // Non pure pipes live on the view that called it
    pipe = CompilePipe(view, meta);
    view.pipes.add(pipe);
  }
  return pipe._call(view, [input, ...args]);
}