Skip to content

Scanners misinterpret -1 #79

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

Open
nathany opened this issue Oct 28, 2012 · 2 comments
Open

Scanners misinterpret -1 #79

nathany opened this issue Oct 28, 2012 · 2 comments
Milestone

Comments

@nathany
Copy link
Contributor

nathany commented Oct 28, 2012

Most scanners scans expressions like -1 mistakenly as operator(-)integer(1) where it should be returning integer(-1). It's not easy to avoid expressions like i-1 getting highlighted as ident(i)operator(+)integer(1), but it's possible (see Ruby scanner).

I removed the recognition of -1 tokens in r255. This is only a hotfix; to really fix it, we need to keep track of some value_expected state. The Ruby Scanner can do this, and the Scanners for Java, C, Delphi, and Python will need it, too.

From Redmine: http://odd-eyed-code.org/issues/47

@korny
Copy link
Member

korny commented Mar 10, 2013

Later.

@korny
Copy link
Member

korny commented Mar 10, 2013

But we should look out for this when implementing new scanners ;)

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

2 participants