interface Token

A run of source, and what nvim's treesitter queries would capture it as.

Properties

start: number

Index of the first character.

end: number

Index after the last character.

capture: string

An nvim capture name — @keyword.return, @string, @punctuation.bracket.

Usage

import { type Token } from "lib/repl/highlight.ts";