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

feat: choiceOf component #10

Merged
merged 5 commits into from
Dec 12, 2023
Merged

feat: choiceOf component #10

merged 5 commits into from
Dec 12, 2023

Conversation

mdjastrzebski
Copy link
Member

@mdjastrzebski mdjastrzebski commented Dec 6, 2023

Summary

Added choiceOf component implementing the alternative (|) operator. This is a very powerful operator, as it can be applied to simple text as well as nested regex expressions. Due to it's very low priority, the passed options needs to be wrapped in group in most cases.

Resolves #4

Test plan

Added relevant tests.

@mdjastrzebski mdjastrzebski force-pushed the feat/choice-of branch 3 times, most recently from 1b29711 to f3d87a7 Compare December 7, 2023 17:59
@mdjastrzebski mdjastrzebski marked this pull request as ready for review December 7, 2023 18:00
@mdjastrzebski mdjastrzebski changed the title feat: choiceOf component [WIP] feat: choiceOf component Dec 7, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b40c925) 97.95% compared to head (6336227) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main       #10      +/-   ##
===========================================
+ Coverage   97.95%   100.00%   +2.04%     
===========================================
  Files           5         6       +1     
  Lines          49        57       +8     
  Branches        7         8       +1     
===========================================
+ Hits           48        57       +9     
+ Misses          1         0       -1     

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

@mdjastrzebski mdjastrzebski force-pushed the feat/choice-of branch 2 times, most recently from 7ad70c6 to 5bddb8c Compare December 7, 2023 18:16
@mdjastrzebski mdjastrzebski changed the title [WIP] feat: choiceOf component feat: choiceOf component Dec 11, 2023
Copy link
Member

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

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

💪

@mdjastrzebski mdjastrzebski merged commit e64701b into main Dec 12, 2023
3 checks passed
@mdjastrzebski mdjastrzebski deleted the feat/choice-of branch December 12, 2023 13:08
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.

feat: implement choiceOf component
3 participants