stadelmanma / tree-sitter-fortran

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

Array constructors are not parsed #47

Closed ghost closed 1 year ago

ghost commented 3 years ago

Currently, array constructs are not parsed. We should add support for them. Simple scalar expressions like

integer :: array(3)
array = (/1, 2, 3 /)
array = [4, 5, 6]

are easy to implement. But array expressions and implied-do loops are also allowed, which will require #3 to be implemented first.

ghost commented 3 years ago

@stadelmanma

I see you have already mentioned array constructs in #3

stadelmanma commented 3 years ago

Oops, I thought the mentioned issue was regarding array constructors and I closed before I looked.

stadelmanma commented 3 years ago

@oponkork among some other fixes I've implemented I did add support for array literals using the square brackets. Implied do loops are still untouched though.

ghost commented 3 years ago

I will try to get the implied do loops working.

stadelmanma commented 3 years ago

Hey @oponkork I was looking through my old branch for this and had a thought, I think I got something working. Checkout my changes in https://github.com/stadelmanma/tree-sitter-fortran/tree/support-implied-do-loops and see what you think. Maybe you have a better solution than just adding a conflict rule.