code: public void setParams(List<AstNode> params) {
          if (params == null) {
              this.params = null;
          } else {
              if (this.params != null)
                  this.params.clear();
              for (AstNode param : params)
                  addParam(param);
          }
      }
docs: Sets the function parameter list, and sets the parent for
  each element of the list.
  @param params the function parameter list, or {@code null} if no params