code: private static String extractStringFromStringExprNode(Node node)
        throws MalformedException {
      switch (node.getToken()) {
        case STRING:
          return node.getString();
        case TEMPLATELIT:
          if (node.hasOneChild()) {
            // Cooked string can be null only for tagged template literals.
            // A tagged template literal would hit the default case below.
            return checkNotNull(node.getFirstChild().getCookedString());
          } else {
            throw new MalformedException(
                "Template literals with substitutions are not allowed.", node);
          }
        case ADD:
          StringBuilder sb = new StringBuilder();
          for (Node child : node.children()) {
            sb.append(extractStringFromStringExprNode(child));
          }
          return sb.toString();
        default:
          throw new MalformedException(
              "STRING or ADD node expected; found: " + node.getToken(), node);
      }
    }
docs: Returns the string value associated with a node representing a JS string or
  several JS strings added together (e.g. {@code 'str'} or {@code 's' + 't' +
  'r'}).
  
  @param node the node from where we extract the string
  @return String representation of the node
  @throws MalformedException if the parsed message is invalid