Repository navigation
Conversation
The TOML and YAML loaders each carried a full copy of the field-expansion macros, and the same error block was repeated about 25 times. Both loaders now call one apply_setting, parameterised by a small dialect struct (string parser, array parser, the STR error wording). The double-quoted escape handling, previously written twice, is one helper, and error reporting goes through set_error. Behaviour is unchanged: all 46 ctest targets pass, and the rendered error messages are identical (the two STR wordings are now a per-dialect suffix on one format string). Refs #89 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Owner
Author
|
Replaced by #107 (branch renamed to type/slug so the flow / conventions check passes). Same commits and content. |
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.
Refs #89 (table-driven config parsing; the route-helper and registry parts of #89 are separate PRs).
What this changes
cpp/metalbear/config_file.cpp: the TOML and YAML loaders shared the same seven-macro expansion, copied in full. They now both call oneapply_setting, parameterised by a small dialect struct (string parser, array parser, STR error wording).unescape_basichelper.set_errorinstead of ~25 copies of the same block.Verification
ctest(Debug, pcre2 from Homebrew): 46/46 pass, same as the baseline.Docs
None needed: internal refactor with no user-facing behaviour, config or API change.
Changelog: none — internal refactor, no behaviour change.
🤖 Generated with Claude Code