Skip to main content
Module

x/pazza/mod.ts>spanned

Parser combinators library designed for Deno, but also works on browsers and Node.js.
Go to Latest
function spanned
import { spanned } from "https://deno.land/x/pazza@v0.3.0/mod.ts";

Execute the embedded parser, while remembering the start position and end postion.

It will return a Span<T> wrapper type, if succeeds.

This parser requires "position context".

Type Parameters

O
E
CtxIn
CtxOut

Parameters

parser: IParser<O, E, string, CtxIn, CtxOut>

embedded parser

Returns

IParser<Span<O>, E | ErrorKind.MissingPositionContext, string, CtxIn & PositionContext, CtxOut>