PathParser

Pure utility for tokenizing the dotted/bracketed strings carried by FieldError.path. Lives in KSLCore so non-Swing consumers (test harnesses, CLI tools, log surfaces) can use it without dragging in a GUI dependency.

The parser is forgiving: malformed bracket sections are treated as literal name characters rather than raising errors. Validation paths originate inside the substrate (the validators construct them programmatically), so well-formed input is the common case and a loud failure on garbage input would convert a display problem into a crash.

Functions

Link copied to clipboard
fun isAtOrBelow(prefix: String, candidate: String): Boolean

True when prefix is at the same segment boundary as a prefix of candidate — i.e. either equals it or names an ancestor in the dotted-bracket tree.

Link copied to clipboard

Splits path into its constituent segments.