ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

[Enhancement/Dount] A way to do source preprocessing Implmente a source preprocessor to be used. #412

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Don't know if it is already implemented, maybe yes, but nor for direct usage, 
but I was looking for a delphi/pascal preprocessor. 

I'm implementing a delphi component wizard for a specialized framework and want 
to control certain event control generation Depending on property values. For 
example I want to input a script/source which uses {$IFDEFS} and conditional 
expression like {$IF Condition} .. and get processed source as result.

I have seen there are some delphi source preprocessor in the web but they don't 
support Conditional Expressions ($ÍF Condition} {$IFEND} )

Any guidance should be appreciated

Original issue reported on code.google.com by int6...@gmail.com on 4 Jun 2013 at 2:46

GoogleCodeExporter commented 8 years ago
Hmmm, I'm not sure to understand.

Do you want to generate Pascal source by script? If so you can use the html 
filter for that, it's named "html", but can work on any text format actually.

Original comment by zar...@gmail.com on 4 Jun 2013 at 6:32

GoogleCodeExporter commented 8 years ago
Exactly I want to set a string with pascal and get a string with pascal 
language already processed. 

I will take a look it, Can i use it without using files? I mean to send it as 
stream or string and get a string or stream as result? 

Thanks

Original comment by fdue...@gmail.com on 4 Jun 2013 at 1:06

GoogleCodeExporter commented 8 years ago
Yes, you can use it without files. Most events go through String (to avoid 
ambiguity about stream wonership), there is also a component to expose a 
virtual file system (with streams).

Original comment by zar...@gmail.com on 4 Jun 2013 at 2:40