On 20/06/18 16:00, Marc Santhoff wrote:
On Wed, 2018-06-20 at 22:45 +0700, Ryan Joseph wrote:> > On Jun 20, 2018, at 10:20 PM, Marc Santhoff <m.santh...@web.de> wrote:> > > > 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...> > Easy? I’ve wanted to contribute to the compiler for years but it’s so> daunting finding anything I give up. I’m curious how the parser works so> please show me where the parser does the $defines. Maybe I can figure it out> this time. When I looked around it was in scanner.passymsym.pas Just grep for "macro". If there is more or I'm wrong hopefully one of the "compiler guys" will helpout here, please. ;)
Word of caution: IIRC macros only work properly in comments delimited by braces {}
-- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal