[fpc-devel] Pascal to Javascript - Still being Updated ? / General Conversion

Daniel Gaspary dgaspary at gmail.com
Sun Aug 2 09:27:51 CEST 2015


On Sun, Aug 2, 2015 at 4:18 AM, Michael Van Canneyt
<michael at freepascal.org> wrote:
>>   How about change to an Abstract Converter Class(interface?) ??
>
> What do you mean by this ?
>
>>   I am thinking about using the same structure to convert to some text
>> format.
>
> All you will have in common is the fcl-passrc ?

Today the Converter is dedicated to one format only: Javascript.

I was thinking about a base Pascal converter. After that, specific
converters could be implemented:

TPascalConverter = class

procedure WriteIfStatement(...); virtual;
procedure WriteWhileStatement(...); virtual;

end;

TPascalToJavascriptConverter = class(TPascalConverter)

procedure WriteIfStatement(...); override;
end;

TPascalToJSonConverter = class(TPascalConverter)
procedure WriteIfStatement(...); override;
end;

Something like that.



More information about the fpc-devel mailing list