public String readDataType(String name) {
    if (name.equals("map")) {
      if (readChar() != '<') throw unexpected("expected '<'");
      String keyType = readDataType();
      if (readChar() != ',') throw unexpected("expected ','");
      String valueType = readDataType();
      if (readChar() != '>') throw unexpected("expected '>'");
      return String.format("map<%s, %s>", keyType, valueType);
    } else {
      return name;
    }
  }
public String readDataType ( String name ) { if ( name . equals ( "map" ) ) { if ( readChar ( ) != '<' ) throw unexpected ( "expected '<'" ) ; String keyType = readDataType ( ) ; if ( readChar ( ) != ',' ) throw unexpected ( "expected ','" ) ; String valueType = readDataType ( ) ; if ( readChar ( ) != '>' ) throw unexpected ( "expected '>'" ) ; return String . format ( "map<%s, %s>" , keyType , valueType ) ; } else { return name ; } }
Reads a scalar, map, or type name with {@code name} as a prefix word.