Blender V5.3
bsl::SourceLocation Struct Reference

Represents a specific position within a source file or included sub-file. More...

#include <source_location.hh>

Public Member Functions

 SourceLocation (Token tok)
 operator string () const

Public Attributes

Token tok

Friends

bool operator<= (const SourceLocation &a, const SourceLocation &b)
bool operator< (const SourceLocation &a, const SourceLocation &b)

Detailed Description

Represents a specific position within a source file or included sub-file.

SourceLocation wraps a lexical Token to provide formatted string representations (e.g., file.hh:12:5) for diagnostic output, as well as ordering operators to compare token positions across translation units and #include hierarchies.

Definition at line 26 of file source_location.hh.

Constructor & Destructor Documentation

◆ SourceLocation()

bsl::SourceLocation::SourceLocation ( Token tok)
inline

Definition at line 29 of file source_location.hh.

References tok.

Referenced by operator<, and operator<=.

Member Function Documentation

◆ operator string()

bsl::SourceLocation::operator string ( ) const
inline

Definition at line 31 of file source_location.hh.

References to_string(), and tok.

◆ operator<

bool operator< ( const SourceLocation & a,
const SourceLocation & b )
friend

Definition at line 43 of file source_location.hh.

References b, lexit::Token::index_, SourceLocation(), and tok.

◆ operator<=

bool operator<= ( const SourceLocation & a,
const SourceLocation & b )
friend

Definition at line 37 of file source_location.hh.

References b, lexit::Token::index_, SourceLocation(), and tok.

Member Data Documentation

◆ tok


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