class TreeMetaDataProvider {

  public Token keyword(TextRange textRange) {
    List<Token> keywordsInRange = getElementsInRange(sortedTokens, textRange).stream()
      .filter(t -> t.type() == Token.Type.KEYWORD)
      .collect(Collectors.toList());
    if (keywordsInRange.size() != 1) {
      throw new IllegalArgumentException("Cannot find single keyword in " + textRange);
    }
    return keywordsInRange.get(0);
  }

  public  TreeMetaDataProvider(List<Comment> comments, List<Token> tokens);

}