Branch: refs/heads/master
Revision: fcdb856
Author: bradcray
Log Message:
Merge pull request #17481 from bradcray/param-enum-ranges
Add support for param
for-loops over enum
ranges
[reviewed by @vasslitvinov]
This adds support for param
for loops over literal ranges whose bounds are defined by enum
values and adds a few tests for the feature. The approach taken is very similar to the one taken for param
for loops over integers, yet rather than counting through integers when stamping out the loop bodies, it iterates through the enumeration type.
Modified Files:
A test/param/loop/paramLoopContinue.chpl
A test/param/loop/paramLoopContinue.good
A test/types/range/enum/paramEnumRange.chpl
A test/types/range/enum/paramEnumRange.good
A test/types/range/enum/paramEnumRangeContinue.chpl
A test/types/range/enum/paramEnumRangeContinue.good
M compiler/AST/ParamForLoop.cpp
M compiler/include/ParamForLoop.h
M modules/internal/ChapelRange.chpl
M test/types/range/open/paramEnumRange.bad
Compare: https://github.com/chapel-lang/chapel/compare/2790dd16e654...fcdb856e0771