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

Method remove

src/cst/mod.rs:548–553  ·  view source on GitHub ↗

Removes the node from the JSON. Note: Removing certain nodes may cause syntax errors.

(self)

Source from the content-addressed store, hash-verified

546 ///
547 /// Note: Removing certain nodes may cause syntax errors.
548 pub fn remove(self) {
549 match self {
550 CstNode::Container(n) => n.remove(),
551 CstNode::Leaf(n) => n.remove(),
552 }
553 }
554
555 fn parent_info(&self) -> Option<ParentInfo> {
556 match self {

Callers 6

takeMethod · 0.80
remove_comma_separatedFunction · 0.80
set_trailing_commasFunction · 0.80
ensure_multilineFunction · 0.80
run_testFunction · 0.80

Calls 6

remove_comma_separatedFunction · 0.85
clear_childrenMethod · 0.80
remove_rawMethod · 0.80
is_line_commentMethod · 0.80
is_whitespaceMethod · 0.80
is_newlineMethod · 0.80

Tested by

no test coverage detected