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()); }
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()); }
public static string GetMethodNameForOperator(UnaryOperatorType op) { return("op_" + op.ToString()); }
public static string GetMethodNameForOperator(UnaryOperatorType op) { return "op_" + op.ToString(); }