public ResolvedMethod <TNode> FindMethodInFullHierarchy(ResolvedMethodId id) { var exists = myMethods.TryGetValue(id, out var method); if (!exists) { method = ResolvedBase?.FindMethodInFullHierarchy(id); } return(method); }
public ResolvedMethod(ResolvedMethodId id, TNode start, TNode final) { Start = start; Final = final; myOwned = new List <TNode> { Start, Final }; myVariables = new Dictionary <int, ResolvedLocalVariable>(); myLocalFunctions = new Dictionary <ResolvedMethodId, ResolvedMethod <TNode> >(); myAttributes = new SortedSet <int>(); AdditionalVariables = new HashSet <SecondaryEntity>(); }
public void AddMethod(ResolvedMethodId id, ResolvedMethod <TNode> method) { var exists = myLocalFunctions.ContainsKey(id); if (!exists) { myLocalFunctions.Add(id, method); } else { myLocalFunctions[id] = method; } }
public ResolvedFullMethodId(ResolvedClassId classId, ResolvedMethodId methodId) { ClassId = classId; MethodId = methodId; }
public ResolvedLocalFunctionReference(ResolvedMethodId methodId) { MethodId = methodId; }
public bool RemoveMethod(ResolvedMethodId id) { return(myLocalFunctions.Remove(id)); }
public ResolvedMethod <TNode> FindLocalMethod(ResolvedMethodId id) { return(FindMethodInFullHierarchy(id)); }
public ResolvedMethod <TNode> FindMethodInFullHierarchy(ResolvedMethodId id) { Methods.TryGetValue(id, out var method); return(method); }
public ResolvedMethod <TNode> FindLocalMethod(ResolvedMethodId id) { myMethods.TryGetValue(id, out var method); return(method); }
public bool RemoveMethod(ResolvedMethodId id) { return(myMethods.Remove(id)); }
public ResolvedClassMethodReference(ResolvedClassId ownerId, ResolvedMethodId methodId) { OwnerId = ownerId; MethodId = methodId; }