src/csscomb.js
function cssToAST(text, syntax, filename) {
  var string = JSON.stringify;
  var fileInfo = filename ? ' at ' + filename : '';
  var tree;

  try {
    tree = gonzales.parse(text, {syntax: syntax});
  } catch (e) {
    throw new Error('Parsing error' + fileInfo + ': ' + e.message);
  }

  // TODO: When can tree be undefined? <tg>
  if (typeof tree === 'undefined') {
    let message = `Undefined tree ${fileInfo}: ${string(text)} =>
                  ${string(tree)}`;
    throw new Error(format(message));
  }

  return tree;
}
function cssToAST(text, syntax, filename) {
  var string = JSON.stringify;
  var fileInfo = filename ? ' at ' + filename : '';
  var tree;

  try {
    tree = gonzales.parse(text, {syntax: syntax});
  } catch (e) {
    throw new Error('Parsing error' + fileInfo + ': ' + e.message);
  }

  // TODO: When can tree be undefined? <tg>
  if (typeof tree === 'undefined') {
    let message = `Undefined tree ${fileInfo}: ${string(text)} =>
                  ${string(tree)}`;
    throw new Error(format(message));
  }

  return tree;
}
Converts CSS string to AST.

@param {String} text CSS string
@param {String} [syntax] Syntax name (e.g., `scss`)
@param {String} [filename]
@returns {Array} AST