Blender V5.3
bsl::NodeErrorHandler Struct Reference

#include <diagnostic.hh>

Inherited by bsl::CodegenContext, and bsl::SymbolParser.

Classes

struct  ScopedNote

Public Member Functions

 NodeErrorHandler (ErrorHandler &handler)
void error (Token tok, const string &msg)
void error (ast::Node node, const string &msg)
void error (std::optional< AstNodeException > &err)
void error (std::optional< TokenException > &err)
template<typename... Args>
void error (Token tok, Diag code, Args &&...args)
template<typename... Args>
void error (ast::Node node, Diag code, Args &&...args)
template<typename... Args>
ScopedNote note (Token tok, Diag code, Args &&...args)
template<typename... Args>
ScopedNote note (ast::Node node, Diag code, Args &&...args)

Public Attributes

ErrorHandler & err_handler
vector< tuple< Token, string > > note_stack = {}

Detailed Description

Definition at line 640 of file diagnostic.hh.

Constructor & Destructor Documentation

◆ NodeErrorHandler()

bsl::NodeErrorHandler::NodeErrorHandler ( ErrorHandler & handler)
inline

Definition at line 643 of file diagnostic.hh.

References err_handler.

Referenced by bsl::CodegenContext::CodegenContext(), and bsl::SymbolParser::SymbolParser().

Member Function Documentation

◆ error() [1/6]

void bsl::NodeErrorHandler::error ( ast::Node node,
const string & msg )
inline

Definition at line 660 of file diagnostic.hh.

References error(), and node.

◆ error() [2/6]

template<typename... Args>
void bsl::NodeErrorHandler::error ( ast::Node node,
Diag code,
Args &&... args )
inline

Definition at line 685 of file diagnostic.hh.

References error(), and node.

◆ error() [3/6]

void bsl::NodeErrorHandler::error ( std::optional< AstNodeException > & err)
inline

Definition at line 666 of file diagnostic.hh.

References error().

◆ error() [4/6]

void bsl::NodeErrorHandler::error ( std::optional< TokenException > & err)
inline

Definition at line 672 of file diagnostic.hh.

References error().

◆ error() [5/6]

◆ error() [6/6]

template<typename... Args>
void bsl::NodeErrorHandler::error ( Token tok,
Diag code,
Args &&... args )
inline

Definition at line 679 of file diagnostic.hh.

References bsl::diagnostic_message_get(), error(), and bsl::mini_fmt::format().

◆ note() [1/2]

template<typename... Args>
ScopedNote bsl::NodeErrorHandler::note ( ast::Node node,
Diag code,
Args &&... args )
inlinenodiscard

◆ note() [2/2]

template<typename... Args>
ScopedNote bsl::NodeErrorHandler::note ( Token tok,
Diag code,
Args &&... args )
inlinenodiscard

Member Data Documentation

◆ err_handler

ErrorHandler& bsl::NodeErrorHandler::err_handler

Definition at line 641 of file diagnostic.hh.

Referenced by error(), and NodeErrorHandler().

◆ note_stack

vector<tuple<Token, string> > bsl::NodeErrorHandler::note_stack = {}

Definition at line 691 of file diagnostic.hh.

Referenced by error(), note(), and note().


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