public void LogicalNotExpression() { var e = new LogicalNotExpression(new StringLiteral("lol")); Assert.IsFalse(e.IsTrivial); Assert.AreEqual("(!\"lol\")", e.ToString()); Assert.AreEqual("LogicalNot", e.Name); }
public string Visit(LogicalNotExpression node) { var codeWriter = new XzaarCodeWriter(); var indent = IsInsideExpression ? 0 : currentIndent; insideExpressionCount++; codeWriter.Write("!", indent); codeWriter.Write(Visit(node.Expression)); insideExpressionCount--; if (!IsInsideExpression) { codeWriter.NewLine(); } return(codeWriter.ToString()); }
internal Expression ParseLogicNot() // E -> !E E' { if (this.input.Read() is LogicalNotToken) { Expression ex = this.ParseEx(); if (ex != null) { Expression res; if (ex is UnaryExpression) { res = new LogicalNotExpression() { Oprand = ex }; return(this.ParseExPrime(res)); } else { // BinaryExpression BinaryExpression be = (BinaryExpression)ex; res = new LogicalNotExpression() { Oprand = be.Lhs }; be.Lhs = res; return(be); } } else { throw new ArgumentException("Failed parse LogicNot"); } } else { this.input.Unread(); return(null); } }
public override void Visit(LogicalNotExpression node) { Visit((UnaryExpression)node); }
public override void Visit(LogicalNotExpression node) { unfinishedClone = new LogicalNotExpression(GetCloneOf(node.Expression)); base.Visit(node); }
public override void Visit(LogicalNotExpression node) { UpdateType(node, TypeCalculator.GetType(node)); }
public override void Visit(LogicalNotExpression node) { AssignToImplicitReturn(node); }
public object Visit(LogicalNotExpression expr) { return(null); }
public object Visit(LogicalNotExpression expr) { throw new System.NotImplementedException(); }