MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / closeNode

Method closeNode

hyperagent-ext/media/scripts/highlight.min.js:31–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
30 this.top.children.push(e)}openNode(e){const n=o({scope:e})
31 ;this.add(n),this.stack.push(n)}closeNode(){
32 if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
33 for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
34 walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){
35 return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),

Callers 1

closeAllNodesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected