Feature/scalar/plain #22

Merged
bazaah merged 13 commits from feature/scalar/plain into master 2021-08-14 18:59:07 +00:00
bazaah commented 2021-08-14 14:13:32 +00:00 (Migrated from github.com)

This PR adds support for plain scalars to the Scanner.

Components

  • New error variant, InvalidPlainScalar for plain scalars that start with an illegal character
  • New function scan_plain_scalar the handles the processing of YAML plain scalars
  • Glue + guard functions, Scanner.is_plain_scalar Scanner.plain_scalar & is_plain_safe_c
  • Unit tests for the above

Notes

As noted in the commit message, I currently knowingly incorrectly handle "JSON like" keys in flow contexts:

It is compliant with the YAML spec, _except_ for its handling
of "JSON like" keys, which allow for the following value token (e.g ':')
to _not_ have a whitespace following it.
This PR adds support for plain scalars to the `Scanner`. ## Components - New error variant, `InvalidPlainScalar` for plain scalars that start with an illegal character - New function `scan_plain_scalar` the handles the processing of YAML plain scalars - Glue + guard functions, `Scanner.is_plain_scalar` `Scanner.plain_scalar` & `is_plain_safe_c` - Unit tests for the above ## Notes As noted in the commit message, I currently knowingly incorrectly handle "JSON like" keys in flow contexts: ``` It is compliant with the YAML spec, _except_ for its handling of "JSON like" keys, which allow for the following value token (e.g ':') to _not_ have a whitespace following it. ```
Sign in to join this conversation.
No description provided.