apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
301 stars 54 forks source link

Restructuring into `packages` #782

Closed tjanc closed 4 years ago

tjanc commented 4 years ago

All dependencies including drafter are now contained flat in ./packages/:

Intent on making the memory representation of our syntax tree available without dependence on parsing logic, I have introduced ./packages/apib/ to contain API Blueprint specific declarations and semantics. Currently it only contains media type definitions moved from ./src/parser, but the intent is to declare new syntax definitions here instead of ./packages/apib-parser/grammar/.

klokane commented 4 years ago

I'm not sure if it is good idea to introduce apib-parser instead of snowcrash. It can be also little bit confusing hold sundown separately from combo snowcrash/markdown-parser

tjanc commented 4 years ago

@klokane

All standalone projects, whether external dependencies or projects developed in this repository, should now be layed out flat in ./packages. The build system should handle the structure of dependencies.

The API Blueprint parser apib-parser is a standalone project. Currently (before this PR) it is composed of:

We will be throwing away most of snowcrash and markdown-parser code during the PEGTL rewrite, replacing it with grammars. I want to keep a clean set of dependencies for that precious new code :). So it only makes sense to isolate this logic into a seperate library.

To be honest, adding apib and apib-parser I think is very moderate, and I ended there to avoid bloating this PR.

We should continue splitting up the monolith of drafter introducing apie, drafter-cli next. There is even this old commit from Pavan (10d78fe7a) coming with the comment librefract parts - will be separated into other project in ./drafter.gyp showing the intent of isolating API Elements logic early on.