import { type Matcher } from "https://deno.land/x/ohm_js@v17.4.0/index.d.ts";
Matcher objects are used to incrementally match a changing input against a Grammar, e.g. in an editor or IDE.
Methods
replaceInputRange(): Matcher
startIdx: number,
endIdx: number,
str: string,
Edit the current input string, replacing the characters between
startIdx
and endIdx
with str
.
match(optStartRule?: string): MatchResult
Like Grammar#match, but operates incrementally.