ParseOverlay

sealed interface ParseOverlay

Type-safe representation of a NestedParse overlay.

An overlay specifies which regions of a node contain the nested language:

  • Ranges provides explicit TextRanges

  • Predicate evaluates child nodes, returning a TextRange for matching children (or the child's full range when the predicate returns true)

Inheritors

Types

Link copied to clipboard
data class Predicate(val match: (SyntaxNodeRef) -> ParseOverlayMatch?) : ParseOverlay
Link copied to clipboard
data class Ranges(val ranges: List<TextRange>) : ParseOverlay