Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Source_Snippet Struct Reference

Render-ready excerpt for a single source line. More...

#include <ah-source.H>

Collaboration diagram for Aleph::Source_Snippet:
[legend]

Public Attributes

std::string file_name
 File name owning the snippet.
 
size_t line = 1
 1-based line number.
 
size_t column = 1
 1-based begin column.
 
std::string line_text
 Raw line contents without trailing newline.
 
size_t highlight_column = 1
 1-based column where the underline starts.
 
size_t highlight_width = 1
 Width of the underline, always >= 1.
 

Detailed Description

Render-ready excerpt for a single source line.

Snippets are derived from a Source_Span and prepared for plain-text diagnostic rendering. The highlight is clipped to a single line.

Definition at line 163 of file ah-source.H.

Member Data Documentation

◆ column

size_t Aleph::Source_Snippet::column = 1

1-based begin column.

Definition at line 167 of file ah-source.H.

◆ file_name

std::string Aleph::Source_Snippet::file_name

File name owning the snippet.

Definition at line 165 of file ah-source.H.

◆ highlight_column

size_t Aleph::Source_Snippet::highlight_column = 1

1-based column where the underline starts.

Definition at line 169 of file ah-source.H.

◆ highlight_width

size_t Aleph::Source_Snippet::highlight_width = 1

Width of the underline, always >= 1.

Definition at line 170 of file ah-source.H.

◆ line

size_t Aleph::Source_Snippet::line = 1

1-based line number.

Definition at line 166 of file ah-source.H.

Referenced by Aleph::Diagnostic_Engine::render_label_snippet().

◆ line_text

std::string Aleph::Source_Snippet::line_text

Raw line contents without trailing newline.

Definition at line 168 of file ah-source.H.


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