public static AImportedDefinition newAImportedDefinition( ILexLocation location, PDefinition d) { AImportedDefinition result = new AImportedDefinition(); initDefinition(result, Pass.DEFS, location, d.getName(), d.getNameScope()); result.setDef(d); return result; }
public static ARenamedDefinition newARenamedDefinition(ILexNameToken name, PDefinition def) { ARenamedDefinition result = new ARenamedDefinition(); initDefinition(result, def.getPass(), name.getLocation(), name, def.getNameScope()); result.setDef(def); return result; }
public PDefinition findNameBaseCase(PDefinition d, ILexNameToken sought, NameScope scope) { if (af.getLexNameTokenAssistant().isEqual(d.getName(), sought)) { if (!d.getNameScope().matches(scope)) { TypeChecker.report(3302, "State variable '" + sought.getFullName() + "' cannot be accessed from this context", sought.getLocation()); } markUsed(d); return d; } return null; }
&& existing.getNameScope().matches(NameScope.NAMES))
if (def != null && def.getNameScope() == null) && def.getNameScope().matches(scope))
public static AInheritedDefinition newAInheritedDefinition( ILexNameToken localname, PDefinition d) { AInheritedDefinition result = new AInheritedDefinition(); initDefinition(result, d.getPass(), d.getLocation(), localname, d.getNameScope()); result.setSuperdef(d); result.setOldname(localname.getOldName()); result.setType(d.getType()); af.createPDefinitionAssistant().setClassDefinition(result, d.getClassDefinition()); result.setAccess(d.getAccess().clone()); return result; }
|| !(varDef.getNameScope() == NameScope.STATE || varDef.getNameScope() == NameScope.GLOBAL || varDef.getNameScope() == NameScope.VARSTATE || varDef.getNameScope() == NameScope.VARSANDSTATE);