SourceLocation.fromPosition

Retrieves the source location associated with a given file/line/column in a particular translation unit. TODO consider moving to TranslationUnit instead

struct SourceLocation
static
fromPosition
(,,
uint line
,
uint offset
)

Parameters

tu TranslationUnit

translation unit to derive location from.

file File

a file in tu.

line uint

text line. Starting at 1.

offset uint

offset into the line. Starting at 1.

Meta