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
(Fortran) FORTRAN 77 style comments #2677
Comments
Longer discussion: #2310 The space variant doesn't work because evidently This is hard because really these should likely be two separate languages, not one. Are you perhaps someone with a deep understanding or Fortran and the various commenting styles someone uses within the scope of the actual rules? |
I agree, it’s a tricky question. Perhaps, it is better to split between FORTRAN 77 and modern Fortran, and remove the |
@interkosmos Would you want to make a PR where we extend this to
Would it be that different from Fortran 90? Are these really two entirely different langauges? |
Yeah, why not.
FORTRAN 77 is written in fixed-source format, with the first six columns of a row being reserved for comments, format descriptors, line break indications, and so on. Fortran 90 changed to free-source format, without such restrictions. |
Sounds about like my understanding... but for highlighting purposes how are they any different other than the ambiguity with comments? It seems right now we perfectly highlight both - with this comment exception, no? |
Yes, I don’t see any edge case at the moment. So, if |
FWIW, in free source form (Fortran >= 90), |
Pretty sure this also resolves that no? |
Yes, it seems like it should. Looking forward to seeing it merged! |
Describe the issue
Two comment styles are supported, old
C
(FORTRAN 77) and new!
. Syntax starting withC
/c
in column 1 are treated as comments. The^C
comment indicator should be better replaced with^C
(appended whitespace) as a workaround.Which language seems to have the issue?
Fortran.
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce
Expected behavior
Syntax starting with character
c
should not be treated as comments.Additional context
The comments in
fortran.js
are defined as:Perhaps, it is sufficient to replace
^C
with^C
or^C\s
.The text was updated successfully, but these errors were encountered: