Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pbkit/core/parser/recursive-descent-parser.ts>RecursiveDescentParser

Protobuf toolkit for modern web development
Latest
interface RecursiveDescentParser
implements EventEmitter<T>
import { type RecursiveDescentParser } from "https://deno.land/x/pbkit@v0.0.72/core/parser/recursive-descent-parser.ts";

Type Parameters

optional
T extends Record<string, any> = any

Properties

readonly
input: string
loc: number
offsetToColRow: (offset: number) => ColRow
colRowToOffset: (colRow: ColRow) => number
getAroundText: (
loc: number,
length?: number,
window?: number,
) => string

Methods

try(pattern: Pattern): Token | undefined
accept(pattern: Pattern): Token | undefined
expect(
acceptPattern: Pattern,
expectedPatterns?: Pattern[],
mistakePatterns?: Pattern[],
): Token