Pretty Diagnostics
Create your own pretty diagnostics
Loading...
Searching...
No Matches
source.hpp File Reference
#include <filesystem>
#include <optional>
Include dependency graph for source.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  pretty_diagnostics::Location
 A position inside a Source, expressed as (row, column, index) More...
 
class  pretty_diagnostics::Source
 Abstract interface for reading and mapping source text. More...
 
class  pretty_diagnostics::FileSource
 A Source implementation that reads from a file on disk. More...
 

Namespaces

namespace  pretty_diagnostics
 

Functions

std::ostream & operator<< (std::ostream &os, const pretty_diagnostics::Location &location)
 Streams a readable description of a Location More...
 
std::ostream & operator<< (std::ostream &os, const pretty_diagnostics::FileSource &source)
 Streams a readable description of a FileSource More...
 
std::ostream & operator<< (std::ostream &os, const pretty_diagnostics::Source &source)
 Streams a readable description of a Source More...
 

Function Documentation

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream &  os,
const pretty_diagnostics::FileSource source 
)

Streams a readable description of a FileSource

Parameters
osOutput stream to write to
sourceSource to describe
Returns
Reference to os.

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  os,
const pretty_diagnostics::Location location 
)

Streams a readable description of a Location

Parameters
osOutput stream to write to
locationLocation to format
Returns
Reference to os

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  os,
const pretty_diagnostics::Source source 
)

Streams a readable description of a Source

Parameters
osOutput stream to write to
sourceSource to describe
Returns
Reference to os