eirik-kjonstad / modern-fortran-syntax

Modern Fortran syntax highlighting for Sublime Text 3/4
MIT License
10 stars 2 forks source link

block/end block (and associate/end associate) #65

Closed hattom closed 2 years ago

hattom commented 2 years ago

I've just tried out modern-fortran-syntax for use in bat. It's very nice, I like it!

I found a couple of constructs which are not present. Unfortunately I don't know the format for defining syntax, so I don't think I can offer a PR.

Fortran (2008, I think) added the scoping construct block/end block [1] (Some examples: https://stackoverflow.com/a/51476018)

block
...
end block

Also the associate/end associate construct [2]. This looks like:

associate(a => b)
...
end associate

Some examples of both are in the example: https://github.com/hattom/derived_reduction/blob/main/test_reduce.F90

[1] In the 202X draft document I have from Dec 2020 (J3/21-007), it's detailed in 11.1.4. [2] 11.1.3 in [1]

eirik-kjonstad commented 2 years ago

Thanks for the feedback! I was not aware of the block construct, but it looks like it should be straight-forward to incorporate into the syntax. I'll try to make a PR to add block and associate by the end of the week.

eirik-kjonstad commented 2 years ago

I've tried to add support for associate and block and merged (in main branch as well as release 1.6.0). Hope it works as you expect - otherwise I'll of course try to make a patch. Thanks again for letting me know.

hattom commented 2 years ago

Looks good on main, thanks!