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

Method constructor

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

Source from the content-addressed store, hash-verified

25 closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){
26 this.buffer+=`<span class="${e}">`}}const o=(e={})=>{const n={children:[]}
27 ;return Object.assign(n,e),n};class l{constructor(){
28 this.rootNode=o(),this.stack=[this.rootNode]}get top(){
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(){

Callers

nothing calls this directly

Calls 1

oFunction · 0.70

Tested by

no test coverage detected