validator/engine/css-selectors.js
/**
 * The CombinatorType for a given token; helper function used when
 * constructing a Combinator instance.
 * @param {!parse_css.Token} token
 * @return {!parse_css.CombinatorType}
 */
The CombinatorType for a given token; helper function used when
constructing a Combinator instance.
The CombinatorType for a given token ; helper function used when constructing a Combinator instance .
function combinatorTypeForToken(token) {
  if (token.tokenType === parse_css.TokenType.WHITESPACE) {
    return parse_css.CombinatorType.DESCENDANT;
  } else if (isDelim(token, '>')) {
    return parse_css.CombinatorType.CHILD;
  } else if (isDelim(token, '+')) {
    return parse_css.CombinatorType.ADJACENT_SIBLING;
  } else if (isDelim(token, '~')) {
    return parse_css.CombinatorType.GENERAL_SIBLING;
  }
  goog.asserts.fail('Internal Error: not a combinator token');
}
function combinatorTypeForToken ( token ) { if ( token . tokenType === parse_css . TokenType . WHITESPACE ) { return parse_css . CombinatorType . DESCENDANT ; } else if ( isDelim ( token , '>' ) ) { return parse_css . CombinatorType . CHILD ; } else if ( isDelim ( token , '+' ) ) { return parse_css . CombinatorType . ADJACENT_SIBLING ; } else if ( isDelim ( token , '~' ) ) { return parse_css . CombinatorType . GENERAL_SIBLING ; } goog . asserts . fail ( 'Internal Error: not a combinator token' ) ; }
The CombinatorType for a given token; helper function used when
 constructing a Combinator instance.
The CombinatorType for a given token ; helper function used when constructing a Combinator instance .