janet-lang / janet-lang.org

Website for janet
https://janet-lang.org
MIT License
90 stars 59 forks source link

document the (sub) PEG special #204

Closed ianthehenry closed 5 months ago

ianthehenry commented 8 months ago

What it says on the tin!

sogaiu commented 8 months ago

Thanks for submitting this :+1:

Possibly slightly clearer?

If @code`patt` also succeeds, @code`sub` will
advance the input to the end of what @code`window-patt`
matched.

or may be:

If @code`patt` also succeeds, @code`sub` will
advance the input to the end of the bytes that
@code`window-patt` matched.

?

May be those are awkward...was just trying to make a distinction between a pattern and what it matched.

ianthehenry commented 8 months ago

I think that is better -- I tweaked the language there to be basically your first suggestion.