FE 0.15.0
A C++23 toolkit for writing compiler/interpreter frontends.
Loading...
Searching...
No Matches
fe::Dbg Struct Reference

The debug info of an entity: where it came from and what it was called. More...

#include <fe/dbg.h>

Classes

struct  Hash
struct  Eq

Public Member Functions

Constructors
constexpr Dbg () noexcept=default
constexpr Dbg (const Dbg &) noexcept=default
constexpr Dbg (Loc loc, Sym sym) noexcept
constexpr Dbg (Loc loc) noexcept
constexpr Dbg (Sym sym) noexcept
Dbgoperator= (const Dbg &) noexcept=default
Getters
constexpr Sym sym () const noexcept
constexpr Loc loc () const noexcept
constexpr bool is_anon () const noexcept
 Assumes _ as the anonymous name.
constexpr operator bool () const noexcept
Setters
constexpr Dbgset (Sym sym) noexcept
constexpr Dbgset (Loc loc) noexcept

Friends

std::ostream & operator<< (std::ostream &os, const Dbg &dbg)

Comparison and Hashing

constexpr bool operator== (const Dbg &other) const noexcept
template<class H>
AbslHashValue (H h, Dbg dbg) noexcept

Detailed Description

The debug info of an entity: where it came from and what it was called.

Definition at line 22 of file dbg.h.

Constructor & Destructor Documentation

◆ Dbg() [1/5]

fe::Dbg::Dbg ( )
constexprdefaultnoexcept

◆ Dbg() [2/5]

fe::Dbg::Dbg ( const Dbg & )
constexprdefaultnoexcept

References Dbg().

◆ Dbg() [3/5]

fe::Dbg::Dbg ( Loc loc,
Sym sym )
inlineconstexprnoexcept

Definition at line 28 of file dbg.h.

References Dbg(), loc(), and sym().

◆ Dbg() [4/5]

fe::Dbg::Dbg ( Loc loc)
inlineconstexprnoexcept

Definition at line 31 of file dbg.h.

References loc().

◆ Dbg() [5/5]

fe::Dbg::Dbg ( Sym sym)
inlineconstexprnoexcept

Definition at line 33 of file dbg.h.

References sym().

Member Function Documentation

◆ is_anon()

bool fe::Dbg::is_anon ( ) const
inlineconstexprnoexcept

Assumes _ as the anonymous name.

Definition at line 43 of file dbg.h.

References sym().

◆ loc()

Loc fe::Dbg::loc ( ) const
inlineconstexprnoexcept

Definition at line 41 of file dbg.h.

Referenced by Dbg(), Dbg(), and set().

◆ operator bool()

fe::Dbg::operator bool ( ) const
inlineexplicitconstexprnoexcept

Definition at line 44 of file dbg.h.

References sym().

◆ operator=()

Dbg & fe::Dbg::operator= ( const Dbg & )
defaultnoexcept

References Dbg().

◆ operator==()

bool fe::Dbg::operator== ( const Dbg & other) const
inlineconstexprnoexcept
Note
Like Loc::operator==, this only compares Loc::src by pointer identity.

Definition at line 56 of file dbg.h.

References Dbg().

◆ set() [1/2]

Dbg & fe::Dbg::set ( Loc loc)
inlineconstexprnoexcept

Definition at line 50 of file dbg.h.

References Dbg(), and loc().

◆ set() [2/2]

Dbg & fe::Dbg::set ( Sym sym)
inlineconstexprnoexcept

Definition at line 49 of file dbg.h.

References Dbg(), and sym().

◆ sym()

Sym fe::Dbg::sym ( ) const
inlineconstexprnoexcept

Definition at line 40 of file dbg.h.

Referenced by Dbg(), Dbg(), is_anon(), operator bool(), operator<<, and set().

◆ AbslHashValue

template<class H>
H AbslHashValue ( H h,
Dbg dbg )
friend

Definition at line 72 of file dbg.h.

References Dbg().

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Dbg & dbg )
friend

Definition at line 81 of file dbg.h.

References Dbg(), and sym().


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