@Test public void testMappedComments() { TopLevelTree kotlinTree = (TopLevelTree) converter .parse("\n TopLevelTree slangTree = (TopLevelTree) new SLangConverter() .parse("\n assertThat(kotlinTree.allComments()).hasSize(3); assertThat(kotlinTree.allComments()).isNotEqualTo(slangTree.allComments()); List<String> slangCommentsWithDelimiters = slangTree.allComments().stream().map(Comment::text).collect(Collectors.toList()); assertThat(kotlinTree.allComments()).extracting(Comment::text).isEqualTo(slangCommentsWithDelimiters); }
@Override public Tree parse(String content) { KotlinTree kotlinTree = new KotlinTree(content); KotlinTreeVisitor kotlinTreeVisitor = new KotlinTreeVisitor(kotlinTree.psiFile, kotlinTree.metaDataProvider); return kotlinTreeVisitor.getSLangAST(); }
KotlinConverter implements ASTConverter { @Override public Tree parse(String content) { KotlinTree kotlinTree = new KotlinTree(content); KotlinTreeVisitor kotlinTreeVisitor = new KotlinTreeVisitor(kotlinTree.psiFile, kotlinTree.metaDataProvider); return kotlinTreeVisitor.getSLangAST(); } }
KotlinConverter implements ASTConverter { @Override public Tree parse(String content) { KotlinTree kotlinTree = new KotlinTree(content); KotlinTreeVisitor kotlinTreeVisitor = new KotlinTreeVisitor(kotlinTree.psiFile, kotlinTree.metaDataProvider); return kotlinTreeVisitor.getSLangAST(); }  }
KotlinConverter implements ASTConverter { @Override public Tree parse(String content) { KotlinTree kotlinTree = new KotlinTree(content); KotlinTreeVisitor kotlinTreeVisitor = new KotlinTreeVisitor(kotlinTree.psiFile, kotlinTree.metaDataProvider); return kotlinTreeVisitor.getSLangAST(); }  @Override Tree parse(String content); }
KotlinConverter implements ASTConverter { @Override public Tree parse(String content) { KotlinTree kotlinTree = new KotlinTree(content); KotlinTreeVisitor kotlinTreeVisitor = new KotlinTreeVisitor(kotlinTree.psiFile, kotlinTree.metaDataProvider); return kotlinTreeVisitor.getSLangAST(); }  @Override Tree parse(String content);  }