mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
rename
This commit is contained in:
parent
25561ff757
commit
d3ef35d935
7 changed files with 14 additions and 14 deletions
|
@ -564,11 +564,11 @@ impl IdentIds {
|
|||
.map(|(index, ident)| (IdentId(index as u32), ident))
|
||||
}
|
||||
|
||||
pub fn add(&mut self, ident_name: &Ident) -> IdentId {
|
||||
pub fn add_ident(&mut self, ident_name: &Ident) -> IdentId {
|
||||
self.add_str(ident_name.as_inline_str().as_str())
|
||||
}
|
||||
|
||||
fn add_str(&mut self, string: &str) -> IdentId {
|
||||
pub fn add_str(&mut self, string: &str) -> IdentId {
|
||||
let offset = self.buffer.len() as u32;
|
||||
let length = string.len() as u16;
|
||||
|
||||
|
@ -585,7 +585,7 @@ impl IdentIds {
|
|||
pub fn get_or_insert(&mut self, name: &Ident) -> IdentId {
|
||||
match self.get_id(name) {
|
||||
Some(id) => id,
|
||||
None => self.add(name),
|
||||
None => self.add_ident(name),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue