validator/engine/parse-css.js
/**
 * Appends a simple block's contents to a tokenList, consuming from
 * the stream all those tokens that it adds to the tokenList,
 * including the start/end grouping token.
 * @param {!parse_css.TokenStream} tokenStream
 * @param {!Array<!parse_css.Token>} tokenList output array for tokens.
 */
Appends a simple block's contents to a tokenList, consuming from
the stream all those tokens that it adds to the tokenList,
including the start/end grouping token.
@param {!parse_css.TokenStream} tokenStream
@param {!Array} tokenList output array for tokens.
Appends a simple block ' s contents to a tokenList consuming from the stream all those tokens that it adds to the tokenList including the start / end grouping token . @param { !parse_css . TokenStream } tokenStream @param { !Array } tokenList output array for tokens .
function consumeASimpleBlock(tokenStream, tokenList) {
  const current = tokenStream.current().tokenType;
  goog.asserts.assert(
      (current === parse_css.TokenType.OPEN_CURLY ||
       current === parse_css.TokenType.OPEN_SQUARE ||
       current === parse_css.TokenType.OPEN_PAREN),
      'Internal Error: consumeASimpleBlock precondition not met');
  const startToken =
       (tokenStream.current());
  const mirror = startToken.mirror;
  tokenList.push(startToken);
  while (true) {
    tokenStream.consume();
    const current = tokenStream.current().tokenType;
    if (current === parse_css.TokenType.EOF_TOKEN) {
      tokenList.push(tokenStream.current());
      return;
    } else if (
        (current === parse_css.TokenType.CLOSE_CURLY ||
         current === parse_css.TokenType.CLOSE_SQUARE ||
         current === parse_css.TokenType.CLOSE_PAREN) &&
         (tokenStream.current()).value ===
            mirror) {
      tokenList.push(tokenStream.current());
      return;
    } else {
      consumeAComponentValue(tokenStream, tokenList);
    }
  }
}
function consumeASimpleBlock ( tokenStream , tokenList ) { const current = tokenStream . current ( ) . tokenType ; goog . asserts . assert ( ( current === parse_css . TokenType . OPEN_CURLY || current === parse_css . TokenType . OPEN_SQUARE || current === parse_css . TokenType . OPEN_PAREN ) , 'Internal Error: consumeASimpleBlock precondition not met' ) ; const startToken = ( tokenStream . current ( ) ) ; const mirror = startToken . mirror ; tokenList . push ( startToken ) ; while ( true ) { tokenStream . consume ( ) ; const current = tokenStream . current ( ) . tokenType ; if ( current === parse_css . TokenType . EOF_TOKEN ) { tokenList . push ( tokenStream . current ( ) ) ; return ; } else if ( ( current === parse_css . TokenType . CLOSE_CURLY || current === parse_css . TokenType . CLOSE_SQUARE || current === parse_css . TokenType . CLOSE_PAREN ) && ( tokenStream . current ( ) ) . value === mirror ) { tokenList . push ( tokenStream . current ( ) ) ; return ; } else { consumeAComponentValue ( tokenStream , tokenList ) ; } } }
Appends a simple block's contents to a tokenList, consuming from
 the stream all those tokens that it adds to the tokenList,
 including the start/end grouping token.
Appends a simple block ' s contents to a tokenList consuming from the stream all those tokens that it adds to the tokenList including the start / end grouping token .
/** @type {!parse_css.GroupingToken} */ /** @type {parse_css.GroupingToken} */