V_4 = 4,
V_5 = 5,
V_6 = 6,
+ V_7 = 7,
Experimental = 100,
- Default = LanguageVersion.V_6,
+ Default = V_7,
}
public enum RuntimeVersion
void About ()
{
output.WriteLine (
- "The Mono C# compiler is Copyright 2001-2011, Novell, Inc.\n\n" +
+ "The Turbo C# compiler is Copyright 2001-2011, Novell, Inc. 2011-2016 Xamarin Inc, 2016-2017 Microsoft Corp\n\n" +
"The compiler source code is released under the terms of the \n" +
"MIT X11 or GNU GPL licenses\n\n" +
public bool ProcessWarningsList (string text, Action<int> action)
{
- bool valid = true;
foreach (string wid in text.Split (numeric_value_separator, StringSplitOptions.RemoveEmptyEntries)) {
var warning = wid;
if (warning.Length == 6 && warning [0] == 'C' && warning [1] == 'S')
continue;
}
- if (report.CheckWarningCode (id, Location.Null)) {
- action (id);
- } else {
- report.Error (1904, "`{0}' is not a valid warning number", wid);
- valid = false;
- }
+ action (id);
}
- return valid;
+ return true;
}
void Error_RequiresArgument (string option)
return ParseResult.Success;
case "/debug":
- if (value.Equals ("full", StringComparison.OrdinalIgnoreCase) || value.Equals ("pdbonly", StringComparison.OrdinalIgnoreCase) || idx < 0) {
+ if (value.Equals ("full", StringComparison.OrdinalIgnoreCase) || value.Equals ("pdbonly", StringComparison.OrdinalIgnoreCase) || value.Equals ("portable", StringComparison.OrdinalIgnoreCase) || idx < 0) {
settings.GenerateDebugInfo = true;
return ParseResult.Success;
}
case "6":
settings.Version = LanguageVersion.V_6;
return ParseResult.Success;
+ case "7":
+ settings.Version = LanguageVersion.V_7;
+ return ParseResult.Success;
case "experimental":
settings.Version = LanguageVersion.Experimental;
return ParseResult.Success;
- case "future":
- report.Warning (8000, 1, "Language version `future' is no longer supported");
- goto case "6";
}
- report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 6", value);
+ report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 7", value);
return ParseResult.Error;
case "/codepage":
}
return ParseResult.Success;
- case "runtimemetadataversion":
+ case "/runtimemetadataversion":
if (value.Length == 0) {
Error_RequiresArgument (option);
return ParseResult.Error;
case "/appconfig":
case "/baseaddress":
case "/deterministic":
+ case "/deterministic+":
+ case "/deterministic-":
case "/errorendlocation":
case "/errorlog":
case "/features":
void Usage ()
{
output.WriteLine (
- "Mono C# compiler, Copyright 2001-2011 Novell, Inc., Copyright 2011-2012 Xamarin, Inc\n" +
+ "Turbo C# compiler, Copyright 2001-2011 Novell, Inc., 2011-2016 Xamarin, Inc, 2016-2017 Microsoft Corp\n" +
"mcs [options] source-files\n" +
" --about About the Mono C# compiler\n" +
" -addmodule:M1[,Mn] Adds the module to the generated assembly\n" +