code: public Symbol getParameterInFunction(Symbol sym, String paramName) {
      SymbolScope scope = getScopeInFunction(sym);
      if (scope != null) {
        Symbol param = scope.getSlot(paramName);
        if (param != null && param.scope == scope) {
          return param;
        }
      }
      return null;
    }
docs: If {@code sym} is a function, try to find a Symbol for a parameter with the given name.
  
  <p>Returns null if we couldn't find one.
  
  <p>Notice that this just makes a best effort, and may not be able to find parameters for
  non-conventional function definitions. For example, we would not be able to find "y" in this
  code: <code>
  var x = x() ? function(y) {} : function(y) {};
  </code>