code: List<SnippetEvent> eval(String userSource) throws IllegalStateException {
          List<SnippetEvent> allEvents = new ArrayList<>();
          for (Snippet snip : sourceToSnippets(userSource)) {
              if (snip.kind() == Kind.ERRONEOUS) {
                  state.maps.installSnippet(snip);
                  allEvents.add(new SnippetEvent(
                          snip, Status.NONEXISTENT, Status.REJECTED,
                          false, null, null, null));
              } else {
                  allEvents.addAll(declare(snip, snip.syntheticDiags()));
              }
          }
          return allEvents;
      }
docs: Evaluates a snippet of source.
  
  @param userSource the source of the snippet
  @return the list of primary and update events
  @throws IllegalStateException