2 Jul 2008 13:37
Code generator, metaprogramming initial example.
Attached is an initial working version of what can become a code generator based on simple text specification. It uses lua as language to process it. Actually after running the example: lua partnersedit.lua Two files are generated: genpartners.pas genpartners.mfm If someone want's to play with it and send any feedback, they will be wellcome. Thanks for your attention !
dbTables = {
{'partners' , {
{name='id', type='integer', pk=true, caption='ID'},
{name='semaphore', type='integer'},
{name='reference', type='string', size=12, caption='Ref.', hint='Short reference'},
{name='name', type='string', size=40,hint='Common name'},
{name='company',type='string', hint='Legal name'},
{name='address',type='string', hint='Street address'},
{name='zip',type='string', caption='ZIP', hint='Postal code'},
{name='city',type='string'},
(Continue reading)
RSS Feed