Public Member Functions | Private Member Functions | Private Attributes | List of all members
lexy_ext::diagnostic_writer< Input > Class Template Reference

Formats and writes diagnostic messages. More...

#include <report_error.hpp>

Public Member Functions

 diagnostic_writer (const Input &input, lexy::visualization_options opts={})
 
template<typename OutputIt , typename Location , typename IteratorOrSize , typename Writer >
OutputIt write_annotation (OutputIt out, annotation_kind kind, const Location &begin_location, IteratorOrSize end, const Writer &message) const
 
template<typename OutputIt >
OutputIt write_empty_annotation (OutputIt out) const
 
template<typename OutputIt , typename Writer >
OutputIt write_message (OutputIt out, diagnostic_kind kind, const Writer &message) const
 
template<typename OutputIt >
OutputIt write_path (OutputIt out, const char *path) const
 Writes a path. More...
 

Private Member Functions

template<typename OutputIt >
OutputIt colorize_underline (OutputIt out, annotation_kind kind) const
 
const auto * column () const
 
const auto * underline (annotation_kind kind) const
 

Private Attributes

const Input * _input
 
lexy::visualization_options _opts
 

Detailed Description

template<typename Input>
class lexy_ext::diagnostic_writer< Input >

Formats and writes diagnostic messages.

Definition at line 40 of file report_error.hpp.

Constructor & Destructor Documentation

◆ diagnostic_writer()

template<typename Input >
lexy_ext::diagnostic_writer< Input >::diagnostic_writer ( const Input &  input,
lexy::visualization_options  opts = {} 
)
inlineexplicit

Definition at line 43 of file report_error.hpp.

Member Function Documentation

◆ colorize_underline()

template<typename Input >
template<typename OutputIt >
OutputIt lexy_ext::diagnostic_writer< Input >::colorize_underline ( OutputIt  out,
annotation_kind  kind 
) const
inlineprivate

Definition at line 200 of file report_error.hpp.

◆ column()

template<typename Input >
const auto* lexy_ext::diagnostic_writer< Input >::column ( ) const
inlineprivate

Definition at line 191 of file report_error.hpp.

◆ underline()

template<typename Input >
const auto* lexy_ext::diagnostic_writer< Input >::underline ( annotation_kind  kind) const
inlineprivate

Definition at line 216 of file report_error.hpp.

◆ write_annotation()

template<typename Input >
template<typename OutputIt , typename Location , typename IteratorOrSize , typename Writer >
OutputIt lexy_ext::diagnostic_writer< Input >::write_annotation ( OutputIt  out,
annotation_kind  kind,
const Location &  begin_location,
IteratorOrSize  end,
const Writer &  message 
) const
inline

Writes a highlighted line with an annotation.

100 | void foo(); | ^^^ annotation

Definition at line 130 of file report_error.hpp.

◆ write_empty_annotation()

template<typename Input >
template<typename OutputIt >
OutputIt lexy_ext::diagnostic_writer< Input >::write_empty_annotation ( OutputIt  out) const
inline

Writes an empty annotation.

|

Definition at line 114 of file report_error.hpp.

◆ write_message()

template<typename Input >
template<typename OutputIt , typename Writer >
OutputIt lexy_ext::diagnostic_writer< Input >::write_message ( OutputIt  out,
diagnostic_kind  kind,
const Writer &  message 
) const
inline

Writes a message.

error: A message.

Definition at line 52 of file report_error.hpp.

◆ write_path()

template<typename Input >
template<typename OutputIt >
OutputIt lexy_ext::diagnostic_writer< Input >::write_path ( OutputIt  out,
const char *  path 
) const
inline

Writes a path.

Definition at line 98 of file report_error.hpp.

Member Data Documentation

◆ _input

template<typename Input >
const Input* lexy_ext::diagnostic_writer< Input >::_input
private

Definition at line 229 of file report_error.hpp.

◆ _opts

template<typename Input >
lexy::visualization_options lexy_ext::diagnostic_writer< Input >::_opts
private

Definition at line 230 of file report_error.hpp.


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


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19