struct HighlightRule
Swift
struct HighlightRule
A pattern-to-style mapping, applied per line.
Styles are indices, not colours: LavaText has no colour type and
should not grow one. The view owns a palette and resolves indices against
it, which also means a theme swap restyles code without touching rules.
Sources/LavaText/Highlighting.swift:8
Constructors
init(pattern: String, styleIndex: Int, priority: Int = 0)
Not documented.
Sources/LavaText/Highlighting.swift:15
Properties
var pattern: String
Not documented.
Sources/LavaText/Highlighting.swift:9
var priority: Int
Higher wins where spans overlap. Keywords should outrank identifiers; comments and strings should outrank both.
Sources/LavaText/Highlighting.swift:13
var styleIndex: Int
Not documented.
Sources/LavaText/Highlighting.swift:10