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

Method enter_owner

codegraph-kernel/src/tsjs/extractors.rs:890–894  ·  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

888 /// Put an owner on the stack — on top of the file alone for one on the
889 /// global object — returning what was set aside for leave_owner.
890 fn enter_owner(&mut self, row: u32, kind: &'static str, name: &str, global: bool) -> Vec<Scope> {
891 let rest = if global { self.stack.split_off(1) } else { Vec::new() };
892 self.stack.push(Scope { row, kind, name: name.to_string() });
893 rest
894 }
895
896 fn leave_owner(&mut self, rest: Vec<Scope>) {
897 self.stack.pop();

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected