ISibboI/evalexpr

Better errors for literal parsing

ISibboI opened this issue · 6 comments

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 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?

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

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