Skip to content

Adds support for case insensitivity #168

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

Merged
merged 3 commits into from
Feb 21, 2022

Conversation

natecook1000
Copy link
Member

We don't want to do this all through consumer functions, but this allows for case insensitive matching throughout.

@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit 43ae710 into swiftlang:main Feb 21, 2022
return consumeScalar {
isCaseInsensitive
? $0.properties.lowercaseMapping == s.properties.lowercaseMapping
: $0 == s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still feel like there's quite a bit of duplicated code throughout. Would a helper function, similar to how consumeScalar is a helper function for making predicate-based scalar consumers, alleviate this some? Maybe something that is parameterized over case sensitivity?

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.

2 participants