Skip to content

Commit b0d2358

Browse files
committed
Add TypeName
1 parent fac08cd commit b0d2358

3 files changed

Lines changed: 733 additions & 0 deletions

File tree

rust/ruby-rbs/src/ids.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ pub enum SymbolTag {}
125125
/// string bytes.
126126
pub type SymbolId = Id<SymbolTag>;
127127

128+
/// Tag for IDs produced by the type-name interner.
129+
pub enum TypeNameTag {}
130+
131+
/// Identifier for an interned type name. Content-addressed: derived from
132+
/// the parent type name's hash and the last segment's hash.
133+
pub type TypeName = Id<TypeNameTag>;
134+
128135
#[cfg(test)]
129136
mod tests {
130137
use super::*;

rust/ruby-rbs/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pub mod ids;
22
pub mod interner;
33
pub mod node;
4+
pub mod type_name;

0 commit comments

Comments
 (0)