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

Too Long Decimal's Expression #20

Open
lziq opened this issue Jul 21, 2020 · 0 comments
Open

Too Long Decimal's Expression #20

lziq opened this issue Jul 21, 2020 · 0 comments

Comments

@lziq
Copy link
Contributor

lziq commented Jul 21, 2020

In ANTLR grammar, DECIMAL's expression is 'DEC_INTEGER DEC_FRAC? FLOAT_EXP?', and INTEGER's expression is 'DEC_INTEGER'. We cannot simply copy these expressions in TextMate. If we put INTEGER before DECIMAL, there will be some problems. For example, for the number '123.456', the part '123' will be recognized as INTEGER, while the rest doesn't have a scope. And if we put DECIMAL before INTEGER, an INTEGER will be always recognized as DECIMAL. I am wondering whether there is a way to make it solve this problem. For now, I simply changed the expression of DECIMAL into 'DEC_INTEGER (?: DEC_FRAC FLOAT_EXP | DEC_FRAC | FLOAT_EXP)', and put DECIMAL before INTEGER, in order to make it work.

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

No branches or pull requests

1 participant