src/sass/parse.js
function getUri() {
  const startPos = pos;
  const type = NodeType.UriType;
  const token = tokens[startPos];
  const line = token.ln;
  const column = token.col;
  let content = [];
  let end;

  const uriType = tokens[startPos].uriType;

  // Skip `url` and `(`.
  pos += 2;

  if (uriType === 1) content = content.concat(getUri1());
  else if (uriType === 2) content = content.concat(getUri2());
  else end = getLastPosition(content, line, column, 4);

  if (!end) end = getLastPosition(content, line, column, 1);

  // Skip `)`.
  pos++;

  return newNode(type, content, line, column, end);
}
function getUri() {
  const startPos = pos;
  const type = NodeType.UriType;
  const token = tokens[startPos];
  const line = token.ln;
  const column = token.col;
  let content = [];
  let end;

  const uriType = tokens[startPos].uriType;

  // Skip `url` and `(`.
  pos += 2;

  if (uriType === 1) content = content.concat(getUri1());
  else if (uriType === 2) content = content.concat(getUri2());
  else end = getLastPosition(content, line, column, 4);

  if (!end) end = getLastPosition(content, line, column, 1);

  // Skip `)`.
  pos++;

  return newNode(type, content, line, column, end);
}
function getUri ( ) { const startPos = pos ; const type = NodeType . UriType ; const token = tokens [ startPos ] ; const line = token . ln ; const column = token . col ; let content = [ ] ; let end ; const uriType = tokens [ startPos ] . uriType ; // Skip `url` and `(`. pos += 2 ; if ( uriType === 1 ) content = content . concat ( getUri1 ( ) ) ; else if ( uriType === 2 ) content = content . concat ( getUri2 ( ) ) ; else end = getLastPosition ( content , line , column , 4 ) ; if ( ! end ) end = getLastPosition ( content , line , column , 1 ) ; // Skip `)`. pos ++ ; return newNode ( type , content , line , column , end ) ; }
Get specific type of URI node
@return {Node} Specific type of URI node
Get specific type of URI node