4 static void w (string s)
6 Console.WriteLine ("\t" + s);
15 { "UShort", "ushort" },
19 { "ULong", "uint64" },
21 { "Double", "double" },
25 for (int i = 0; names [i,0] != null; i++){
26 string big = names [i, 0] + "Constant";
27 string small = "TypeManager." + names [i, 1] + "_type";
28 string nat = ((string) names [i,0]).ToLower ();
30 w ("\t\tif (expr is " + big + "){");
31 w ("\t\t\t" + nat + " v = ((" + big + ") expr).Value;");
34 for (int j = 0; names [j,0] != null; j++){
35 string b = names [j, 0] + "Constant";
36 string s = "TypeManager." + names [j, 1] + "_type";
37 string n = ((string) names [j,0]).ToLower ();
42 w ("\t\t\tif (target_type == " + s + ")");
43 w ("\t\t\t\treturn new " + b + " ((" + n + ") v);");