X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fdoc.cs;h=efe1e701c725f5f26ba492f811cd4518b56612ad;hb=aa13ea0ea92efae2af9fa242d5bec7abe2908dd9;hp=8fb9a25e40e92f9469b3ded1d72e76874dbd14e3;hpb=a6e7d08c6b62ff614b079ad51589f20e709ada9a;p=mono.git diff --git a/mcs/mcs/doc.cs b/mcs/mcs/doc.cs index 8fb9a25e40e..efe1e701c72 100644 --- a/mcs/mcs/doc.cs +++ b/mcs/mcs/doc.cs @@ -4,9 +4,9 @@ // Author: // Atsushi Enomoto // -// Licensed under the terms of the GNU GPL +// Dual licensed under the terms of the MIT X11 or GNU GPL // -// (C) 2004 Novell, Inc. +// Copyright 2004 Novell, Inc. // // #if ! BOOTSTRAP_WITH_OLDLIB @@ -505,11 +505,11 @@ namespace Mono.CSharp { string oper = null; string return_type_name = null; if (member_name.StartsWith ("implicit operator ")) { - oper = "op_Implicit"; + Operator.GetMetadataName (Operator.OpType.Implicit); return_type_name = member_name.Substring (18).Trim (wsChars); } else if (member_name.StartsWith ("explicit operator ")) { - oper = "op_Explicit"; + oper = Operator.GetMetadataName (Operator.OpType.Explicit); return_type_name = member_name.Substring (18).Trim (wsChars); } else if (member_name.StartsWith ("operator ")) { @@ -518,58 +518,19 @@ namespace Mono.CSharp { // either unary or binary case "+": oper = param_list.Length == 2 ? - Binary.oper_names [(int) Binary.Operator.Addition] : - Unary.oper_names [(int) Unary.Operator.UnaryPlus]; + Operator.GetMetadataName (Operator.OpType.Addition) : + Operator.GetMetadataName (Operator.OpType.UnaryPlus); break; case "-": oper = param_list.Length == 2 ? - Binary.oper_names [(int) Binary.Operator.Subtraction] : - Unary.oper_names [(int) Unary.Operator.UnaryNegation]; + Operator.GetMetadataName (Operator.OpType.Subtraction) : + Operator.GetMetadataName (Operator.OpType.UnaryNegation); break; - // unary - case "!": - oper = Unary.oper_names [(int) Unary.Operator.LogicalNot]; break; - case "~": - oper = Unary.oper_names [(int) Unary.Operator.OnesComplement]; break; - - case "++": - oper = "op_Increment"; break; - case "--": - oper = "op_Decrement"; break; - case "true": - oper = "op_True"; break; - case "false": - oper = "op_False"; break; - // binary - case "*": - oper = Binary.oper_names [(int) Binary.Operator.Multiply]; break; - case "/": - oper = Binary.oper_names [(int) Binary.Operator.Division]; break; - case "%": - oper = Binary.oper_names [(int) Binary.Operator.Modulus]; break; - case "&": - oper = Binary.oper_names [(int) Binary.Operator.BitwiseAnd]; break; - case "|": - oper = Binary.oper_names [(int) Binary.Operator.BitwiseOr]; break; - case "^": - oper = Binary.oper_names [(int) Binary.Operator.ExclusiveOr]; break; - case "<<": - oper = Binary.oper_names [(int) Binary.Operator.LeftShift]; break; - case ">>": - oper = Binary.oper_names [(int) Binary.Operator.RightShift]; break; - case "==": - oper = Binary.oper_names [(int) Binary.Operator.Equality]; break; - case "!=": - oper = Binary.oper_names [(int) Binary.Operator.Inequality]; break; - case "<": - oper = Binary.oper_names [(int) Binary.Operator.LessThan]; break; - case ">": - oper = Binary.oper_names [(int) Binary.Operator.GreaterThan]; break; - case "<=": - oper = Binary.oper_names [(int) Binary.Operator.LessThanOrEqual]; break; - case ">=": - oper = Binary.oper_names [(int) Binary.Operator.GreaterThanOrEqual]; break; default: + oper = Operator.GetMetadataName (oper); + if (oper != null) + break; + warning_type = 1584; Report.Warning (1020, 1, mc.Location, "Overloadable {0} operator is expected", param_list.Length == 2 ? "binary" : "unary"); Report.Warning (1584, 1, mc.Location, "XML comment on `{0}' has syntactically incorrect cref attribute `{1}'", @@ -760,7 +721,7 @@ namespace Mono.CSharp { // It still might be part of namespace name. Namespace ns = ds.NamespaceEntry.NS.GetNamespace (name, false); if (ns != null) { - xref.SetAttribute ("cref", "N:" + ns.FullName); + xref.SetAttribute ("cref", "N:" + ns.GetSignatureForError ()); return; // a namespace } if (RootNamespace.Global.IsNamespace (name)) {