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

Add support for sigils containing integers #13448

Merged
merged 10 commits into from
May 17, 2024

Conversation

starbelly
Copy link
Contributor

This commit adds support for sigils containing integers. Integers must be proceeded by an upper case alpha, but can otherwise be mixed (e.g., ~A1B2C3).

This commit adds support for sigils containing integers. Integers must be proceeded
by an upper case alpha, but can otherwise be mixed (e.g., `~A1B2C3`).
@starbelly
Copy link
Contributor Author

Note: I will update sigil docs when a signal this is to be accepted is received :)

@whatyouhide
Copy link
Member

I come here with zero context. Was this discussed in the ML or somewhere else?

@starbelly
Copy link
Contributor Author

I come here with zero context. Was this discussed in the ML or somewhere else?

As is tradition, I give you a context fail 😄 No, this was not discussed on the ML, it simply came up informally on EEF slack. The original context is a potential need to add a sigil that corresponds to a library name that ends with a digit ~HL7.

@whatyouhide
Copy link
Member

Gotcha @starbelly no probs, I was just checking. Thanks for the info. 🙏

@whatyouhide whatyouhide changed the title Add support for sigils containing integers. Add support for sigils containing integers Mar 31, 2024
@starbelly
Copy link
Contributor Author

@josevalim I think this is good now, but let me know if more adjustments should be made.

{ok, lists:reverse(NameAcc), T, Line, Column, Scope, Tokens}.

sigil_name_error() ->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could also be a macro, not sure what the preference here. Likewise, we could just place the error tuple here, but once again, not sure the preference (localization of such things can be valuable).

Copy link

@zolrath zolrath left a comment

Choose a reason for hiding this comment

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

There's a bit of ambiguity in the sigil guide with the sentence as it is right now, looking great though!

lib/elixir/pages/getting-started/sigils.md Outdated Show resolved Hide resolved
@josevalim josevalim merged commit 496cb2c into elixir-lang:main May 17, 2024
10 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants