Skip to content

Improve scalar_style_choose() to account for flow/block mode:#606

Merged
biojppm merged 2 commits into
masterfrom
scalar_style_choose
May 22, 2026
Merged

Improve scalar_style_choose() to account for flow/block mode:#606
biojppm merged 2 commits into
masterfrom
scalar_style_choose

Conversation

@biojppm
Copy link
Copy Markdown
Owner

@biojppm biojppm commented May 21, 2026

  • this enables stable-style roundtrips of block-mode plain scalars with characters invalid in flow mode:
    # these scalars were previously emitted as single-quoted style
    - doe: a deer, a female deer
    - (10,11)
    - also scalars containing [] and {}
    • scalar_style_choose() was split into scalar_style_choose_{flow,block}()
    • scalar_style_query_plain() was split into scalar_style_query_plain_{flow,block}()
    • NodeType::type_str(NodeType,flags): remove zero-termination, use common approach of returning required size
    • Add NodeType::type_str_sub()

@biojppm biojppm changed the base branch from fix/parser to master May 21, 2026 01:10
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (efb27ee) to head (580ebb8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #606      +/-   ##
==========================================
+ Coverage   98.84%   99.08%   +0.23%     
==========================================
  Files          43       43              
  Lines       13789    13869      +80     
==========================================
+ Hits        13630    13742     +112     
+ Misses        159      127      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@biojppm biojppm force-pushed the scalar_style_choose branch 2 times, most recently from 5dce9ae to a97edb8 Compare May 21, 2026 22:42
biojppm added 2 commits May 22, 2026 01:02
this enables stable-style roundtrips of block-mode plain scalars with characters invalid in flow mode:
  ```yaml
  # these scalars were previously emitted as single-quoted style
  - doe: a deer, a female deer
  - (10,11)
  - also scalars containing [] and {}
  ```
  - `scalar_style_choose()` was split into `scalar_style_choose_{flow,block}()`
  - `scalar_style_query_plain()` was split into `scalar_style_query_plain_{flow,block}()`
  - `NodeType::type_str(NodeType,flags)`: remove zero-termination, use common approach of returning required size
  - Add `NodeType::type_str_sub()`
@biojppm biojppm force-pushed the scalar_style_choose branch from a97edb8 to 580ebb8 Compare May 22, 2026 00:03
@biojppm biojppm merged commit 60e0aef into master May 22, 2026
288 checks passed
@biojppm biojppm deleted the scalar_style_choose branch May 22, 2026 03:11
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request May 23, 2026
-----------------------------------------------------------------------------------
eden.mk 9b18d0b1113fb2b73acc539d2e4dfae85e511cd4 # Version: Commits on May 22, 2026
-----------------------------------------------------------------------------------
[tools]  refactor, use #!/bin/sh, update license files (#3998)

-----------------------------------------------------------------------------------
ymir.mk 9f3425a1cd8f70e731179b0ca3fca04b0489d28c # Version: Commits on May 22, 2026
-----------------------------------------------------------------------------------
chore(app): Removed graphics backend option as it served no purpose at this time

Ymir will rely on the default backend used by the SDL3 Renderer API, which should be compatible with most systems.

GPU rendering will include a rewrite of the app's graphics subsystem, moving away from SDL Renderer to our own implementation.,

-------------------------------------------------------
rapidyaml.mk v0.13.0 # Version: Commits on May 22, 2026
-------------------------------------------------------
- [PR#606](biojppm/rapidyaml#606): scalar style utilities now are specific to flow/block mode. This enables stable-style roundtrips of block-mode plain scalars with characters invalid in flow mode:

  ```yaml

  # these scalars were previously emitted as single-quoted style

  # because they were conservatively assumed to be in flow mode.

  - doe: a deer, a female deer

  - (10,11)

  - also scalars containing [] and {}

  ```

  - `scalar_style_choose()` was split into `scalar_style_choose_{flow,block}()`

  - `scalar_style_query_plain()` was split into `scalar_style_query_plain_{flow,block}()`

  - `NodeType::type_str(NodeType,flags)`: remove zero-termination, use common approach of returning required size

  - Add `NodeType::type_str_sub()`

- [PR#605](biojppm/rapidyaml#605): fix parse errors:

  - `:` and `#` on continuation lines of multiline plain scalars:

     ```yaml

     [plain

      :scalar] # leading colon belongs to the scalar

     ```

  - Tabs inside quoted scalars opening a map were mistook for indentation tabs:

    ```yaml

    foo:

      '\\ta': b

    ```

- [PR#604](biojppm/rapidyaml#604): add `string_view` and `span` to the `c4/yml/std/std.hpp` interop umbrella header.

- Fix [600](biojppm/rapidyaml#600): shared symbols not exported in clang on Windows ([PR#601](biojppm/rapidyaml#601)).

- Fix [256](biojppm/rapidyaml#256): installation directory on Linux 64bit ([PR#599](biojppm/rapidyaml#599)). See also original fix at [cmake#16](biojppm/cmake#16). Big thanks to @GabrielBarrantes and @musicinmybrain, not just for their fixes but also for all their downstream work!

- [PR#591](biojppm/rapidyaml#591): Add missing includes to avoid compilation warning. Thanks @GabrielBarrantes!

- Update c4core to [0.3.0](https://github.com/biojppm/c4core/releases/tag/v0.3.0).

### Thanks

 - @GabrielBarrantes

 - @musicinmybrain

,

-------------------------------------------------------------------------------------------------
libretro-geargrafx.mk 15e31680428046281b4457d126f503d8ab8e2f8f # Version: Commits on May 22, 2026
-------------------------------------------------------------------------------------------------
Fix scsi audio command completion. Fix #125,

-----------------------------------------------------------------------------------------------------
libretro-mame2003-plus.mk 45f7a7f89f60aa1da6e6a136bbc1d1adeea8af91 # Version: Commits on May 22, 2026
-----------------------------------------------------------------------------------------------------
Rom ignore (#2022)

* add rom ignore

* fix gng romloads,

----------------------------------------------------------------------------------------------
libretro-stella.mk 7cb8757b44e563e67cdd4a59be19aab7e2b139ee # Version: Commits on May 22, 2026
----------------------------------------------------------------------------------------------
Cleaned up EventMappingWidget, removing some FIXME's.,
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