gccrs: Introduce RawPath class to group path components.
gccrs introduces a RawPath class to consolidate path segments and scope resolution information.
The gccrs compiler has introduced a new RawPath class to group related path components, such as segments and scope resolution flags. This aims to prevent the loss of global path information that previously occurred when these components were handled separately. The change refactors various path-related structures to use this new class.
In Details
This commit introduces the RawPath class to gccrs, consolidating path segments and the 'opening scope' flag into a single structure. This addresses issues where separate handling of these components led to a loss of overall path context. The commit also involves significant refactoring across AST and HIR components, including moving ResolutionPathSegment and updating numerous call sites and data structure definitions to use RawPath for a more cohesive path representation.
- gccrs
- The GCC compiler's implementation for the Rust programming language.
- RawPath
- A new data structure introduced in gccrs to represent a path, consolidating its segments and scope resolution information.
- AST
- Abstract Syntax Tree. A tree representation of the abstract syntactic structure of source code, used by compilers to parse and analyze code.
- HIR
- High-level Intermediate Representation. A data structure used by compilers to represent the program's logic after initial parsing and before optimization or code generation.
- scope resolution
- The process of determining which declaration an identifier refers to, based on the visibility rules (scope) of the programming language.