camfort / fortran-src

Fortran parsing and static analysis infrastructure
https://hackage.haskell.org/package/fortran-src
Other
48 stars 20 forks source link

add early BOZ constant parsing, separate constructor #194

Closed raehik closed 2 years ago

raehik commented 3 years ago

In the same vein as #193 , we do what we can for BOZs as early as possible.

Thoughts and notes:

raehik commented 3 years ago

fortran-vars handles cases where a BOZ constant is used as an integer. I think I'd reconsider putting BOZs as a constructor in an evaluated Fortran value type if it's possible. Instead get all their logic done early, convert them down to typed values.

raehik commented 2 years ago

Discussed. There's more code to consider adapting from fortran-vars for handling BOZs -- getting the AST change out of the way makes future changes easier, so merging.