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...

DoDi

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to