function getAssociativity (_node, parenthesis) {
  let node = _node
  if (parenthesis !== 'keep') {
    // ParenthesisNodes are only ignored when not in 'keep' mode
    node = _node.getContent()
  }
  const identifier = node.getIdentifier()
  const index = getPrecedence(node, parenthesis)
  if (index === null) {
    // node isn't in the list
    return null
  }
  const property = properties[index][identifier]

  if (hasOwnProperty(property, 'associativity')) {
    if (property.associativity === 'left') {
      return 'left'
    }
    if (property.associativity === 'right') {
      return 'right'
    }
    // associativity is invalid
    throw Error('\'' + identifier + '\' has the invalid associativity \'' +
                property.associativity + '\'.')
  }

  // associativity is undefined
  return null
}
Get the associativity of an operator (left or right).
Returns a string containing 'left' or 'right' or null if
the associativity is not defined.

@param {Node} _node
@param {string} parenthesis
@return {string|null}
@throws {Error}