// if we have not seen anything in between
// report this error
//
- Report.Warning (78, Location, "The 'l' suffix is easily confused with the digit '1' (use 'L' for clarity)");
+ Report.Warning (78, 4, Location, "The 'l' suffix is easily confused with the digit '1' (use 'L' for clarity)");
}
//
// This goto statement causes the MS CLR 2.0 beta 1 csc to report an error, so
val = 0ul;
return Token.LITERAL_INTEGER;
}
+ catch (FormatException) {
+ Report.Error (1013, Location, "Invalid number");
+ val = 0ul;
+ return Token.LITERAL_INTEGER;
+ }
}
int adjust_real (int t)
goto default;
return v;
default:
- Report.Error (1009, Location, "Unrecognized escape sequence `\\{0}'", (char)d);
+ Report.Error (1009, Location, "Unrecognized escape sequence `\\{0}'", ((char)d).ToString ());
return d;
}
getChar ();
Hashtable w_table = Report.warning_ignore_table;
foreach (int code in codes) {
if (w_table != null && w_table.Contains (code))
- Report.Warning (1635, 1, Location, "Cannot restore warning 'CS{0:0000}' because it was disabled globally", code);
+ Report.Warning (1635, 1, Location, String.Format ("Cannot restore warning `CS{0:0000}' because it was disabled globally", code));
Report.RegisterWarningRegion (Location).WarningEnable (Location, code);
}
return;
values[index++] = int.Parse (string_code, System.Globalization.CultureInfo.InvariantCulture);
}
catch (FormatException) {
- Report.Warning (1692, Location, "Invalid number");
+ Report.Warning (1692, 1, Location, "Invalid number");
}
}
return values;
return true;
case "warning":
- Report.Warning (1030, Location, "#warning: `{0}'", arg);
+ Report.Warning (1030, 1, Location, "#warning: `{0}'", arg);
return true;
}
identifiers [pos] = new CharArrayHashtable (pos);
val = new String (id_builder, 0, pos);
- if (RootContext.Version == LanguageVersion.ISO_1 && id_builder [0] == '_' && id_builder [1] == '_') {
- Report.Error (1638, Location,
- "`{0}': Any identifier with double underscores cannot be used when ISO language version mode is specified", val);
+ if (RootContext.Version == LanguageVersion.ISO_1) {
+ for (int i = 1; i < id_builder.Length; i += 3) {
+ if (id_builder [i] == '_' && (id_builder [i - 1] == '_' || id_builder [i + 1] == '_')) {
+ Report.Error (1638, Location,
+ "`{0}': Any identifier with double underscores cannot be used when ISO language version mode is specified", val.ToString ());
+ break;
+ }
+ }
}
char [] chars = new char [pos];
Report.Error (1011, Location, error_details);
return Token.ERROR;
}
+ if (c == '\r' || c == '\n') {
+ Report.Error (1010, Location, "Newline in constant");
+ return Token.ERROR;
+ }
c = escape (c);
if (c == -1)
return Token.ERROR;
// in csc, it is 'XML comment is not placed on
// a valid language element'. But that does not
// make sense.
- Report.Warning (1587, 2, Location, "XML comment is placed on an invalid language element.");
+ Report.Warning (1587, 2, Location, "XML comment is not placed on a valid language element");
}
}
if ((state & REGION) != 0)
Report.Error (1038, Location, "#endregion directive expected");
else
- Report.Error (1027, "Expected `#endif' directive");
+ Report.Error (1027, Location, "Expected `#endif' directive");
}
}