> On Jun 20, 2018, at 9:16 PM, Mark Morgan Lloyd 
> <markmll.fpc-pas...@telemetry.co.uk> wrote:
> 
>> How can you integrate a preprocessor without misaligning error messages and 
>> debugging information?
> 
> I forget the detail but some language implementations have pragmata which 
> tell subsequent processing steps that at this point the source should be 
> considered to have come from such-and-such a line number in such-and-such a 
> file.

I think you’re right but that’s internal to the compiler and not really 
something we can replicate ourselves. In fact that’s what the $include 
directive does right? Again correct me if I’m wrong but I think $define:= does 
the same thing otherwise column numbers (at least) in error messages would be 
misaligned.

If macros took parameters it’s the same as before it just includes some extra 
text. I keep saying it but it’s really difficult to  understand why this is 
compiler breaking stuff.

{$define foo(xx) := DoFoo(xx)}

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to