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

chore(stdlib)!: Add Types Aliases to regex lib #1036

Conversation

spotandjake
Copy link
Member

closes: #692 .

stdlib/regex.md Outdated Show resolved Hide resolved
@spotandjake
Copy link
Member Author

Alright Requested Changes Have Been Made

@phated
Copy link
Member

phated commented Nov 29, 2021

@spotandjake The suggestion was not only to change those 2 specifically. Those variants contain comments after each that describe what the random Bool/Number/etc types represent. We want to have type aliases for all of them so the comments aren't necessary.

@spotandjake
Copy link
Member Author

@spotandjake The suggestion was not only to change those 2 specifically. Those variants contain comments after each that describe what the random Bool/Number/etc types represent. We want to have type aliases for all of them so the comments aren't necessary.

Ah think I fixed my mistake there

stdlib/regex.gr Outdated Show resolved Hide resolved
@phated phated requested a review from peblair November 29, 2021 02:17
@phated
Copy link
Member

phated commented Nov 29, 2021

I also want to get @peblair's eyes on this since he opened the issue and wrote rege

Copy link
Member

@peblair peblair left a comment

Choose a reason for hiding this comment

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

@spotandjake Thanks for this PR! I spoke about the above conversation with the team, and I think we want to pare back down some of the suggested type aliases. If you could revert the following, then I think this is in a place to get merged:

I'm pretty sure that'd cover everything. With that, I'm happy to give this a final scan and give this a final approval.

@peblair peblair changed the title chore(stdlib): Add Types Aliases to regex lib chore(stdlib)!: Add Types Aliases to regex lib Dec 2, 2021
@spotandjake
Copy link
Member Author

@peblair feel free to review it now i reverted those changes

Copy link
Member

@peblair peblair left a comment

Choose a reason for hiding this comment

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

Thank you!

stdlib/regex.gr Outdated Show resolved Hide resolved
@@ -387,7 +394,7 @@ enum ParsedRegularExpression {
RELookbehind(ParsedRegularExpression, Bool, Box<Number>, Box<Number>, Number, Number), // regex, is-match, lb-min, lb-max, n-start, num-n (lb-xx values patched in later)
RECut(ParsedRegularExpression, Number, Number, Bool), // regex, n-start, num-n, needs-backtrack
REReference(Number, Bool), // n, case-sensitive
RERange(List<(Number, Number)>),
RERange(RERange),
Copy link
Member

Choose a reason for hiding this comment

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

How is RERange(RERange) used? Do consumers need to have access to the list?

Copy link
Member

Choose a reason for hiding this comment

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

Nah, they don't.

Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Approving, assuming the answer to my question is "no, consumers don't need access to it"

@peblair peblair requested a review from ospencer March 3, 2022 20:15
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Thanks again @spotandjake!

@ospencer ospencer merged commit a926ea5 into grain-lang:main Mar 6, 2022
@github-actions github-actions bot mentioned this pull request Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use a type alias for RERange in regular expression module
6 participants