Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regular and literal strings #964

Merged
merged 25 commits into from
Dec 30, 2023
Merged

regular and literal strings #964

merged 25 commits into from
Dec 30, 2023

Conversation

phlptp
Copy link
Collaborator

@phlptp phlptp commented Dec 25, 2023

Add escaping to quoted strings, differentiate between literal and regular strings.

The goal is to make string processing in config files as close as possible to toml standards. This means handing escape sequences including unicode, and differentiating between literal strings and regular strings in files and when splitting the command line. Also allowing variable names in the files to be quoted.

This PR gets partway there. Removes some hacks from the previous PR to deal with unusual option names and replaces with the quoted names.

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3bc2739) 100.00% compared to head (82d7d74) 100.00%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #964    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           18        18            
  Lines         4175      4492   +317     
==========================================
+ Hits          4175      4492   +317     

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

@phlptp
Copy link
Collaborator Author

phlptp commented Dec 28, 2023

@henryiii this PR handles string literals and escaped string differently including unicode escape sequences. Basically working towards more complete TOML compliance. The next one will add a few more capabilities like a transformer that can handle escaped strings and some additional documentation on the topic. This changes the way a few edge cases are handled, and fixes a few more edge cases the fuzzer caught. I will merge this on 2023-12-30 unless you have some comments or issues.

@phlptp phlptp requested a review from henryiii December 28, 2023 15:02
@phlptp phlptp merged commit 91220ba into CLIUtils:main Dec 30, 2023
49 checks passed
@phlptp phlptp deleted the quoted_strings branch December 30, 2023 14:54
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