DrDiettrich1 at aol.com
Mon Sep 6 05:29:01 CEST 2010
Florian Klämpfl schrieb:
>> 1) What's the difference between current_tokenpos and current_filepos?
>> Normally the scanner updates both vars to the same value...
> Current_tokenpos means the scanner position, current_filepos the
> compiler position in the code.
Thanks, that explains a lot :-)
>> 5) Some (parser) procedures modify current_tokenpos/filepos temporarily,
>> and restore the old values later. What's the purpose of such changes?
> To get correct file positions in debugging code and error messages.
So every temporary change of current_tokenpos should be considered
wrong? According to your above description I'd make current_tokenpos a
read-only property of the scanner...
More information about the fpc-devel