code: public static ExpressionInfo expressionInfo(String code, JShell state) {
          if (code == null || code.isEmpty()) {
              return null;
          }
          try {
              OuterWrap codeWrap = state.outerMap.wrapInTrialClass(Wrap.methodReturnWrap(code));
              AnalyzeTask at = state.taskFactory.new AnalyzeTask(codeWrap);
              CompilationUnitTree cu = at.firstCuTree();
              if (at.hasErrors() || cu == null) {
                  return null;
              }
              return new ExpressionToTypeInfo(at, cu, state).typeOfExpression();
          } catch (Exception ex) {
              return null;
          }
      }
docs: Entry method: get expression info
  @param code the expression as a string
  @param state a JShell instance
  @return type information