diff --git a/shared/yeast/src/build.rs b/shared/yeast/src/build.rs index cda78e69793..a5f454a5f54 100644 --- a/shared/yeast/src/build.rs +++ b/shared/yeast/src/build.rs @@ -158,15 +158,6 @@ impl<'a, C> BuildCtx<'a, C> { self.ast .create_named_token_with_range(kind, generated, self.source_range) } - - /// Prepend a value to a field of an existing node. - pub fn prepend_field(&mut self, node_id: Id, field_name: &str, value_id: Id) { - let field_id = self - .ast - .field_id_for_name(field_name) - .unwrap_or_else(|| panic!("build: field '{field_name}' not found")); - self.ast.prepend_field_child(node_id, field_id, value_id); - } } impl BuildCtx<'_, C> { diff --git a/shared/yeast/src/lib.rs b/shared/yeast/src/lib.rs index 2c53f756fdf..8a880cef7a2 100644 --- a/shared/yeast/src/lib.rs +++ b/shared/yeast/src/lib.rs @@ -518,15 +518,6 @@ impl Ast { self.create_named_token_with_range(kind, content, None) } - /// Prepend a child id to the given field of the given node. - pub fn prepend_field_child(&mut self, node_id: Id, field_id: FieldId, value_id: Id) { - let node = self - .nodes - .get_mut(node_id.0) - .expect("prepend_field_child: invalid node id"); - node.fields.entry(field_id).or_default().insert(0, value_id); - } - pub fn create_named_token_with_range( &mut self, kind: &'static str,