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

Better errors for literal parsing #134

Open
ISibboI opened this issue May 31, 2023 · 6 comments
Open

Better errors for literal parsing #134

ISibboI opened this issue May 31, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@ISibboI
Copy link
Owner

ISibboI commented May 31, 2023

Right now when parsing a literal fails, evalexpr simply assumes it is supposed to be an identifier. We should introduce the basic rule that identifiers need to start with a letter, and numeric literals with a number (like in many major programming languages).

@ISibboI ISibboI added the enhancement New feature or request label May 31, 2023
@hexofyore
Copy link
Contributor

@ISibboI Is it okay If I do this? I am planning to change the conversion of Partial Token to Token Portion of Code. If it starts with letter or underscore, it will be parsed as Identifiers. Then, it will try parsing float and then integer?

@ISibboI
Copy link
Owner Author

ISibboI commented Jun 4, 2023 via email

@ISibboI
Copy link
Owner Author

ISibboI commented Jun 4, 2023 via email

@hexofyore
Copy link
Contributor

Doesn't rust and other programming language only support english letters and underscore for starting letter? Do they support other unicode characters?

@ISibboI
Copy link
Owner Author

ISibboI commented Jun 4, 2023 via email

@hexofyore
Copy link
Contributor

hexofyore commented Jun 5, 2023

@ISibboI I am not so sure about this. I made small changes. Check and see what's missing. I will PR it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants