It seems that Delphi does not have a built-in compiler directive or "magic word" equivalent to __LINE__ or $LINE for directly accessing the current source code line number, as seen in languages like C/C++.
Free Pascal (which shares compatibility with Delphi) does support special tokens like %LINE% and %FILE% within the {$INCLUDE} directive to insert the current line number or file name as text.
Is there a way to make Delphi support this (e.g., with custom pre-processors)?