You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions or variables named the same as a fortran keyword is highlighted differently than other functions or arrays in some situations. I appreciate that this might be a quite challenging task, but it would be really nice if the syntax highlighting could identify if the token is actually a reserved keyword or if it's a variable or function with the same name.
Screenshots
Code sample
program main
integer:: module
integer::ifif=format()
if (if == 1) thenif (format() == 1) then
module =3end ifend ifcontainsintegerfunctionformat()
format=1endfunctionend program
To Reproduce
Paste code above
Fortran Form
Free form, but strictly speaking also fixed form
Build info (please complete the following information):
OS: Windows 10
Extension Version 2.6.2
Visual Studio Code Version 1.65.1
The text was updated successfully, but these errors were encountered:
@plevold thanks for the bug report. I will have a look, but I think it might be challenging to tell these two apart without a considerable performance hit. I will check it out
I had a look at this and I am afraid the normal syntax highlighting will not suffice to solve this. As far as I can tell there is no way to create a regex that will distinguish between a user defined format and the format statement. For that we will need to use the AST scopes, luckily the language server knows about scopes but I will have to implement a semantics token provider to allow this.
This looks like it's going to be a pretty big piece of work so I won't probably get around to it for quite some time.
Functions or variables named the same as a fortran keyword is highlighted differently than other functions or arrays in some situations. I appreciate that this might be a quite challenging task, but it would be really nice if the syntax highlighting could identify if the token is actually a reserved keyword or if it's a variable or function with the same name.
Screenshots
Code sample
To Reproduce
Paste code above
Fortran Form
Free form, but strictly speaking also fixed form
Build info (please complete the following information):
The text was updated successfully, but these errors were encountered: