moosetechnology / FAST-Fortran

MIT License
0 stars 1 forks source link

Adding property `terminalStatementLabel` to a `FASTFortranDoStatement` #215

Open lsafina opened 3 months ago

lsafina commented 3 months ago

Design of the do statement uses FASTFortranLabelReference to represent s in DO s [,] loop-control.

However, s here is not a label reference of a do statement, but a label reference of its terminal statement.

Thus I propose to add property terminalStatementLabel -> FASTFortranIntegerLiteral to a FASTFortranDoStatement

lsafina commented 3 months ago

doc https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn8c/index.html

NicolasAnquetil commented 3 months ago

Yes FASTFortranLabelReference is not a very good name, but I would also like to reuse common concept whenever possible. Introducing a terminalStatementLabel means that the labels of the Do statement are different from other labels and it does not seem to me that this is very much the case.

So I would like a common concept of LabelDefinition or LabelDeclaration : a label to which a Goto statement (or arithmetic if, or continue) can refer to

NicolasAnquetil commented 3 months ago

inviting @uNouss to the discussion

lsafina commented 3 months ago

ignore for the moment