Ejemplo n.º 1
0
        public ResolvedMethod <TNode> FindMethodInFullHierarchy(ResolvedMethodId id)
        {
            var exists = myMethods.TryGetValue(id, out var method);

            if (!exists)
            {
                method = ResolvedBase?.FindMethodInFullHierarchy(id);
            }

            return(method);
        }
Ejemplo n.º 2
0
        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>();
        }
Ejemplo n.º 3
0
        public void AddMethod(ResolvedMethodId id, ResolvedMethod <TNode> method)
        {
            var exists = myLocalFunctions.ContainsKey(id);

            if (!exists)
            {
                myLocalFunctions.Add(id, method);
            }
            else
            {
                myLocalFunctions[id] = method;
            }
        }
Ejemplo n.º 4
0
 public ResolvedFullMethodId(ResolvedClassId classId, ResolvedMethodId methodId)
 {
     ClassId  = classId;
     MethodId = methodId;
 }
 public ResolvedLocalFunctionReference(ResolvedMethodId methodId)
 {
     MethodId = methodId;
 }
Ejemplo n.º 6
0
 public bool RemoveMethod(ResolvedMethodId id)
 {
     return(myLocalFunctions.Remove(id));
 }
Ejemplo n.º 7
0
 public ResolvedMethod <TNode> FindLocalMethod(ResolvedMethodId id)
 {
     return(FindMethodInFullHierarchy(id));
 }
Ejemplo n.º 8
0
        public ResolvedMethod <TNode> FindMethodInFullHierarchy(ResolvedMethodId id)
        {
            Methods.TryGetValue(id, out var method);

            return(method);
        }
Ejemplo n.º 9
0
 public ResolvedMethod <TNode> FindLocalMethod(ResolvedMethodId id)
 {
     myMethods.TryGetValue(id, out var method);
     return(method);
 }
Ejemplo n.º 10
0
 public bool RemoveMethod(ResolvedMethodId id)
 {
     return(myMethods.Remove(id));
 }
Ejemplo n.º 11
0
 public ResolvedClassMethodReference(ResolvedClassId ownerId, ResolvedMethodId methodId)
 {
     OwnerId  = ownerId;
     MethodId = methodId;
 }