KbSourceLocation
The position of a failing expression within the template source.
Constructors
Properties
the 0-based position within line of the start of the expression, counted in Unicode code points rather than UTF-16 code units (Kotlin's native String/Char indexing). A character outside the Basic Multilingual Plane (for example, an emoji) is one code point — and therefore one unit of column — even though it occupies two UTF-16 Chars in the underlying Kotlin String. This follows from the ANTLR Kotlin runtime's StringCharStream, which indexes by decoded code point, not by raw Char.
the verbatim slice of template source for the expression (for example, "price | divided_by: qty").
the chain of templates that led to this location, outermost first. The first element is always KbTemplateOrigin.Root; each subsequent element is a KbTemplateOrigin.Partial whose key identifies the partial entered next. A location captured entirely within the root template has a single-element stack [Root]. The stack is stamped at render time when a failure is reported; parse-time construction always starts with [Root].