private static <T> void visitExpressions(WithTags input, List<Match<T>> result,
      boolean[] visited, List<EntryWithId<T>> expressions) {
      if (expressions != null) {
        for (EntryWithId<T> expressionValue : expressions) {
          if (!visited[expressionValue.id]) {
            visited[expressionValue.id] = true;
            List<String> matchKeys = new ArrayList<>();
            if (expressionValue.expression().evaluate(input, matchKeys)) {
              result.add(new Match<>(expressionValue.result, matchKeys, expressionValue.id));
            }
          }
        }
      }
    }
Evaluates a list of expressions on an input element, storing the matches into {@code result} and using
{@code visited} to avoid evaluating an expression more than once.
planetiler-core/src/main/java/com/onthegomap/planetiler/expression/MultiExpression.java