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
In fixed-form Fortran, if I have a function call that spreads over multiple lines and somewhere in the middle of those lines there is a comment line (starting with a c in the first column) that includes an apostrophe (') the syntax highlighting is completely messed up after the apostrophe.
It seems that the comment line is not recognized correctly and then the apostrophe starts a string literal that is never matched. If I use an exclamation mark (!) instead of the c to start the comment line, the comment seems to get recognized correctly.
Screenshots
Incorrect:
Expected:
Code Example
call foo(a,
& b,
c I don't like this comment
& d)
Minimal, compiling program:
program hello
print*, sign(1,
c I don't like this comment
& -5)
end program hello
Fortran Version (Free/Fixed Form)
Fixed Form e.g. F77
Version of Modern Fortran
v3.4.2023053001
Version of Visual Studio Code
1.79.2
Platform and Architecture
Windows
Additional Information
No response
Edit: added a minimal example that is a valid, compiling program (tested with gfortran and ifort)
The text was updated successfully, but these errors were encountered:
I will have to have a more detailed look in the grammar syntax files to make sure, but I suspect that there line continuation condition for fixed form is either wrong. I will add this to the backlog
Is there an existing issue for this?
Description
In fixed-form Fortran, if I have a function call that spreads over multiple lines and somewhere in the middle of those lines there is a comment line (starting with a
c
in the first column) that includes an apostrophe ('
) the syntax highlighting is completely messed up after the apostrophe.It seems that the comment line is not recognized correctly and then the apostrophe starts a string literal that is never matched. If I use an exclamation mark (
!
) instead of thec
to start the comment line, the comment seems to get recognized correctly.Screenshots
Incorrect:
Expected:
Code Example
Minimal, compiling program:
Fortran Version (Free/Fixed Form)
Fixed Form e.g. F77
Version of Modern Fortran
v3.4.2023053001
Version of Visual Studio Code
1.79.2
Platform and Architecture
Windows
Additional Information
No response
Edit: added a minimal example that is a valid, compiling program (tested with gfortran and ifort)
The text was updated successfully, but these errors were encountered: