# E4216

Compiler diagnostic name: `lexscan_catchall_binder_not_supported`.

A streaming `lexscan` catch-all case uses a binder pattern.

Streaming cases consume input only when a regex matches. The final catch-all
also handles end of input, so it does not bind a matched substring. Use `_` for
that case and bind text with `as` on the regex cases that need it.

## Erroneous example

```{literalinclude} /sources/error_codes/4216_error/top.mbt
:language: moonbit
```

## Suggestion

Replace the catch-all binder with `_`.

```{literalinclude} /sources/error_codes/4216_fixed/top.mbt
:language: moonbit
```
