public override bool Equals(object obj) { if (!(obj is StructDescription)) { return(false); } StructDescription other = (StructDescription)obj; if (Fields.Count != other.Fields.Count || Methods.Count != other.Methods.Count || Constructors.Count != other.Constructors.Count || Deconstructors.Count != other.Deconstructors.Count || GenericVars.Count != other.GenericVars.Count || IsClass != other.IsClass) { return(false); } if ((BaseRef == null) != (other.BaseRef == null)) { return(false); } if (BaseRef != null) { /*!FIX! if (BaseRef.GetName().Text != other.BaseRef.GetName().Text) * return false; * if ((BaseRef.GetNamespace() == null) != (other.BaseRef.GetNamespace() == null)) * return false; * if (BaseRef.GetNamespace() != null) * { * if (BaseRef.GetNamespace().Text != other.BaseRef.GetNamespace().Text) * return false; * }*/ } if (Name != other.Name || Fields.Where((t, i) => !t.Equals(other.Fields[i])).Any() || Methods.Where((t, i) => !t.Equals(other.Methods[i])).Any() || Constructors.Where((t, i) => !t.Equals(other.Constructors[i])).Any() || Deconstructors.Where((t, i) => !t.Equals(other.Deconstructors[i])).Any() || GenericVars.Where((t, i) => !t.Equals(other.GenericVars[i])).Any()) { return(false); } return(true); }
public override bool Equals(object obj) { if (!(obj is StructDescription)) { return(false); } StructDescription other = (StructDescription)obj; if (Fields.Count != other.Fields.Count || Methods.Count != other.Methods.Count || Constructors.Count != other.Constructors.Count || Deconstructors.Count != other.Deconstructors.Count) { return(false); } if (Fields.Where((t, i) => !t.Equals(other.Fields[i])).Any() || Methods.Where((t, i) => !t.Equals(other.Methods[i])).Any() || Constructors.Where((t, i) => !t.Equals(other.Constructors[i])).Any() || Deconstructors.Where((t, i) => !t.Equals(other.Deconstructors[i])).Any()) { return(false); } return(true); }
public override void CaseAStructDecl(AStructDecl node) { StructDescription structDescription = new StructDescription(node); Structs.Add(structDescription); }
public override void CaseAStructDecl(AStructDecl node) { StructDescription structDescription = new StructDescription(node); Structs.Add(structDescription); }