A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::Position Struct Reference

One place in the source: the byte offset, and the line and column at it. More...

#include <cpp/a11/flow/diagnostic.h>

Public Attributes

size_t offset = 0
 
int line = 1
 
int column = 1
 

Detailed Description

One place in the source: the byte offset, and the line and column at it.

All three are carried because each consumer wants a different one. Byte offsets are what an editor edits with, line and column are what a person and a build log read, and computing one from the other needs the source text – which a diagnostic that has travelled as JSON no longer has. Lines and columns are 1-based, as a11.flow.lexer has always reported them.

Member Data Documentation

◆ column

int a11::flow::Position::column = 1

◆ line

int a11::flow::Position::line = 1

◆ offset

size_t a11::flow::Position::offset = 0

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