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

Support enums with kind specified for integer literals #243

Closed
zbeekman opened this issue Jun 25, 2018 · 0 comments · Fixed by #354
Closed

Support enums with kind specified for integer literals #243

zbeekman opened this issue Jun 25, 2018 · 0 comments · Fixed by #354
Labels

Comments

@zbeekman
Copy link
Member

e.g., the following code triggers processing errors:

ENUM, BIND(c)
    ENUMERATOR :: item1 = 0_integer32, item2, item3
    ENUMERATOR :: list1 = 100_integer32, list2, list3
    ! etc.
    ENUMERATOR :: fixed_item1 = 0, fixed_item2, fixed_item3
    ! FORD works with these
END ENUM

Here are the errors:

Traceback (most recent call last):
  File "/usr/local/bin/ford", line 11, in <module>
    load_entry_point('FORD==5.0.6', 'console_scripts', 'ford')()
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/__init__.py", line 357, in run
    main(proj_data,proj_docs,md)
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/__init__.py", line 310, in main
    project = ford.fortran_project.Project(proj_data)
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/fortran_project.py", line 95, in __init__
    ford.sourceform.FortranSourceFile(os.path.join(curdir,item),settings, preprocessor, ext in self.fixed_extensions))
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/sourceform.py", line 1023, in __init__
    FortranContainer.__init__(self,source,"")
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/sourceform.py", line 630, in __init__
    self.MODULE_RE.match(line),self))
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/sourceform.py", line 691, in __init__
    permission))
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/sourceform.py", line 602, in __init__
    self._cleanup()
  File "/usr/local/Cellar/ford/5.0.6/libexec/lib/python2.7/site-packages/ford/sourceform.py", line 1605, in _cleanup
    raise Exception('Non-integer assigned to enumerator.')
Exception: Non-integer assigned to enumerator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants