-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: validate defcfg values in parser (#624)
1. Move validation of cfg values to `parse_defcfg` instead of validating them all over the codebase. Reason: before kanata didn't show location when parsing of a cfg value failed, now it does. 2. Replace `HashMap<String, String>` with `CfgOptions`, which holds only validated cfg values. Reason: Allows to easily parse lists as values, since now the actual value parsing is no longer delayed after parser function exited. This was done with #121 in mind. 3. Move cfg options defaults to a `CfgOptions::default`. Reason: it's good to have similar code in one place.
- Loading branch information
Showing
10 changed files
with
623 additions
and
542 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.