From e3edd0410a51a9266159c1108ba59edf649e4964 Mon Sep 17 00:00:00 2001 From: luca9913 Date: Sat, 3 Jun 2023 18:59:11 +0200 Subject: [PATCH] added astprinter to parsertest --- src/test/java/parser/GeneralParserTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/java/parser/GeneralParserTest.java b/src/test/java/parser/GeneralParserTest.java index 9f9a32ca..53f503e5 100644 --- a/src/test/java/parser/GeneralParserTest.java +++ b/src/test/java/parser/GeneralParserTest.java @@ -9,6 +9,7 @@ import java.util.stream.Collectors; import de.dhbwstuttgart.core.JavaTXCompiler; import de.dhbwstuttgart.parser.JavaTXParser; +import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter; import org.junit.Test; @@ -41,11 +42,13 @@ public class GeneralParserTest { filenames.add("PackageNameTest.jav"); filenames.add("AntlrTest.jav"); // filenames.add("Java17Rules.jav"); - filenames.add("NestedPattern.jav"); + // filenames.add("NestedPattern.jav"); try { for (String filename : filenames) { System.out.println(filename); - new JavaTXCompiler(new File(rootDirectory + filename)); + File sf = new File(rootDirectory + filename); + JavaTXCompiler compiler = new JavaTXCompiler(sf); + System.out.println(ASTPrinter.print(compiler.sourceFiles.get(sf))); } // new JavaTXCompiler(filenames.stream().map(s -> new File(rootDirectory + // s)).collect(Collectors.toList()));