Esempio n. 1
0
            public override string ToString(int indent)
            {
                StringBuilder builder = new StringBuilder();

                builder.Indent(indent).AppendLine("UnaryOperator:");
                builder.Indent(indent + 1).AppendLine("Operator:");
                builder.Indent(indent + 2).AppendLine(UnaryOperatorType.ToString());
                builder.Indent(indent + 1).AppendLine("Operand:");
                builder.AppendLine(operand.ToString(indent + 2));
                return(builder.ToString());
            }
Esempio n. 2
0
        public static string OperName(UnaryOperatorType oper)
        {
            switch (oper)
            {
            case UnaryOperatorType.UnaryPlus:
                return("+");

            case UnaryOperatorType.UnaryNegation:
                return("-");

            case UnaryOperatorType.LogicalNot:
                return("!");

            case UnaryOperatorType.OnesComplement:
                return("~");

            case UnaryOperatorType.AddressOf:
                return("&");
            }

            throw new NotImplementedException(oper.ToString());
        }
Esempio n. 3
0
 public static string GetMethodNameForOperator(UnaryOperatorType op)
 {
     return("op_" + op.ToString());
 }
Esempio n. 4
0
 public static string GetMethodNameForOperator(UnaryOperatorType op)
 {
     return "op_" + op.ToString();
 }