@Override public Void visitNamedFormalParameter(NamedFormalParameter node) { ElementHolder holder = new ElementHolder(); visitChildren(holder, node.getDefaultValue()); FunctionElementImpl initializer = new FunctionElementImpl(); initializer.setFunctions(holder.getFunctions()); initializer.setLabels(holder.getLabels()); initializer.setLocalVariables(holder.getVariables()); if (holder.getParameters() != null) { initializer.setParameters(holder.getParameters()); } VariableElementImpl parameter = new VariableElementImpl(node.getParameter().getIdentifier()); parameter.setInitializer(initializer); currentHolder.addVariable(parameter); return null; }
@Override public R visitNamedFormalParameter(NamedFormalParameter node) { node.visitChildren(this); return null; }