NewQueryResult returns a QueryResult containing the provided *Nodes
(nodes ...*Node)
| 384 | |
| 385 | // NewQueryResult returns a QueryResult containing the provided *Nodes |
| 386 | func NewQueryResult(nodes ...*Node) QueryResult { |
| 387 | out := make(QueryResult) |
| 388 | |
| 389 | for _, n := range nodes { |
| 390 | out.Add(n) |
| 391 | } |
| 392 | |
| 393 | return out |
| 394 | } |
| 395 | |
| 396 | // Add accepts a *Node and adds it to the QueryResult, |
| 397 | // provided it has a valid CaptureName |