stadelmanma / tree-sitter-fortran

Fortran grammar for tree-sitter
MIT License
30 stars 15 forks source link

feat cudafortran: Variable declaration and modification with attributes #48

Closed ghost closed 3 years ago

ghost commented 3 years ago

cudafortran allows modifying variable attributes as follows

integer :: variable
attributes(device) :: variable
real, device :: var_2

This pull request adds support for that rule.

Reference: https://docs.nvidia.com/hpc-sdk/pgi-compilers/20.4/x86/cuda-fortran-prog-guide/index.htm#cfref-var-attr

stadelmanma commented 3 years ago

Looks great! Also for your awareness I'm pushing a fix to #42 so you may need to rebase/merge changes to master into any of your preexisting feature branches.

ghost commented 3 years ago

@stadelmanma Thanks a lot, I will check it out.

I have some new features I want to add, will open issues/pull requests soon.