Skip to content

Template conditionals/repetition #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 21, 2021

Conversation

nblumhardt
Copy link
Member

@nblumhardt nblumhardt commented Mar 14, 2021

Resolves #23

  • Template tokenizer; since the template grammar is now recursive, we need a proper parser to handle it, and a tokenizer to feed it
  • New template parser
  • {#if ...} {#else if ...} {#else} {#end} conditions
  • {#each ... in ...} {#separator} {#else} {#end} repetition
  • Finish eliminating statically cached parsers to reduce working set, add user-constructable parser types for cases where many expressions/templates need to be parsed during a single application run - leaving this for now
  • Update documentation

@nblumhardt
Copy link
Member Author

You can see how the added syntax works:

I'd love to spend some time widening test coverage, but I think quite a lot of the breadth of it is being exercised through the integration tests.

@nblumhardt nblumhardt marked this pull request as ready for review March 20, 2021 08:38
@nblumhardt
Copy link
Member Author

Hmm no idea why CI isn't picking this up, will investigate.

@nblumhardt nblumhardt closed this Mar 21, 2021
@nblumhardt nblumhardt reopened this Mar 21, 2021
@nblumhardt nblumhardt closed this Mar 21, 2021
@nblumhardt nblumhardt reopened this Mar 21, 2021
@nblumhardt nblumhardt merged commit dfe2fd6 into serilog:dev Mar 21, 2021
@nblumhardt nblumhardt mentioned this pull request Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conditions and repetition
1 participant