AGS.Plugin.Lua.LuaCodeDom.LuaExpression.UnOp.WriteTo C# (CSharp) Method

WriteTo() public method

public WriteTo ( TextWriter output, int indent, bool asPrefix ) : void
output System.IO.TextWriter
indent int
asPrefix bool
return void
            public override void WriteTo(TextWriter output, int indent, bool asPrefix)
            {
                switch (OpType)
                {
                    case LuaUnaryOperatorType.Length: output.Write("#"); break;
                    case LuaUnaryOperatorType.LogicalNot: output.Write("not "); break;
                    case LuaUnaryOperatorType.Minus: output.Write("-"); break;
                }
                if (Operand is BinOp)
                {
                    output.Write("(");
                    Operand.WriteTo(output, indent, false);
                    output.Write(")");
                }
                else
                {
                    Operand.WriteTo(output, indent, false);
                }
            }
LuaExpression.UnOp