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

Fix Decimal Number Parsing in Lexer #532

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

sanchit3008
Copy link
Collaborator

Closes #530

This PR updates the lexer's number parsing logic to efficiently handle decimal numbers with and without leading zeroes (e.g., 0.75 and .75). I've introduced a unified regex pattern [0-9]*\.?[0-9]+ to match all forms of numeric inputs, streamlining the parsing process.

@sanchit3008 sanchit3008 requested a review from zyc9012 April 5, 2024 18:42
@sanchit3008
Copy link
Collaborator Author

Screen.Recording.2024-04-05.at.11.55.39.PM.mov

@sanchit3008 sanchit3008 merged commit ef38acd into master May 6, 2024
2 checks passed
@sanchit3008 sanchit3008 deleted the fix/decimal-parsing branch May 6, 2024 09:42
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.

Decimal numbers without the prefix "0" give error
1 participant