Skip to content
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 2003 and conditionals #19

Open
cmbant opened this issue Jul 3, 2015 · 6 comments
Open

Fortran 2003 and conditionals #19

cmbant opened this issue Jul 3, 2015 · 6 comments

Comments

@cmbant
Copy link

cmbant commented Jul 3, 2015

"optional", "allocatable", "class", "Type, extends", and other elements of Fortran 2003 code are not highlighted consistently. Also #ifdef, #endif are not highlighted clearly differently.
e.g. see

https://github.com/cmbant/forutils/blob/master/ObjectLists.f90
https://github.com/cmbant/forutils/blob/master/MpiUtils.f90

@cmbant
Copy link
Author

cmbant commented Jul 3, 2015

PS. I notice in previous bug reports you ask for a reference for the language structure. Here's the exhaustive specification of the language:

http://www.j3-fortran.org/doc/year/10/10-007.pdf

@infininight
Copy link
Member

I believe the optional and allocatable cases have been corrected, if there are any I missed give line numbers.

Class and extends are not constructs currently supported by the grammar, so they are not intended to be matched at all currently. (Neither is Type, abstract which I note from your example files.)

Same with the conditional lines, though I do not see those mentioned at all in the document linked.

@cmbant
Copy link
Author

cmbant commented Mar 27, 2018

The MpiUtils.f90 file has #ifdef MPI etc, which are currently highlighted the same way a fortran code.

@infininight
Copy link
Member

Yes I see them there I meant I don't see them mentioned in the spec document you linked.

@cmbant
Copy link
Author

cmbant commented Mar 27, 2018

Ah, Fortran just uses the standard C preprocessor directives.

@wusunlab
Copy link

To add to this, pure and elemental procedures are also not highlighted consistently. If you have some thing like pure function ... it will highlight; but if you have pure real(8) function ... it won't highlight it properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants