src/com/google/javascript/jscomp/NodeUtil.java
/**
   * Return if the node is possibly a string.
   *
   * @param n The node.
   * @param useType If true and the node has a primitive type, return true if that type is string
   *     and false otherwise.
   * @return Whether the results is possibly a string.
   */
Return if the node is possibly a string.
@param n The node.
@param useType If true and the node has a primitive type, return true if that type is string
and false otherwise.
@return Whether the results is possibly a string.
Return if the node is possibly a string . @param n The node . @param useType If true and the node has a primitive type return true if that type is string and false otherwise . @return Whether the results is possibly a string .
static boolean mayBeString(Node n, boolean useType) {
    if (useType) {
      JSType type = n.getJSType();
      if (type != null) {
        if (type.isStringValueType()) {
          return true;
        } else if (type.isNumberValueType() || type.isBooleanValueType() || type.isNullType()
            || type.isVoidType()) {
          return false;
        }
      }
    }
    return mayBeString(getKnownValueType(n));
  }
static boolean mayBeString ( Node n , boolean useType ) { if ( useType ) { JSType type = n . getJSType ( ) ; if ( type != null ) { if ( type . isStringValueType ( ) ) { return true ; } else if ( type . isNumberValueType ( ) || type . isBooleanValueType ( ) || type . isNullType ( ) || type . isVoidType ( ) ) { return false ; } } } return mayBeString ( getKnownValueType ( n ) ) ; }
Return if the node is possibly a string.
Return if the node is possibly a string .