public override void GenerateCode(ICodeGen gen) { this.operand.GenerateCode(gen); if (this.type_cast is Symbols.INT || this.type_cast is Symbols.POINTER) { gen.ToInt(this.type_cast.GetSizeType()); } else if (this.type_cast is Symbols.CHAR) { gen.ToInt(this.type_cast.GetSizeType()); } else if (this.type_cast is Symbols.DOUBLE) { gen.ToFloat(this.type_cast.GetSizeType()); } }
public override void GenerateCode(ICodeGen gen) { this.operand.GenerateCode(gen); if (this.type_cast is Symbols.INT || this.type_cast is Symbols.POINTER) { gen.ToInt(this.type_cast.GetSizeType()); } else if (this.type_cast is Symbols.CHAR) { gen.ToInt(this.type_cast.GetSizeType()); } else if (this.type_cast is Symbols.DOUBLE) { gen.ToFloat(this.type_cast.GetSizeType()); } }