public override bool Equals(TypeSpecifier other) { if (other == null) { return(false); } EnumSpecifier enOther = other as EnumSpecifier; if (enOther == null) { return(false); } if (Identifier.Equals(enOther.Identifier)) { return(true); } return(false); }
public override bool Equals(TypeSpecifier other) { if (other == null) { return(false); } StructureSpecifier stOther = other as StructureSpecifier; if (stOther == null) { return(false); } if (this.Identifier != null) { if (this.Identifier.Equals(stOther.Identifier)) { return(true); } } else if (stOther.Identifier == null) { if (this.StructureDeclarationList.Count == stOther.StructureDeclarationList.Count) { for (int i = 0; i < this.StructureDeclarationList.Count; ++i) { if (!stOther.StructureDeclarationList[i].Equals(this.StructureDeclarationList[i])) { return(false); } } return(true); } } return(false); }