Standard #line directive support for the fpx Fortran preprocessor.
This module implements full support for the ISO C99/C11 #line directive, which is also widely used in Fortran preprocessors.
The #line directive allows changing the logical line number and/or source filename reported by the preprocessor. It is particularly useful for:
Supported forms (standard compliant):
When a #line directive is encountered, the current context (line number and filename) is updated immediately. This affects all subsequent diagnostics, __LINE__, __FILE__, and __FILENAME__ macros.
|
private |
Handle the standard line directive Supports two standard forms: line <number> line <number> "<filename>".
This updates the current line number (ctxline) and optionally the current filename (ctxpath) for subsequent diagnostics, __LINE__, and __FILE__ expansions.
Fully compliant with ISO C99 / C11 �6.10.4 and common Fortran preprocessor behavior.
| [in,out] | ctx | Context source line containing the line directive |
| [in] | token | Usually 'DEFINE' � keyword matched in lowercase |
Remarks