public override bool Equals(object obj) { if (this == obj) { return(true); } if (!(obj is SemanticContext.OR)) { return(false); } SemanticContext.OR other = (SemanticContext.OR)obj; return(Arrays.Equals(this.opnds, other.opnds)); }
public static SemanticContext OrOp(SemanticContext a, SemanticContext b) { if (a == null) { return(b); } if (b == null) { return(a); } if (a == NONE || b == NONE) { return(NONE); } SemanticContext.OR result = new SemanticContext.OR(a, b); if (result.opnds.Length == 1) { return(result.opnds[0]); } return(result); }