Merged
Conversation
|
One of the tests failed for 772a864. @admin check logs None, packit dashboard https://dashboard.packit.dev/jobs/copr/3207702 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/10083085/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix YAML parsing with
glz::genericFixes #2286
Summary
YAML parsing now works with
glz::generictypes. Previously, attempting to parse YAML into aglz::genericwould fail with a template instantiation error because the YAML variant parser lacked the type detection logic present in the JSON parser.Changes
YAML Variant Parser Enhancement (
yaml/read.hpp)Added sophisticated type detection for YAML variants, similar to JSON's approach:
Type detection via syntax: The parser now examines the first character to determine the appropriate variant type:
{→ object (flow mapping)[→ array (flow sequence)"or'→ stringt/T,f/F→ boolean (true/false)n/N,~→ null-,+,.→ numberNew type traits: Added
yaml_variant_*concepts and traits for variant type classificationNew
from<YAML, std::nullptr_t>handler: Parses YAML null values (null,Null,NULL,~)Fixed
glaze_value_thandler: Now usesstd::decay_tto properly strip reference qualifiers, matching the JSON implementationLookup Tables (
yaml/common.hpp)Added 256-byte lookup tables for efficient character classification:
plain_scalar_end_table- Characters that terminate plain scalarswhitespace_or_line_end_table- Whitespace and line endingsline_end_or_comment_table- Line endings and comment markerflow_context_end_table- Flow context terminatorsThese replace long character comparison chains throughout the YAML parsing code for better performance.