code: public void addAnonymousFunctions() {
      TreeSet<SymbolScope> scopes = new TreeSet<>(lexicalScopeOrdering);
      for (SymbolScope scope : getAllScopes()) {
        if (scope.isLexicalScope()) {
          scopes.add(scope);
        }
      }
  
      for (SymbolScope scope : scopes) {
        addAnonymousFunctionsInScope(scope);
      }
    }
docs: Finds anonymous functions in local scopes, and gives them names and symbols. They will show up
  as local variables with names "function%0", "function%1", etc.