liquid-rust icon indicating copy to clipboard operation
liquid-rust copied to clipboard

Get the parser out of the public API

Open epage opened this issue 5 years ago • 1 comments

We have a thing wrapper around pest that is exposed in liquids API

  • The bridge creates extra work
  • We are limited in evolving the bridge's API

Ideally the parser would not be exposed at all. To do this, we'd need parser details taken out of APIs that need to parse, like tag and block parser traits.

epage avatar Mar 16 '20 16:03 epage

My thought for how to handle this is to allow "partial parsing". The tag/block parsing trait gets passed a &str and returns the &str from where it left off. It can then implement the parser however it wants.

epage avatar Mar 16 '20 16:03 epage