validator/engine/css-selectors.js
/**
 * Whether or not the provided token could be the start of a simple
 * selector sequence. See the simple_selector_sequence production in
 * http://www.w3.org/TR/css3-selectors/#grammar.
 * @param {!parse_css.Token} token
 * @return {boolean}
 */
Whether or not the provided token could be the start of a simple
selector sequence.
Whether or not the provided token could be the start of a simple selector sequence .
function isSimpleSelectorSequenceStart(token) {
  if (isDelim(token, '*') || isDelim(token, '|') ||
      (token.tokenType === parse_css.TokenType.IDENT)) {
    return true;
  }
  if (token.tokenType === parse_css.TokenType.HASH) {
    return true;
  }
  if (isDelim(token, '.')) {
    return true;
  }
  if (token.tokenType === parse_css.TokenType.OPEN_SQUARE) {
    return true;
  }
  if (token.tokenType === parse_css.TokenType.COLON) {
    return true;
  }
  return false;
}
function isSimpleSelectorSequenceStart ( token ) { if ( isDelim ( token , '*' ) || isDelim ( token , '|' ) || ( token . tokenType === parse_css . TokenType . IDENT ) ) { return true ; } if ( token . tokenType === parse_css . TokenType . HASH ) { return true ; } if ( isDelim ( token , '.' ) ) { return true ; } if ( token . tokenType === parse_css . TokenType . OPEN_SQUARE ) { return true ; } if ( token . tokenType === parse_css . TokenType . COLON ) { return true ; } return false ; }
Whether or not the provided token could be the start of a simple
 selector sequence.
Whether or not the provided token could be the start of a simple selector sequence .
// Type selector start. // Id selector start. // Class selector start. // Attr selector start. // A pseudo selector. // TODO(johannes): add the others.