-
Notifications
You must be signed in to change notification settings - Fork 2
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
Array-variables are highlighted as function #4
Comments
We decided to use If these scopes are typically used for built-in functions, I think we can follow the convention. I see that the Python syntax is also using |
In general I noticed that you also used |
This syntax uses
variable.function.fortran
for identifiers preceding an opening parenthesis. This works fine for function and subroutine calls, but at the same time all array-variables are falsely highlighted as a function.In general there is no way with a regex-based highlighting engine to distinguish between array access and a function call in Fortran. The built-in Matlab syntax in Sublime Text suffers from the same issue, and it uses the scope
meta.variable.other.valid.matlab
for all identifiers. And the (abandoned?) Fortran package from Package Control uses only a meta scope for such identifiers as well.From personal experience I would say that array-variables occur much more often in code than function calls, so I would suggest to not use the
variable.function
scope for identifiers, but change it e.g. tovariable.other.fortran
, to minimize the number of incorrectly highlighted identifiers.One exception to this, where
variable.function
can be used correctly is after thecall
keyword for subroutine calls.Another thing I noticed is that built-in functions and subroutines use
variable.function.function.intrinsic.fortran
andvariable.function.subroutine.intrinsic.fortran
. I would suggest to use something likesupport.function.intrinsic.fortran
andsupport.function.subroutine.fortran
for these instead, becausesupport.function
is the usually used scope name for built-in functions and this way they get highlighted differently from user-defined functions (subroutines) by default in most color schemes.The text was updated successfully, but these errors were encountered: