[Chapel Merge] In compiler/next, merge Sym and Decl heirarchies

Branch: refs/heads/master
Revision: 38ae782
Author: mppf
Log Message:

Merge pull request #17784 from mppf/merge-sym-decl

In compiler/next, merge Sym and Decl heirarchies

During review of the compiler/next uAST, some compiler developers brought
up that it's not necessary to have both a Decl hierarchy and a Sym
hierarchy. In particular, the uAST doesn't have types or SymExprs and so
the distinction between a Symbol and its Declaration is not so important.
The uAST started out with separate Sym and Decl heirarchies simply
because that's what the production compiler uses.

This PR merges the Sym and Decl heirarchies. The most relevant generic
type that maps to the old Sym type is NamedDecl. This removes a lot of
the need for duplication in the uAST and should make the types simpler
and easier to work with in the future.

After this change, all ASTNode subclasses are subclasses of Expression.
It might be reasonable to merge ASTNode and Expression but this PR leaves
that for future work.

Reviewed by @lydia-duncan - thanks!

Modified Files:
A compiler/next/include/chpl/uast/NamedDecl.h

A compiler/next/include/chpl/uast/TypeDecl.h
A compiler/next/lib/uast/NamedDecl.cpp
A compiler/next/lib/uast/TypeDecl.cpp
R compiler/next/include/chpl/uast/EnumDecl.h
R compiler/next/include/chpl/uast/EnumElementDecl.h
R compiler/next/include/chpl/uast/FormalDecl.h
R compiler/next/include/chpl/uast/FunctionDecl.h
R compiler/next/include/chpl/uast/ModuleDecl.h
R compiler/next/include/chpl/uast/Sym.h
R compiler/next/include/chpl/uast/SymDecl.h
R compiler/next/include/chpl/uast/TypeSym.h
R compiler/next/include/chpl/uast/VariableDecl.h
R compiler/next/lib/uast/EnumDecl.cpp
R compiler/next/lib/uast/EnumElementDecl.cpp
R compiler/next/lib/uast/FormalDecl.cpp
R compiler/next/lib/uast/FunctionDecl.cpp
R compiler/next/lib/uast/ModuleDecl.cpp
R compiler/next/lib/uast/Sym.cpp
R compiler/next/lib/uast/SymDecl.cpp
R compiler/next/lib/uast/TypeSym.cpp
R compiler/next/lib/uast/VariableDecl.cpp
M compiler/next/include/chpl/frontend/frontend-queries.h
M compiler/next/include/chpl/uast/ASTClassesList.h
M compiler/next/include/chpl/uast/Decl.h
M compiler/next/include/chpl/uast/Enum.h
M compiler/next/include/chpl/uast/EnumElement.h
M compiler/next/include/chpl/uast/Formal.h
M compiler/next/include/chpl/uast/Function.h
M compiler/next/include/chpl/uast/IndexableLoop.h
M compiler/next/include/chpl/uast/Module.h
M compiler/next/include/chpl/uast/MultiDecl.h
M compiler/next/include/chpl/uast/Variable.h
M compiler/next/lib/frontend/Parser/ParserContext.h
M compiler/next/lib/frontend/Parser/ParserContextImpl.h
M compiler/next/lib/frontend/Parser/chapel.ypp
M compiler/next/lib/frontend/Parser/parser-dependencies.h
M compiler/next/lib/frontend/frontend-queries.cpp
M compiler/next/lib/uast/ASTNode.cpp
M compiler/next/lib/uast/Builder.cpp
M compiler/next/lib/uast/CMakeLists.txt
M compiler/next/lib/uast/Enum.cpp
M compiler/next/lib/uast/EnumElement.cpp
M compiler/next/lib/uast/Formal.cpp
M compiler/next/lib/uast/Function.cpp
M compiler/next/lib/uast/Module.cpp
M compiler/next/lib/uast/MultiDecl.cpp
M compiler/next/lib/uast/Variable.cpp
M compiler/next/test/frontend/testFrontendQueries.cpp
M compiler/next/test/frontend/testInteractive.cpp
M compiler/next/test/frontend/testParse.cpp
M compiler/next/test/frontend/testParseEnums.cpp
M compiler/next/test/frontend/testParseFor.cpp
M compiler/next/test/frontend/testParseFunctions.cpp
M compiler/next/test/frontend/testParseLocal.cpp
M compiler/next/test/frontend/testParseModules.cpp
M compiler/next/test/frontend/testParseMultiVar.cpp
M compiler/next/test/frontend/testParseNew.cpp
M compiler/next/test/frontend/testParseSerial.cpp
M compiler/next/test/frontend/testResolve.cpp
M compiler/next/test/uast/testBuildIDs.cpp

Compare: https://github.com/chapel-lang/chapel/compare/1abafc362f5c...38ae7823910f