- if (t.BuildinType > 0) {
- switch (t.BuildinType) {
- case BuildinTypeSpec.Type.Int:
- return new IntConstant ((int) v, loc);
- case BuildinTypeSpec.Type.String:
- return new StringConstant ((string) v, loc);
- case BuildinTypeSpec.Type.UInt:
- return new UIntConstant ((uint) v, loc);
- case BuildinTypeSpec.Type.Long:
- return new LongConstant ((long) v, loc);
- case BuildinTypeSpec.Type.ULong:
- return new ULongConstant ((ulong) v, loc);
- case BuildinTypeSpec.Type.Float:
- return new FloatConstant ((float) v, loc);
- case BuildinTypeSpec.Type.Double:
- return new DoubleConstant ((double) v, loc);
- case BuildinTypeSpec.Type.Short:
- return new ShortConstant ((short) v, loc);
- case BuildinTypeSpec.Type.UShort:
- return new UShortConstant ((ushort) v, loc);
- case BuildinTypeSpec.Type.SByte:
- return new SByteConstant ((sbyte) v, loc);
- case BuildinTypeSpec.Type.Byte:
- return new ByteConstant ((byte) v, loc);
- case BuildinTypeSpec.Type.Char:
- return new CharConstant ((char) v, loc);
- case BuildinTypeSpec.Type.Bool:
- return new BoolConstant ((bool) v, loc);
- case BuildinTypeSpec.Type.Decimal:
- return new DecimalConstant ((decimal) v, loc);
- }
+ switch (t.BuiltinType) {
+ case BuiltinTypeSpec.Type.Int:
+ return new IntConstant (t, (int) v, loc);
+ case BuiltinTypeSpec.Type.String:
+ return new StringConstant (t, (string) v, loc);
+ case BuiltinTypeSpec.Type.UInt:
+ return new UIntConstant (t, (uint) v, loc);
+ case BuiltinTypeSpec.Type.Long:
+ return new LongConstant (t, (long) v, loc);
+ case BuiltinTypeSpec.Type.ULong:
+ return new ULongConstant (t, (ulong) v, loc);
+ case BuiltinTypeSpec.Type.Float:
+ return new FloatConstant (t, (float) v, loc);
+ case BuiltinTypeSpec.Type.Double:
+ return new DoubleConstant (t, (double) v, loc);
+ case BuiltinTypeSpec.Type.Short:
+ return new ShortConstant (t, (short) v, loc);
+ case BuiltinTypeSpec.Type.UShort:
+ return new UShortConstant (t, (ushort) v, loc);
+ case BuiltinTypeSpec.Type.SByte:
+ return new SByteConstant (t, (sbyte) v, loc);
+ case BuiltinTypeSpec.Type.Byte:
+ return new ByteConstant (t, (byte) v, loc);
+ case BuiltinTypeSpec.Type.Char:
+ return new CharConstant (t, (char) v, loc);
+ case BuiltinTypeSpec.Type.Bool:
+ return new BoolConstant (t, (bool) v, loc);
+ case BuiltinTypeSpec.Type.Decimal:
+ return new DecimalConstant (t, (decimal) v, loc);