Ada: Cleanup of Analyze_Aspect_Specifications and related code
This commit improves the Ada compiler by refactoring code related to aspect specifications, enhancing readability and maintainability.
This commit performs a cleanup of the Ada compiler’s code related to aspect specifications. The changes include renaming Decorate to Decorate_Aspect_Links for clarity, generalizing its functionality to support N_Attribute_Definition_Clause, and moving most calls to it into Insert_Aitem. The commit also involves moving a call to Set_Has_Delayed_Rep_Aspects closer to other related calls, localizing variables, and improving comments.
In Details
This commit focuses on refactoring parts of sem_ch13.adb and related files that handle aspect specifications. The most significant change is the renaming and generalization of the Decorate function (now Decorate_Aspect_Links) and its integration within Insert_Aitem. This involves AST node manipulation related to aspects. Understanding the Ada semantic analysis phase, particularly how aspects are processed, is crucial to appreciate the impact.
For Context
This commit improves the internal structure of the Ada compiler. It focuses on the code that handles 'aspects,' which are additional properties or characteristics you can attach to Ada code elements (like variables or types) to control their behavior or provide extra information. This commit cleans up and reorganizes this part of the compiler, making it easier for developers to understand and maintain the code. Although not directly visible to end-users, these changes improve the overall quality and reliability of the Ada compiler.