public bool insertClass(string N, string AM, string P)
        {
            CLASS currentClass = new CLASS(N, AM, P);

            if (!LookUpClass(currentClass.name))
            {
                globalSymbolTable[globalSymbolTable.Count - 1].classes.Add(currentClass);
                return(true);
            }
            else
            {
                errors.Add("Class Redeclaration Error " + N + " " + AM);
            }
            return(false);
        }
        public string SearchMember(string classType, CLASSMEMBER obj)
        {
            for (int i = 0; i < globalSymbolTable.Last().classes.Count; i++)
            {
                if (globalSymbolTable.Last().classes[i].name == classType)
                {
                    CLASS currentClass = globalSymbolTable.Last().classes[i];

                    for (int j = 0; j < currentClass.members.Count; j++)
                    {
                        if (currentClass.members[j].name == obj.name)
                        {
                            CLASSMEMBER currentMember = currentClass.members[j];
                            if (!obj.isMethod && !currentMember.isMethod) // check if both obj and currentMember are feilds of a class , NOT METHOD
                            {
                                obj.type = currentMember.type;
                                return(obj.type);
                            }

                            else if (obj.isMethod && currentMember.isMethod) // check if both obj and currentMember are methods of a class , NOT feilds
                            {
                                if (obj.param == currentMember.param)
                                {
                                    obj.type = currentMember.type;
                                    return(obj.type);
                                }
                            }
                            else
                            {
                                return("invalid");
                            }
                        }
                    }
                    return("invalid");
                }
            }
            return("invalid");
        }
        public bool insertClass(string N, string AM, string P)
        {
            CLASS currentClass = new CLASS(N, AM, P);

            if (!LookUpClass(currentClass.name))
            {
                globalSymbolTable[globalSymbolTable.Count - 1].classes.Add(currentClass);
                return true;
            }
            else
            {
                errors.Add("Class Redeclaration Error " + N + " " + AM);
            }
            return false;
        }