macro_rules! generate_index_type { ($name:ident) => { ... }; ($name:ident, $pretty_name:expr) => { ... }; }
Expand description
Generate an Index
index type. We use it because we need manipulate a lot of different indices
(for various kinds of declarations, variables, blocks, etc.).
For sanity, we prevent any confusion between the different kinds of indices by using different
types. The following macro allows us to easily derive those types.
The name
parameter should contain the name of the module to declare. The pretty_name
parameter is used to implement Id::to_pretty_string
; if not provided, it defaults to name
.