Skip to content

Commit

Permalink
docs: Document internals
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Jul 31, 2023
1 parent 951aa2d commit 1f913bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ In both cases a `RequirementsSyntaxError` will be thrown if the provided content
To make use of the resulting data, look up what `Requirement` is made up of in [`types.ts`](https://github.com/Twixes/pip-requirements-js/blob/main/src/).

The above is pretty much all you need to know!

## Internals

The core of this library is [pep-508.ohm](https://github.com/Twixes/pip-requirements-js/blob/main/src/pep-508.ohm), which is a port of the [complete dependency specification grammar of PEP 508](https://peps.python.org/pep-0508/#complete-grammar). The original syntax is defined for Parsley, while pip-requirements-js uses [Ohm](https://github.com/ohmjs/ohm) – a robust _pure-JS_ parser generator. It's this combination of solutions that provides peace of mind in terms of parsing correctness.

0 comments on commit 1f913bc

Please sign in to comment.