@Override public List<PDefinition> caseAValueDefinition(AValueDefinition node) throws AnalysisException { return node.getDefs(); }
@Override public Boolean caseAValueDefinition(AValueDefinition node, Object other) throws AnalysisException { if (other instanceof AValueDefinition) { AValueDefinition vdo = (AValueDefinition) other; if (node.getDefs().size() == vdo.getDefs().size()) { Iterator<PDefinition> diter = vdo.getDefs().iterator(); for (PDefinition d : node.getDefs()) { if (!af.createPDefinitionAssistant().equals(diter.next(), d)) { return false; } } return true; } } return false; }
@Override public void caseAValueDefinition(AValueDefinition node) throws AnalysisException { if (node.getUsed()) // Indicates all definitions exported (used) { return; } if (node.getDefs() != null) { for (PDefinition def : node.getDefs()) { // PDefinitionAssistantTC.unusedCheck(def); def.apply(THIS); } } }
@Override public PDefinition caseAValueDefinition(AValueDefinition node, Newquestion question) throws AnalysisException { return af.createPDefinitionListAssistant().findName(node.getDefs(), question.sought, question.scope); }
for (PDefinition pDefinition : ((AValueDefinition) def).getDefs())
List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefs()); for( PDefinition e : copy)
List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefs()); for( PDefinition e : copy)
List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefs()); for( PDefinition e : copy)
public void updateDefs(AValueDefinition node, TypeCheckInfo question) { PType type = node.getType(); PPattern pattern = node.getPattern(); List<PDefinition> newdefs = af.createPPatternAssistant().getDefinitions(pattern, type, node.getNameScope()); // The untyped definitions may have had "used" markers, so we copy // those into the new typed definitions, lest we get warnings. We // also mark the local definitions as "ValueDefintions" (proxies), // so that classes can be constructed correctly (values are statics). for (PDefinition d : newdefs) { for (PDefinition u : node.getDefs()) { if (u.getName().equals(d.getName())) { if (af.createPDefinitionAssistant().isUsed(u)) { af.createPDefinitionAssistant().markUsed(d); } break; } } ALocalDefinition ld = (ALocalDefinition) d; ld.setValueDefinition(node.clone()); } node.setDefs(newdefs); List<PDefinition> defs = node.getDefs(); af.createPDefinitionListAssistant().setAccessibility(defs, node.getAccess().clone()); af.createPDefinitionListAssistant().setClassDefinition(defs, node.getClassDefinition()); }
List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefs()); for( PDefinition e : copy)
List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefs()); for( PDefinition e : copy)
for (PDefinition d : vd.getDefs())