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

refactor(parser): add hint of how tuples are created #3845

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vit0rr
Copy link

@vit0rr vit0rr commented Nov 17, 2024

fix #3836

@vit0rr vit0rr marked this pull request as draft November 17, 2024 17:27
@vit0rr vit0rr marked this pull request as ready for review November 17, 2024 18:24
vec!["Hint: To group expressions in gleam use \"{\" and \"}\".".into()],
vec![
"Hint: To group expressions in gleam use \"{\" and \"}\".".into(),
"Hint: Tuples are created with `#(` and `)`.".into(),
Copy link
Member

Choose a reason for hiding this comment

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

Instead of putting "hint" twice, I think it would be better to use one sentence.

Copy link
Author

Choose a reason for hiding this comment

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

Agree.
Something like this?

ParseErrorType::ExprLparStart => (
    "This parenthesis cannot be understood here",
    vec![
        "Hint: To group expressions in Gleam, use \"{\" and \"}\"; tuples are created with `#(` and `)`.".into(),
    ]
),

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, or just "and"

@vit0rr vit0rr changed the title refactor(error): add hint of how tuples are created refactor(parser): add hint of how tuples are created Nov 17, 2024
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.

Hint at tuple syntax when struggling with parenthesis
2 participants