el.InnerXml = line_head + String.Join (
line_head, split, 0, j);
return el;
- } catch (XmlException ex) {
+ } catch (Exception ex) {
Report.Warning (1570, 1, mc.Location, "XML comment on `{0}' has non-well-formed XML ({1})", name, ex.Message);
XmlComment com = doc.CreateComment (String.Format ("FIXME: Invalid documentation markup was found for member {0}", name));
return com;
{
switch (identifier) {
case "int":
- return typeof (int);
+ return TypeManager.int32_type;
case "uint":
- return typeof (uint);
+ return TypeManager.uint32_type;
case "short":
- return typeof (short);
+ return TypeManager.short_type;;
case "ushort":
- return typeof (ushort);
+ return TypeManager.ushort_type;
case "long":
- return typeof (long);
+ return TypeManager.int64_type;
case "ulong":
- return typeof (ulong);
+ return TypeManager.uint64_type;;
case "float":
- return typeof (float);
+ return TypeManager.float_type;;
case "double":
- return typeof (double);
+ return TypeManager.double_type;
case "char":
- return typeof (char);
+ return TypeManager.char_type;;
case "decimal":
- return typeof (decimal);
+ return TypeManager.decimal_type;;
case "byte":
- return typeof (byte);
+ return TypeManager.byte_type;;
case "sbyte":
- return typeof (sbyte);
+ return TypeManager.sbyte_type;;
case "object":
- return typeof (object);
+ return TypeManager.object_type;;
case "bool":
- return typeof (bool);
+ return TypeManager.bool_type;;
case "string":
- return typeof (string);
+ return TypeManager.string_type;;
case "void":
- return typeof (void);
+ return TypeManager.void_type;;
}
FullNamedExpression e = ds.LookupNamespaceOrType (identifier, mc.Location, false);
if (e != null) {
// either unary or binary
case "+":
oper = param_list.Length == 2 ?
- Binary.oper_names [(int) Binary.Operator.Addition] :
+ Binary.GetOperatorMetadataName (Binary.Operator.Addition) :
Unary.oper_names [(int) Unary.Operator.UnaryPlus];
break;
case "-":
oper = param_list.Length == 2 ?
- Binary.oper_names [(int) Binary.Operator.Subtraction] :
+ Binary.GetOperatorMetadataName (Binary.Operator.Subtraction) :
Unary.oper_names [(int) Unary.Operator.UnaryNegation];
break;
// unary
oper = "op_False"; break;
// binary
case "*":
- oper = Binary.oper_names [(int) Binary.Operator.Multiply]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.Multiply); break;
case "/":
- oper = Binary.oper_names [(int) Binary.Operator.Division]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.Division); break;
case "%":
- oper = Binary.oper_names [(int) Binary.Operator.Modulus]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.Modulus); break;
case "&":
- oper = Binary.oper_names [(int) Binary.Operator.BitwiseAnd]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.BitwiseAnd); break;
case "|":
- oper = Binary.oper_names [(int) Binary.Operator.BitwiseOr]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.BitwiseOr); break;
case "^":
- oper = Binary.oper_names [(int) Binary.Operator.ExclusiveOr]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.ExclusiveOr); break;
case "<<":
- oper = Binary.oper_names [(int) Binary.Operator.LeftShift]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.LeftShift); break;
case ">>":
- oper = Binary.oper_names [(int) Binary.Operator.RightShift]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.RightShift); break;
case "==":
- oper = Binary.oper_names [(int) Binary.Operator.Equality]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.Equality); break;
case "!=":
- oper = Binary.oper_names [(int) Binary.Operator.Inequality]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.Inequality); break;
case "<":
- oper = Binary.oper_names [(int) Binary.Operator.LessThan]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.LessThan); break;
case ">":
- oper = Binary.oper_names [(int) Binary.Operator.GreaterThan]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.GreaterThan); break;
case "<=":
- oper = Binary.oper_names [(int) Binary.Operator.LessThanOrEqual]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.LessThanOrEqual); break;
case ">=":
- oper = Binary.oper_names [(int) Binary.Operator.GreaterThanOrEqual]; break;
+ oper = Binary.GetOperatorMetadataName (Binary.Operator.GreaterThanOrEqual); break;
default:
warning_type = 1584;
Report.Warning (1020, 1, mc.Location, "Overloadable {0} operator is expected", param_list.Length == 2 ? "binary" : "unary");
Type type = FindDocumentedType (mc, name, ds, cref);
if (type != null
// delegate must not be referenced with args
- && (!type.IsSubclassOf (typeof (System.Delegate))
+ && (!TypeManager.IsDelegateType (type)
|| parameter_types == null)) {
string result = GetSignatureForDoc (type)
+ (brace_pos < 0 ? String.Empty : signature.Substring (brace_pos));