code: function findVariables(string) {
    // Do not parse empty files. Otherwise gonzales.parse will fail
    if (!string) {
      return [];
    }
  
    var out = [],
        ast = gonzales.parse(string, {
          syntax: 'less'
        });
  
    ast.traverseByType('value', function(subAst) {
      subAst.traverseByType('variable', function(node) {
        out.push(node.content.toString());
      });
    });
  
    return out;
  }
docs: Parse Style variables to object