+ res.send(style+`<pre>${JSON.stringify(req.query,null,2)}</pre>${list.join("<br>")}`)
+})
+
+app.get('/nesting', (req,res) => {
+ const {file,type,start,end} = req.query
+ const result = []
+ const doit = (branch,stack) => {
+ if(stack.at(-1)==file && branch.type==type && branch.start==start && branch.end==end) {
+ const file = stack.at(-1)
+ const path = stack.slice(0,-1).map((n,i) => `
+ <tr><td style="text-align:right;">
+ <a title=${file} href=/similar?pos=${`${file}-${start}-${end}`}&depth=${i}>${n.type}</a>:
+ <td>${sxpr(n,3,null,stack[i-1])}`).reverse()
+ const hit = stack[1]
+ result.push(`
+ <table>${path.join("")}</table><br><br>\n
+ <pre>${escape(JSON.stringify(hit,omit,2))}</pre>`)
+ }
+ }
+ visitor.wander(mods,doit)
+ res.send(style+`<pre>${JSON.stringify(req.query,null,2)}</pre>${result.join("<br>")}`)