[Chapel Merge] Add support for renaming extern types (to the old

Branch: refs/heads/main
Revision: 92e1895
Author: bradcray
Link: Add support for renaming extern types (to the old compiler front-end) by bradcray · Pull Request #19337 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19337 from bradcray/rename-extern-types

Add support for renaming extern types (to the old compiler front-end)

[reviewed by @mppf]

This adds support for renaming extern type declarations, similar
to other extern renaming options that we support, e.g.:

extern "c_name" type chpl_name = ...;

I implemented this thinking I was going to need it to resolve issue
Using types moved from `SysBasic` to `Sys` breaks when both modules are used · Issue #19279 · chapel-lang/chapel · GitHub, but that
turned out not to be the case. I also find myself wanting this every
few months, so forked it off into its own PR. Implementation is
trivial and generally follows what we do for other extern renaming

I tried to implement this in the dyno front-end, but couldn't figure
out how to do it in a reasonable amount of time, so am leaving that
as future work (where I'm imagining the test filed here will serve as
the reminder that it's required as we continue to drive the number of
failing tests under dyno to 0).

Resolves #18173.

Modified Files:
A test/extern/bradc/types/cint-rename.chpl

A test/extern/bradc/types/cint-rename.good
M compiler/AST/build.cpp
M compiler/include/build.h
M compiler/include/flex-chapel.h
M compiler/parser/bison-chapel.cpp
M compiler/parser/chapel.ypp
M compiler/parser/flex-chapel.cpp

Compare: https://github.com/chapel-lang/chapel/compare/90f5be536f35...92e189561cc0