src/som/compiler/JsonTreeTranslator.java
private boolean[] isDefForLocals(final JsonObject node) {
    List<Boolean> isDefsList = new ArrayList<Boolean>();
    for (JsonElement element : body(node)) {
      String type = nodeType(element.getAsJsonObject());
      if (type.equals("def-declaration")) {
        isDefsList.add(true);
      } else if (type.equals("var-declaration")) {
        isDefsList.add(false);
      }
    }
    boolean[] isDefs = new boolean[isDefsList.size()];
    int i = 0;
    for (boolean isDef : isDefsList) {
      isDefs[i++] = isDef;
    }
    return isDefs;
  }
/**
   * Gets a mapping between the nth local and whether it is a def statement.
   *
   * @param node
   * @return An array representing the nth local and if it is a def.
   */
Gets a mapping between the nth local and whether it is a def statement.
@param node
@return An array representing the nth local and if it is a def.
Gets a mapping between the nth local and whether it is a def statement . @param node @return An array representing the nth local and if it is a def .
private boolean[] isDefForLocals(final JsonObject node) {
    List<Boolean> isDefsList = new ArrayList<Boolean>();
    for (JsonElement element : body(node)) {
      String type = nodeType(element.getAsJsonObject());
      if (type.equals("def-declaration")) {
        isDefsList.add(true);
      } else if (type.equals("var-declaration")) {
        isDefsList.add(false);
      }
    }
    boolean[] isDefs = new boolean[isDefsList.size()];
    int i = 0;
    for (boolean isDef : isDefsList) {
      isDefs[i++] = isDef;
    }
    return isDefs;
  }
private boolean [ ] isDefForLocals ( final JsonObject node ) { List < Boolean > isDefsList = new ArrayList < Boolean > ( ) ; for ( JsonElement element : body ( node ) ) { String type = nodeType ( element . getAsJsonObject ( ) ) ; if ( type . equals ( "def-declaration" ) ) { isDefsList . add ( true ) ; } else if ( type . equals ( "var-declaration" ) ) { isDefsList . add ( false ) ; } } boolean [ ] isDefs = new boolean [ isDefsList . size ( ) ] ; int i = 0 ; for ( boolean isDef : isDefsList ) { isDefs [ i ++ ] = isDef ; } return isDefs ; }
Gets a mapping between the nth local and whether it is a def statement.
Gets a mapping between the nth local and whether it is a def statement .