highlight-spans
highlight-spans parses ObjectScript source with Tree-sitter and returns semantic highlight ranges as (attr_id, start_byte, end_byte) spans plus an attribute table.
What You Get
SpanHighlighterfor highlighting source bytes or line slices.HighlightResult { attrs, spans }where:attrsmapsattr_id -> capture_namespanscontains byte ranges tagged byattr_id
Grammarvariant:ObjectScript(backed byLANGUAGE_OBJECTSCRIPT_PLAYGROUND)
Quick Example
use ;
Typical Next Step
Use theme-engine to resolve capture_name into styles, then pass styled ranges to a renderer (for example render-ansi).