Skip to content

Commit

Permalink
Fix data group and pointer span
Browse files Browse the repository at this point in the history
Previously it grabbed the span across the keyword and the reversed list
which meant it only got the span until the end of first list, even
if each list had the correct span.
  • Loading branch information
Raoul Hidalgo Charman committed Jul 28, 2023
1 parent c1926de commit 94c33d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Language/Fortran/Parser/Fixed/Fortran77.y
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,12 @@ NONEXECUTABLE_STATEMENT :: { Statement A0 }
| dimension INITIALIZED_ARRAY_DECLARATORS { StDimension () (getTransSpan $1 $2) (aReverse $2) }
| common COMMON_GROUPS { StCommon () (getTransSpan $1 $2) (aReverse $2) }
| equivalence EQUIVALENCE_GROUPS { StEquivalence () (getTransSpan $1 $2) (aReverse $2) }
| pointer POINTER_LIST { StPointer () (getTransSpan $1 $2) (fromReverseList $2) }
| data DATA_GROUPS { StData () (getTransSpan $1 $2) (fromReverseList $2) }
| pointer POINTER_LIST
{ let pl = fromReverseList $2
in StPointer () (getTransSpan $1 pl) pl }
| data DATA_GROUPS
{ let dgs = fromReversList $2
in StData () (getTransSpan $1 dgs) dgs }
| automatic INITIALIZED_DECLARATORS { StAutomatic () (getTransSpan $1 $2) (aReverse $2) }
| static INITIALIZED_DECLARATORS { StStatic () (getTransSpan $1 $2) (aReverse $2) }
-- Following is a fake node to make arbitrary FORMAT statements parsable.
Expand Down

0 comments on commit 94c33d9

Please sign in to comment.