[fpc-pascal] Proper preprocessor?

Marc Santhoff M.Santhoff at web.de
Wed Jun 20 17:20:08 CEST 2018


On Wed, 2018-06-20 at 21:34 +0700, Ryan Joseph wrote:

> My impression was it was trivial extension to the current macros system but
> the compiler team was adverse to the idea because it creates “bad code” and
> all the other (very reasonable) reasons to not use macros in code (I read
> some old threads to this effect). It’s hard to understand why the current
> macros can’t be extended so I suspect this issue will just keep coming up
> over and over again.

If it's that important to you, do it yourself. The compiler is open source,
pure, readable pascal.

The spots where resolving single parameter macros is done are pretty easy to
find. Parsing the macro text and replacement will be the hardest part, as
Michael wrote. A bit of housekeeping for parameter-type lists, etc...

-- 
Marc Santhoff <M.Santhoff at web.de>



More information about the fpc-pascal mailing list