MCPcopy Create free account
hub / github.com/sql-js/sql.js / matcherFromTokens

Function matcherFromTokens

documentation/javascript/application.js:5696–5709  ·  view source on GitHub ↗
( tokens, context, xml )

Source from the content-addressed store, hash-verified

5694
5695// ["TAG", ">", "ID", " ", "CLASS"]
5696function matcherFromTokens( tokens, context, xml ) {
5697 var token, matcher,
5698 i = 0;
5699
5700 for ( ; (token = tokens[i]); i++ ) {
5701 if ( Expr.relative[ token.part ] ) {
5702 matcher = addCombinator( matcher, Expr.relative[ token.part ], context, xml );
5703 } else {
5704 matcher = addMatcher( matcher, Expr.filter[ token.part ].apply(null, token.captures.concat( context, xml )) );
5705 }
5706 }
5707
5708 return matcher;
5709}
5710
5711function matcherFromGroupMatchers( matchers ) {
5712 return function( elem ) {

Callers 1

application.jsFile · 0.85

Calls 2

addCombinatorFunction · 0.85
addMatcherFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…