(type, node: ParseNode)
| 310 | } |
| 311 | |
| 312 | makeNode(type, node: ParseNode) { |
| 313 | if(!node.id) { |
| 314 | node.id = `${this.id}|node|${this.nodeId++}`; |
| 315 | } |
| 316 | for(let from of node.from as any[]) { |
| 317 | this.links.push(node.id, from.id); |
| 318 | } |
| 319 | if(node.from.length) { |
| 320 | node.startOffset = node.from[0].startOffset; |
| 321 | node.endOffset = toEnd(node.from[node.from.length - 1]); |
| 322 | } |
| 323 | node.type = type; |
| 324 | return node; |
| 325 | } |
| 326 | |
| 327 | addSearchScopes(scopes: string[]) { |
| 328 | for(let scope of scopes) { |