public void SerializeNoOpExpression() { var a = new NoOpExpression(); var b = Reserialize(a); Assert.AreEqual(a, b); }
private Say CompileSay(Reader reader) { var first = CompileExpression(reader); var second = CompileExpression(reader); // Check for no_wait as second parameter bool noWait = false; if (second is VariableExpression) { if ((second as VariableExpression).Name == "no_wait") { second = new NoOpExpression(); noWait = true; } } // Check for no_wait at end of line if (!noWait) { reader.Skip(); if (reader.HasToken("no_wait")) { reader.Read("no_wait".Length); noWait = true; } } if (second is NoOpExpression) { return(new Say(first, noWait)); } else { return(new Say(first, second, noWait)); } }