camfort / fortran-src

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

Build a map (statefully) as we process declarations #288

Closed dorchard closed 2 months ago

dorchard commented 2 months ago

I noticed some problems with building a constant expression map were coming through into CamFort. This seems to fix things now (makes the associated tests pass in CamFort)- the main idea is in genConstExpMap to find all the statements the declare parameters or have a constants, and then evaluate them one at a time, building a map from values to FRepr representations.