MCPcopy Create free account
hub / github.com/dprint/jsonc-parser / remove_raw

Method remove_raw

src/cst/mod.rs:570–578  ·  view source on GitHub ↗

Removes the node from the tree without making adjustments to any siblings.

(self)

Source from the content-addressed store, hash-verified

568
569 /// Removes the node from the tree without making adjustments to any siblings.
570 fn remove_raw(self) {
571 let Some(parent_info) = self.parent_info() else {
572 return; // already removed
573 };
574 parent_info
575 .parent
576 .as_container_node()
577 .remove_child_set_no_parent(parent_info.child_index);
578 }
579
580 /// Converts a CST node to a `serde_json::Value`.
581 ///

Callers 5

set_valueMethod · 0.80
array_value_or_setMethod · 0.80
object_value_or_setMethod · 0.80
removeMethod · 0.80
remove_comma_separatedFunction · 0.80

Calls 3

parent_infoMethod · 0.80
as_container_nodeMethod · 0.80

Tested by

no test coverage detected