Feature/scanner/explict key #21
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: dolysis/yary#21
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature/scanner/explict-key"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds support for explicit keys, and fixes an issue with tokenization of zero indented block sequences.
Components
Scanner
BlockSequenceStart
&BlockSequenceEnd
tokens for zero indented sequencesZero indentation
The following YAML documents are equivalent:
and should produce the same tokens:
However, due to how the Scanner handles block scopes -- namely that it requires an indentation increase to enter a sub scope -- the two commented
Token
s above would be omitted from the token stream for the second document.Fixing this was tricky, as mostly we do not want to increase block scope without an indentation level, except in the following case:
This was an interesting problem to solve.