Get node with a declaration
@return {Array} `['declaration', ['property', x], ['propertyDelim'],
['value', y]]`
18656
function getDeclaration1() {
  const type = NodeType.DeclarationType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = [];

  content.push(getProperty());
  if (checkS(pos)) content.push(getS());
  content.push(getPropertyDelim());
  if (checkS(pos)) content.push(getS());
  content.push(getValue());

  return newNode(type, content, line, column);
}
945846
function getAtruler() {
  const type = NodeType.AtruleType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = [].concat(
    getAtkeyword(),
    getTsets(),
    getAtrulers()
  );

  return newNode(type, content, line, column);
}
611720
function getProperty1() {
  const type = NodeType.PropertyType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = getIdentOrInterpolation();

  return newNode(type, content, line, column);
}
934920
function(){
    var obj = new nodes.Object
      , id, val, comma, hash;
    this.expect('{');
    this.skipWhitespace();

    while (!this.accept('}')) {
      if (this.accept('comment')
        || this.accept('newline')) continue;

      if (!comma) this.accept(',');
      id = this.accept('ident') || this.accept('string');

      if (!id) {
        this.error('expected "ident" or "string", got {peek}');
      }

      hash = id.val.hash;

      this.skipSpacesAndComments();
      this.expect(':');

      val = this.expression();

      obj.setValue(hash, val);
      obj.setKey(hash, id.val);

      comma = this.accept(',');
      this.skipWhitespace();
    }

    return obj;
  }
161532
function literalNode (value) {
  if (value === undefined) {
    return {
      type: 'Identifier',
      name: 'undefined'
    };
  }
  else if (typeof value == 'function') {
    throw Error('Unist property contains a function');
  }
  else if (value === null || typeof value != 'object') {
    return {
      type: 'Literal',
      value: value
    };
  }
  else if (Array.isArray(value)) {
    return {
      type: 'ArrayExpression',
      elements: value.map(literalNode)
    };
  }
  else {
    return {
      type: 'ObjectExpression',
      properties: Object.keys(value).map(function (key) {
        return {
          type: 'Property',
          key: {
            type: 'Identifier',
            name: key
          },
          value: literalNode(value[key])
        };
      })
    };
  }
}
129326
private function getNodeChildrenProperties(NodePath $nodePath, string $property) : array
    {
        $nodeData = $this->getNode($nodePath);
        $result = [];
        if (!empty($nodeData)) {
            if ($nodeData['nodeType'] == 'object') {
                foreach ($nodeData as $itemName => $value) {
                    if (is_array($value)) {
                        $itemName = $this->decodeNodeName($itemName);
                        // it is a child node
                        if (isset($value[$property])) {
                            $result[$itemName] = $value[$property];
                        } else {
                            $result[$itemName] = null;
                        }
                    }
                }
            } elseif ($nodeData['nodeType'] == 'scalar') {
                foreach ($nodeData as $itemName => $value) {
                    if ($itemName == $property) {
                        $result[$nodePath->getLast()] = $value;
                    }
                }
            }
        }
        return $result;
    }
516114
function declaration() {
    var pos = position();

    // prop
    var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
    if (!prop) return;
    prop = trim(prop[0]);

    // :
    if (!match(/^:\s*/)) return error("property missing ':'");

    // val
    var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);

    var ret = pos({
      type: 'declaration',
      property: prop.replace(commentre, ''),
      value: val ? trim(val[0]).replace(commentre, '') : ''
    });

    // ;
    match(/^[;\s]*/);

    return ret;
  }
1205560
function getParentheses() {
  const type = NodeType.ParenthesesType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const right = token.right;
  let content = [];

  // Skip `(`.
  pos++;

  if (pos < right) {
    content = getTsets();
  }

  const end = getLastPosition(content, line, column, 1);

  // Skip `)`.
  pos++;

  return newNode(type, content, line, column, end);
}
345165
function getPseudoClass1() {
  const type = NodeType.PseudocType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = [];

  // Skip `:`.
  pos++;

  content.push(getIdent());

  {
    const type = NodeType.ArgumentsType;
    const token = tokens[pos];
    const line = token.ln;
    const column = token.col;

    // Skip `(`.
    pos++;

    const selectorContent = [].concat(
      getSC(),
      getSelectorsGroup(),
      getSC()
    );

    const end = getLastPosition(selectorContent, line, column, 1);
    const args = newNode(type, selectorContent, line, column, end);
    content.push(args);

    // Skip `)`.
    pos++;
  }

  return newNode(type, content, line, column);
}
789216
private function constDeclaration() {
    $node = new ConstantDeclarationNode();
    $name_node = new NameNode();
    $this->mustMatch(T_STRING, $name_node, NULL, TRUE);
    $node->addChild($name_node, 'name');
    if ($this->mustMatch('=', $node)) {
      $node->addChild($this->staticScalar(), 'value');
    }
    return $node;
  }
436940
function getStateVariableDeclarationsFormContractNode (contractNode) {
  if (!isContractDefinition(contractNode)) throw new Error('staticAnalysisCommon.js: not a contract definition declaration')
  if (!contractNode.children) return []
  return contractNode.children.filter((el) => isVariableDeclaration(el))
}
193078
function() {
    var node = this.primary();
    if (node) {
      while (this.accept('.')) {
        var id = new nodes.Ident(this.expect('ident').val.string);
        node = new nodes.Member(node, id);
      }
      this.skipSpaces();
      if (this.accept('=')) {
        node.val = this.list();
        // @block support
        if (node.val.isEmpty) this.assignAtblock(node.val);
      }
    }
    return node;
  }
1314880
function getS() {
  const type = NodeType.SType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = joinValues(pos, tokens[pos].ws_last);

  pos = tokens[pos].ws_last + 1;

  return newNode(type, content, line, column);
}
96175
function getExplicitLabels({ actualNode }) {
	if (!actualNode.id) {
		return [];
	}
	return dom.findElmsInContext({
		elm: 'label',
		attr: 'for',
		value: actualNode.id,
		context: actualNode
	});
}
233353
function(node) {
        var data = []

        for (var i = 0, len = node.childNodes.length; i < len; i++) {
            var child = node.childNodes[i]
            if (child.nodeType != ELEMENT_NODE) {
                continue
            }

            data.push(this._parseNode(child))
        }

        return data
    }
681941
function declaration() {
        match(/^([;\s]*)+/); // ignore empty declarations + whitespace

        const comment_regexp = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
        let prop = match(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);

        if (!prop) {
            return;
        }

        prop = prop[0].trim();

        if (!match(/^:\s*/)) {
            return error('property missing \':\'');
        }

        // Quotes regex repeats verbatim inside and outside parentheses
        const val = match(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/);
        const ret = {
            type    : 'declaration',
            property: prop.replace(comment_regexp, ''),
            value   : val ? val[0].replace(comment_regexp, '').trim() : ''
        };

        match(/^[;\s]*/);

        return ret;
    }
327510
function parseVariableDeclarations(string) {

  // Do not parse empty files. Otherwise gonzales.parse will fail
  if (!string) {
    return [];
  }

  var out = [],
      ast = gonzales.parse(string, {
        syntax: 'less'
      });
  // Exclude functions arguments
  ast.traverse(function(node, index, parent) {
    if (node.is('arguments')) {
      parent.removeChild(index);
    }
  });
  ast.traverseByType('declaration', function(decl) {
    // Only consider @variable: value declarations
    var varName,
        varFullName,
        varVal = '',
        varLine = 1;
    decl.traverseByType('variable', function(varNode) {
      varName = varNode.content.toString();
      varFullName = varNode.toString();
      decl.traverseByType('value', function(valNode) {
        varVal = valNode.toString();
        varLine = valNode.start.line;
      });
      if (varFullName !== varVal) {
        out.push({
          name: varName,
          value: varVal.trim(),
          line: varLine
        });
      }
    });
  });
  return out;
}