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

Allow parameter names starting with inf or nan #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maurosilber
Copy link
Contributor

Fixes #57.

@maurosilber maurosilber force-pushed the main branch 2 times, most recently from cb70d2a to 48005d2 Compare January 24, 2025 18:43
@maurosilber
Copy link
Contributor Author

Wait, I think that now this does not allow to parse inf or nan as floats (although why would anyone want to do that?).

@Armavica
Copy link
Owner

Wow, such a simple fix for such an incredible bug! Thank you! I will play with this a little bit to see if I can think of other edge cases.

src/expr.rs Outdated
@@ -129,7 +129,7 @@ mod parsing {
// https://docs.rs/winnow/latest/winnow/_topic/language/index.html
(
one_of(|c: char| c.is_alpha() || c == '_'),
take_while(0.., |c: char| c.is_alphanum() || c == '_'),
take_while(0.., |c: char| c.is_alphanum() || c == '_' || c == '.'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, but I also included this by mistake that allows variable names with dots that I meant to send as a separate commit/PR.

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.

Not allowed rate names
2 participants