System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
DriverMain driver = new DriverMain (args);
- try {
if (!driver.Run ()) {
Console.WriteLine ();
Console.WriteLine ("***** FAILURE *****");
return 1;
}
- } catch (Exception e) {
- Console.WriteLine (e);
- Console.WriteLine ("Error while compiling.");
- return 1;
- }
Console.WriteLine ("Operation completed successfully");
return 0;
}
public bool Run ()
{
- try {
if (il_file_list.Count == 0)
Usage ();
if (output_file == null)
if (report.ErrorCount > 0)
return false;
codegen.Write ();
- } catch {
- return false;
- }
-
return true;
}
2004-12-02 Miguel de Icaza <miguel@ximian.com>
- * ILParser.jay: Added D_STACKRESERVE token.
+ * ILParser.jay(field_init): Explicit cast to the target type, this
+ is what ilasm does (0xFFFFFFFF) as an int gets translated
+
+ Added D_STACKRESERVE token.
(prop_head, event_head): Allow it to take a compound name (for explicit
interface implementations of properties).
\r
return b;\r
}\r
+\r
%}\r
\r
%token EOF\r
}\r
| K_INT32 OPEN_PARENS int64 CLOSE_PARENS\r
{\r
- $$ = new IntConst (Convert.ToInt32 ($3));\r
+ $$ = new IntConst ((int)((long)$3));\r
}\r
| K_INT16 OPEN_PARENS int64 CLOSE_PARENS\r
{\r
- $$ = new IntConst (Convert.ToInt16 ($3));\r
+ $$ = new IntConst ((short)((long) $3));\r
}\r
| K_CHAR OPEN_PARENS int64 CLOSE_PARENS\r
{\r
}\r
| K_INT8 OPEN_PARENS int64 CLOSE_PARENS\r
{\r
- $$ = new IntConst (Convert.ToByte ($3));\r
+ $$ = new IntConst ((byte)((long) ($3)));\r
}\r
| K_BOOL OPEN_PARENS truefalse CLOSE_PARENS\r
{\r