dparkins / language-fortran

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

`bind` statement is not formatted #85

Closed cbcoutinho closed 7 years ago

cbcoutinho commented 7 years ago

Howdy @dparkins,

was just messing around with some c-bindings in atom and noticed that this package doesn't pick up the bind statement as needing some tlc. See below:

module example
  use iso_c_binding, only: c_double
  implicit none

contains

  subroutine square(a, out) bind(c) <-- See here
    real(c_double), intent(in) :: a
    real(c_double), intent(out) :: out

    out = a*a

    return
  end subroutine square

end module example

I'm not sure how this language is structured - if it is only a part of the modern grammar or if you need to include in all of them. I think we it should be included only in the modern grammar because the c-binding was added in F2003.

Cheers! C

tomedunn commented 7 years ago

Thanks for posting! I'll look into it and see if I can put together a fix for it soon.