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

Function named "eval" incorrectly highlighted #11

Closed
rmunn opened this issue Aug 1, 2016 · 2 comments
Closed

Function named "eval" incorrectly highlighted #11

rmunn opened this issue Aug 1, 2016 · 2 comments

Comments

@rmunn
Copy link
Contributor

rmunn commented Aug 1, 2016

A function named "eval" will be highlighted correctly when it's defined. But when you call it, it will be highlighted as if the "val" part of the function is a keyword:

incorrent-highlighting

I have also been able to reproduce this behavior with other functions that contain keywords inside their names, like is_a_member, as long as the "keyword" comes at the end of the name:

incorrent-highlighting-2

Also, if the line is eval (x + 4), then the function is highlighted correctly (the val part is not seen as a keyword). Only when the line looks like eval x does the highlighting get it wrong. In other words, when it would match a regex that looks like correct use of the val keyword.

Adding a simple "start-of-word" lookahead to the keyword regex will probably solve this issue.

@rmunn
Copy link
Contributor Author

rmunn commented Aug 1, 2016

These screenshots were taken with ionide-fsharp extension 2.2.9 inside Visual Studio Code 1.3.1.

@Krzysztof-Cieslak
Copy link
Member

Fixed in bc313d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants