# parseWithRest

Parses route atoms and returns both AST nodes and unconsumed input.

## Signatures

```ts
export declare function parseWithRest(input: string): RuntimeParseResult;
```

## Why

The runtime grammar can be embedded while preserving where parsing stopped.

## Ownership and lifetime

`parseWithRest` parses immediately and returns fresh AST array state; it retains neither the input string nor parser cursor.

## Examples

```ts
import { parseWithRest } from "@typed/router/Path"

const [ast, rest] = parseWithRest("/users/:id?tab=:tab? trailing")
```
