Now Module::identifier only returns the actual identifier, instead of all the modules it's nested within too. Example:
module Foo::Bar
/* old */ module.identifier() == "Foo::Bar"
/* new */ module.identifier() == "Bar"
The fully scoped module is exposed through a new nested_module_identifier function for where we need it.
It also rewrites the Scope struct. Previously it had 2 vectors, one for modules scopes and one for parser scopes,
but it's been rewritten to take advantage of the fact that we know the full module scope up-front now.
I also added a get_module function to it.
This will allow elements to navigate to their module to check for attributes like cs::namespace.
This PR finishes the new API for modules.
Now
Module::identifier
only returns the actual identifier, instead of all the modules it's nested within too. Example:The fully scoped module is exposed through a new
nested_module_identifier
function for where we need it.It also rewrites the
Scope
struct. Previously it had 2 vectors, one for modules scopes and one for parser scopes, but it's been rewritten to take advantage of the fact that we know the full module scope up-front now.I also added a
get_module
function to it. This will allow elements to navigate to their module to check for attributes likecs::namespace
.