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

String pattern alias #2295

Merged
merged 11 commits into from
Sep 7, 2023
Merged

Conversation

giacomocavalieri
Copy link
Member

This should close #2294 and #2243

@giacomocavalieri giacomocavalieri force-pushed the string-pattern-alias branch 2 times, most recently from a65d40c to 5660168 Compare August 16, 2023 19:22
@lpil
Copy link
Member

lpil commented Sep 4, 2023

Hi @giacomocavalieri ! Would you like me to pick this work?

@giacomocavalieri giacomocavalieri marked this pull request as ready for review September 4, 2023 16:15
@giacomocavalieri
Copy link
Member Author

giacomocavalieri commented Sep 4, 2023

@lpil sorry if it took me quite some time, I think the PR is ready for review now 👍

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Fab!

@@ -676,6 +693,7 @@ impl ValueConstructor {
pub(crate) fn get_documentation(&self) -> Option<&str> {
match &self.variant {
ValueConstructorVariant::LocalVariable { .. } => Some("A locally defined variable."),
ValueConstructorVariant::LocalConstant { .. } => Some("A locally defined constant."),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ValueConstructorVariant::LocalConstant { .. } => Some("A locally defined constant."),
ValueConstructorVariant::LocalConstant { .. } => Some("A locally defined variable."),

This is an implementation detail of the compiler, it's still a regular variable from the user's point of view.

@lpil lpil merged commit d7a3fbf into gleam-lang:main Sep 7, 2023
10 checks passed
@giacomocavalieri giacomocavalieri deleted the string-pattern-alias branch September 7, 2023 09:11
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.

✨ Allow assigning names to string prefix patterns.
2 participants