dparkins / language-fortran

Syntax highlighting for FORTRAN for atom
MIT License
35 stars 16 forks source link

c in first column: problem with close() intrinsic in free format #55

Closed maxlevesque closed 9 years ago

maxlevesque commented 9 years ago

Hi, Good example being better than long sentences: screenshot from 2015-09-02 18 08 01

Source file has extension .f90

Also affects other intrinsics starting with c and likely to appear in first column of the file, like character

Might be related to recent issue https://github.com/dparkins/language-fortran/issues/52

tomedunn commented 9 years ago

From checking the latest standard, c or C in the first character slot should only count as a comment in fixed formatted Fortran. So only the sections beginning with a ! should be commented in your examples. This change is easy enough to make. I'll be sure to do so when I get home tonight.

tomedunn commented 9 years ago

I added a fix to this in my fork tomedunn/language-fortran however I'm going to hold off on a pull request until the end of the weekend. I know there are some people who use the Modern Fortran grammar for fixed formed Fortran. I'd like to break the two grammars, Punchcard Fortran and Modern Fortran into Free Form Fortran and Fixed Form Fortran. That way both can work with the current standard.