Skip to main content

Pos

Type Alias Pos 

Source
pub type Pos = u32;
Expand description

A source position: one past the UTF-8 byte offset of a token in the text the node was parsed from, so 0 means “none” (a synthetic node, or text the parser could not map back — see Parser::spans). The compiler stores it in the lines entry of the op the node lowers to, and the loader rebases it into the host’s source address space, which is what an error’s source arrow and a stack frame’s file:line:column are read from.