src/less/parse.js
function checkVariable(i) {
  let l;

  if (i >= tokensLength || tokens[i].type !== TokenType.CommercialAt) return 0;

  if (tokens[i - 1] &&
      tokens[i - 1].type === TokenType.CommercialAt &&
      tokens[i - 2] &&
      tokens[i - 2].type === TokenType.CommercialAt) return 0;

  return (l = checkVariable(i + 1) || checkIdent(i + 1)) ? l + 1 : 0;
}
function checkVariable(i) {
  let l;

  if (i >= tokensLength || tokens[i].type !== TokenType.CommercialAt) return 0;

  if (tokens[i - 1] &&
      tokens[i - 1].type === TokenType.CommercialAt &&
      tokens[i - 2] &&
      tokens[i - 2].type === TokenType.CommercialAt) return 0;

  return (l = checkVariable(i + 1) || checkIdent(i + 1)) ? l + 1 : 0;
}
function checkVariable ( i ) { let l ; if ( i >= tokensLength || tokens [ i ] . type !== TokenType . CommercialAt ) return 0 ; if ( tokens [ i - 1 ] && tokens [ i - 1 ] . type === TokenType . CommercialAt && tokens [ i - 2 ] && tokens [ i - 2 ] . type === TokenType . CommercialAt ) return 0 ; return ( l = checkVariable ( i + 1 ) || checkIdent ( i + 1 ) ) ? l + 1 : 0 ; }
Check if token is part of LESS variable
@param {Number} i Token's index number
@returns {Number} Length of the variable
Check if token is part of LESS variable