code: String nameTokenFor(String name) {
          Integer token = nameToToken.get(name);
          if (token == null) {
              token = nameToToken.size();
              nameToToken.put(name, token);
          }
          return "#" + token;
      }
docs: Returns the name token for the given name, creating a new token as
  necessary.