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
Hi, thanks for the great work! I have a little issue here regarding to the error stop statement.
If I use an character variable instead of an actual string after error stop, it will be highlighted as invalid. The corresponding textmate scope is invalid.error.character.fortran. I am not sure if this is reproducible on other computers, but on my laptop it appears even in the simplest case (like the image shown below).
I think this issue is related to the regex definition of "error-stop-statement" in the json file,
where only "#constants" and "#string-operators" are allowed after error stop. Apparently, it is difficult for the regex definition to capture all scalar character constant expressions and scalar integer constant expressions. Since I know you are also the author of fortls (Great work and thanks again!), I wonder if it is possible to use fortls instead of a regex definition to highlight what comes after error stop?
The text was updated successfully, but these errors were encountered:
Thanks for the report @han190. I think I might be able to relax the constraint a bit to include variables, if I recall correctly I was just lazy to pull up the Fortran standard to see what values are allowed for the stop message.
Nice, @gnikit thanks for the reply. If fortls and textmate match perfectly, it will be possible to write a Fortran-aware color theme.
The good think about this is that you wouldn't actually need to change anything to your current theme (assuming it has been written correctly). For example in Fortran a user defined function cannot be distinguished from an array when called, hence it cannot be coloured with the correct colour. If a language server was supplementing the syntax highlighting it would be able to overwrite the textmate scope with the entity.name.function....
Hi, thanks for the great work! I have a little issue here regarding to the
error stop
statement.If I use an character variable instead of an actual string after
error stop
, it will be highlighted as invalid. The corresponding textmate scope isinvalid.error.character.fortran
. I am not sure if this is reproducible on other computers, but on my laptop it appears even in the simplest case (like the image shown below).I think this issue is related to the regex definition of
"error-stop-statement"
in thejson
file,vscode-fortran-support/syntaxes/fortran_free-form.tmLanguage.json
Line 2189 in 0f58f1d
where only
"#constants"
and"#string-operators"
are allowed aftererror stop
. Apparently, it is difficult for the regex definition to capture all scalar character constant expressions and scalar integer constant expressions. Since I know you are also the author offortls
(Great work and thanks again!), I wonder if it is possible to use fortls instead of a regex definition to highlight what comes aftererror stop
?The text was updated successfully, but these errors were encountered: