Skip to content
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

Feature/scanner/block indicators #20

Merged
merged 8 commits into from
Aug 1, 2021
Merged

Conversation

bazaah
Copy link
Contributor

@bazaah bazaah commented Aug 1, 2021

This PR adds block indicator support to the Scanner. It also tightens up the handling of stale / expired possible keys, and adds unit tests for both cases.

Components

  • Support BlockSequenceStart, BlockMappingStart BlockEnd tokens (indentation levels)
  • Support BlockEntry token (-)
  • Fix subtle bug in Scanner.value saved key validation
  • Add tests for the above

As we need to be able to reset the indents to nil/starting in the
scanner
Also reorganized the main loop of scan_next_token, adding comment
placeholders for the remaining missing token fetchers
Before we only checked for the existence of a saved key, but *didn't*
also check that it was still valid / possible.

This lead to a subtle error wherein scalar that weren't valid keys
(anymore) would still be picked up and used.
@bazaah bazaah merged commit 76acbeb into master Aug 1, 2021
@bazaah bazaah deleted the feature/scanner/block-indicators branch August 1, 2021 16:21
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.

1 participant