Cogs.Core
Public Attributes | List of all members
GumboSourcePosition Struct Reference

#include <gumbo.h>

Public Attributes

unsigned int line
 
unsigned int column
 
unsigned int offset
 

Detailed Description

A struct representing a character position within the original text buffer. Line and column numbers are 1-based and offsets are 0-based, which matches how most editors and command-line tools work. Also, columns measure positions in terms of characters while offsets measure by bytes; this is because the offset field is often used to pull out a particular region of text (which in most languages that bind to C implies pointer arithmetic on a buffer of bytes), while the column field is often used to reference a particular column on a printable display, which nowadays is usually UTF-8.

Definition at line 69 of file gumbo.h.

Member Data Documentation

◆ column

unsigned int GumboSourcePosition::column

Definition at line 71 of file gumbo.h.

◆ line

unsigned int GumboSourcePosition::line

Definition at line 70 of file gumbo.h.

◆ offset

unsigned int GumboSourcePosition::offset

Definition at line 72 of file gumbo.h.


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