Пример #1
0
 @Internal("all.names")
 public static StringVector allNames(SEXP expr, boolean function, int maxNames, boolean unique) {
   AllNamesVisitor visitor = new AllNamesVisitor();
   visitor.includeFunctionNames = function;
   visitor.maxNames = maxNames;
   visitor.unique = unique;
   expr.accept(visitor);
   return visitor.names.build();
 }
Пример #2
0
 @Override
 public void visit(FunctionCall call) {
   if (includeFunctionNames) {
     call.getFunction().accept(this);
   }
   for (SEXP expr : call.getArguments().values()) {
     expr.accept(this);
   }
 }
Пример #3
0
 @Override
 public void visit(ExpressionVector vector) {
   for (SEXP expr : vector) {
     expr.accept(this);
   }
 }
Пример #4
0
 private static SEXP substitute(SEXP exp, SubstituteContext context) {
   SubstitutingVisitor visitor = new SubstitutingVisitor(context);
   exp.accept(visitor);
   return visitor.getResult();
 }