[fpc-pascal] Proper preprocessor?
Ryan Joseph
ryan at thealchemistguild.com
Wed Jun 20 17:03:19 CEST 2018
> On Jun 20, 2018, at 9:16 PM, Mark Morgan Lloyd <markMLl.fpc-pascal at 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
More information about the fpc-pascal
mailing list