Loading...
Searching...
No Matches
context

Definition

Snapshot of a source location within the preprocessing stream.

Instances of this type accompany diagnostics throughout fpx and provide the information required to identify where an event occurred in the original source.

The stored line content is typically displayed alongside highlighted regions when rendering diagnostics.

Examples

type(context) :: ctx
ctx = context('lorem ipsum', 42, 'example.F90')

Remarks

  • A new context is typically created for each processed source line.
  • Entering an #include file naturally creates contexts referring to the included file.
  • Context objects are lightweight and inexpensive to copy.
  • They form the foundation of fpx's compiler-style diagnostics.

Constructors

Initializes a new instance of the context type.

Constructor

type(context) function context(character(*) content, integer line, character(*) path)
Parameters
[in]contentSource line associated with the diagnostic.
[in]lineOne-based line number within the source file.
[in]pathRelative or absolute path of the source file.
Returns
Newly constructed context object.

Definition at line 114 of file context.f90.


The documentation for this type was generated from the following file: