Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/tools
diff options
context:
space:
mode:
authorJonathan Pryor <jpryor@novell.com>2010-04-26 06:44:32 +0400
committerJonathan Pryor <jpryor@novell.com>2010-04-26 06:44:32 +0400
commit0a81615aec8291c5b69271d83cf7b884a04eaf1a (patch)
tree89a1359615f066af2aa7a199948905ac26ef26e4 /mcs/tools
parentac06d51e016a4cbbadd96d93479484d2680576d9 (diff)
* Monodoc/ecma-provider.cs: Support the full set of possible operator
names within EcmaHelpSource.MakeOperatorSignature() (where "full" is "whatever is included in ECMA-335 §10.3.1 through §10.3.3"). Fixes InvalidOperationException reported to mono-docs-list. svn path=/branches/mono-2-6/mcs/; revision=156072
Diffstat (limited to 'mcs/tools')
-rw-r--r--mcs/tools/monodoc/ChangeLog7
-rw-r--r--mcs/tools/monodoc/Monodoc/ecma-provider.cs66
2 files changed, 58 insertions, 15 deletions
diff --git a/mcs/tools/monodoc/ChangeLog b/mcs/tools/monodoc/ChangeLog
index 3ae5ad6f238..5bece1f67da 100644
--- a/mcs/tools/monodoc/ChangeLog
+++ b/mcs/tools/monodoc/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-25 Jonathan Pryor <jpryor@novell.com>
+
+ * Monodoc/ecma-provider.cs: Support the full set of possible operator
+ names within EcmaHelpSource.MakeOperatorSignature() (where "full" is
+ "whatever is included in ECMA-335 §10.3.1 through §10.3.3").
+ Fixes InvalidOperationException reported to mono-docs-list.
+
2010-02-28 Jonathan Pryor <jpryor@novell.com>
* Makefile: Remove System.Core.dll reference.
diff --git a/mcs/tools/monodoc/Monodoc/ecma-provider.cs b/mcs/tools/monodoc/Monodoc/ecma-provider.cs
index 3ff733958bd..73cba428993 100644
--- a/mcs/tools/monodoc/Monodoc/ecma-provider.cs
+++ b/mcs/tools/monodoc/Monodoc/ecma-provider.cs
@@ -829,19 +829,57 @@ public class EcmaHelpSource : HelpSource {
nicename = name.Substring(3);
switch (name) {
- // unary operators: no overloading possible
- case "op_UnaryPlus": case "op_UnaryNegation": case "op_LogicalNot": case "op_OnesComplement":
- case "op_Increment": case "op_Decrement":
- case "op_True": case "op_False":
+ // unary operators: no overloading possible [ECMA-335 §10.3.1]
+ case "op_UnaryPlus": // static R operator+ (T)
+ case "op_UnaryNegation": // static R operator- (T)
+ case "op_LogicalNot": // static R operator! (T)
+ case "op_OnesComplement": // static R operator~ (T)
+ case "op_Increment": // static R operator++ (T)
+ case "op_Decrement": // static R operator-- (T)
+ case "op_True": // static bool operator true (T)
+ case "op_False": // static bool operator false (T)
+ case "op_AddressOf": // static R operator& (T)
+ case "op_PointerDereference": // static R operator* (T)
sig = nicename;
break;
- // binary operators: overloading is possible based on parameter types
- case "op_Addition": case "op_Subtraction": case "op_Multiply": case "op_Division": case "op_Modulus":
- case "op_BitwiseAnd": case "op_BitwiseOr": case "op_ExclusiveOr":
- case "op_LeftShift": case "op_RightShift":
- case "op_Equality": case "op_Inequality":
- case "op_GreaterThan": case "op_LessThan": case "op_GreaterThanOrEqual": case "op_LessThanOrEqual":
+ // binary operators: overloading is possible [ECMA-335 §10.3.2]
+ case "op_Addition": // static R operator+ (T1, T2)
+ case "op_Subtraction": // static R operator- (T1, T2)
+ case "op_Multiply": // static R operator* (T1, T2)
+ case "op_Division": // static R operator/ (T1, T2)
+ case "op_Modulus": // static R operator% (T1, T2)
+ case "op_ExclusiveOr": // static R operator^ (T1, T2)
+ case "op_BitwiseAnd": // static R operator& (T1, T2)
+ case "op_BitwiseOr": // static R operator| (T1, T2)
+ case "op_LogicalAnd": // static R operator&& (T1, T2)
+ case "op_LogicalOr": // static R operator|| (T1, T2)
+ case "op_Assign": // static R operator= (T1, T2)
+ case "op_LeftShift": // static R operator<< (T1, T2)
+ case "op_RightShift": // static R operator>> (T1, T2)
+ case "op_SignedRightShift": // static R operator>> (T1, T2)
+ case "op_UnsignedRightShift": // static R operator>>> (T1, T2)
+ case "op_Equality": // static bool operator== (T1, T2)
+ case "op_GreaterThan": // static bool operator> (T1, T2)
+ case "op_LessThan": // static bool operator< (T1, T2)
+ case "op_Inequality": // static bool operator!= (T1, T2)
+ case "op_GreaterThanOrEqual": // static bool operator>= (T1, T2)
+ case "op_LessThanOrEqual": // static bool operator<= (T1, T2)
+ case "op_UnsignedRightShiftAssignment": // static R operator>>>= (T1, T2)
+ case "op_MemberSelection": // static R operator-> (T1, T2)
+ case "op_RightShiftAssignment": // static R operator>>= (T1, T2)
+ case "op_MultiplicationAssignment": // static R operator*= (T1, T2)
+ case "op_PointerToMemberSelection": // static R operator->* (T1, T2)
+ case "op_SubtractionAssignment": // static R operator-= (T1, T2)
+ case "op_ExclusiveOrAssignment": // static R operator^= (T1, T2)
+ case "op_LeftShiftAssignment": // static R operator<<= (T1, T2)
+ case "op_ModulusAssignment": // static R operator%= (T1, T2)
+ case "op_AdditionAssignment": // static R operator+= (T1, T2)
+ case "op_BitwiseAndAssignment": // static R operator&= (T1, T2)
+ case "op_BitwiseOrAssignment": // static R operator|= (T1, T2)
+ case "op_Comma": // static R operator, (T1, T2)
+ case "op_DivisionAssignment": // static R operator/= (T1, T2)
+ default: // If all else fails, assume it can be overridden...whatever it is.
XmlNodeList paramnodes = n.SelectNodes("Parameters/Parameter");
sig = nicename + "(";
bool first = true;
@@ -855,16 +893,14 @@ public class EcmaHelpSource : HelpSource {
sig += ")";
break;
- // overloading based on parameter and return type
- case "op_Implicit": case "op_Explicit":
+ // conversion operators: overloading based on parameter and return type [ECMA-335 §10.3.3]
+ case "op_Implicit": // static implicit operator R (T)
+ case "op_Explicit": // static explicit operator R (T)
nicename = "Conversion";
string arg = n.SelectSingleNode("Parameters/Parameter/@Type").InnerText;
string ret = n.SelectSingleNode("ReturnValue/ReturnType").InnerText;
sig = EcmaDoc.ConvertCTSName(arg) + " to " + EcmaDoc.ConvertCTSName(ret);
break;
-
- default:
- throw new InvalidOperationException();
}
}