function groupingVariables(node) {
  /** @type { { [kind in VariableKind]?: VVariable[] } } */
  const result = {}
  for (const variable of node.variables) {
    const vars = result[variable.kind] || (result[variable.kind] = [])
    vars.push(variable)
  }
  return result
}
Groups variables by directive kind.
@param {VElement} node The element node
@returns { { [kind in VariableKind]?: VVariable[] } } The variables of grouped by directive kind.