dparkins / language-fortran

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

preprocessor directives not highlighted correctly #76

Closed steabert closed 8 years ago

steabert commented 8 years ago

I'm opening a file with .f extension, the grammer is "Fortran - Fixed Form". There are several #include statements which are not highlighted correctly. Also, when adding e.g. #ifdef statements they are not highlighted correctly either.

atom 1.3.3, language-fortran 2.0.8

tomedunn commented 8 years ago

I'm guessing the preprocessor directives aren't working because you're including them in columns 1-7. This shouldn't be too difficult to fix.

steabert commented 8 years ago

Yes indeed, that was the case. The preprocessor directives have their own indentation even, like so:

      subroutine bla
#ifdef _FEATURE_
#  include "feature.fh"
#endif
      ...
      end

Thanks for fixing it!

tomedunn commented 8 years ago

No problem. Please let us know if you run into any other preprocessor directive issues (or anything else for that matter). The Fortran programming I do generally doesn't involve fixed format code, nor preprocessor directives, so any help and guidance on these issues is extremely helpful! :smile: