public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || this.GetType() != obj.GetType()) { return(false); } LogicalConstant other = (LogicalConstant)obj; return(value == other.value); }
public override void ExitLogicalConst([NotNull] RuleSetGrammarParser.LogicalConstContext context) { switch (context.GetText().ToUpper()) { case "TRUE": this.logicalExpressions.Push(LogicalConstant.GetTrue()); break; case "FALSE": this.logicalExpressions.Push(LogicalConstant.GetFalse()); break; default: throw new Exception("Unknown logical constant: " + context.GetText()); } }