templateVisitAll<R, C> function

List<R> templateVisitAll<R, C>(
  1. TemplateAstVisitor<R, C> visitor,
  2. List<TemplateAst> asts,
  3. C context
)

Visit every node in a list of TemplateAsts with the given TemplateAstVisitor.

Implementation

List<R> templateVisitAll<R, C>(
    TemplateAstVisitor<R, C> visitor, List<TemplateAst> asts, C context) {
  var result = <R>[];
  for (var ast in asts) {
    var astResult = ast.visit(visitor, context);
    if (astResult != null) {
      result.add(astResult);
    }
  }
  return result;
}