You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// QueryAll returns a NodeList containing nodes that matched with the given query.
120
-
func (node*Node) QueryAll(querystring) NodeList {
121
-
nodeList:=NewNodeList()
122
-
queryTokens:=TokenizeQuery(query)
123
-
traverser:=NewTraverser(node)
124
-
125
-
fornode:=rangetraverser.Walkthrough {
126
-
ifmatchQueryTokens(node, queryTokens) {
127
-
nodeList.Append(node)
128
-
}
129
-
}
130
-
returnnodeList
131
-
}
132
-
133
103
/*
134
104
QuerySearch tokenizes the query string and search for nodes that matches with the right most query token. After matching right most query it proceeds to match nodes parents nodes for left over tokens and then passed that node to (yield/range). QuerySearch search the whole node tree for matches unless yield get canceled or range iterator get cancel.
0 commit comments