MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / enter_owner

Method enter_owner

codegraph-kernel/src/tsjs/extractors.rs:1029–1033  ·  view source on GitHub ↗

Put an owner on the stack — on top of the file alone for one on the global object — returning what was set aside for leave_owner.

(&mut self, row: u32, kind: &'static str, name: &str, global: bool)

Source from the content-addressed store, hash-verified

1027 /// Put an owner on the stack — on top of the file alone for one on the
1028 /// global object — returning what was set aside for leave_owner.
1029 fn enter_owner(&mut self, row: u32, kind: &'static str, name: &str, global: bool) -> Vec<Scope> {
1030 let rest = if global { self.stack.split_off(1) } else { Vec::new() };
1031 self.stack.push(Scope { row, kind, name: name.to_string() });
1032 rest
1033 }
1034
1035 fn leave_owner(&mut self, rest: Vec<Scope>) {
1036 self.stack.pop();

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected