function propName(tree) {
  switch (tree.type) {
    case LITERAL_PROPERTY_NAME: {
      let token = tree.literalToken;
      if (token.isKeyword() || token.type === IDENTIFIER)
        return token.toString();
      return String(tree.literalToken.processedValue);
    }
    case COMPUTED_PROPERTY_NAME:
      return '';
    case PROPERTY_NAME_SHORTHAND:
      return tree.name.toString();
    case METHOD:
    case PROPERTY_NAME_ASSIGNMENT:
    case GET_ACCESSOR:
    case SET_ACCESSOR:
      return propName(tree.name);
  }
}
Matches "Static Semantics: PropName" in the spec.
@param {ParseTree} tree
@return {string}