This commit is contained in:
JanUlrich 2017-02-03 15:22:45 +01:00
parent d064f16de4
commit 8d0f24f2f8

View File

@ -5,6 +5,7 @@ import de.dhbwstuttgart.parser.antlr.Java8Parser;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface; import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.modifier.Modifier; import de.dhbwstuttgart.syntaxtree.modifier.Modifier;
import de.dhbwstuttgart.typecheck.JavaClassRegistry;
import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.CommonTokenStream;
@ -18,7 +19,7 @@ public class JavaTXParser {
CommonTokenStream tokens = new CommonTokenStream(lexer); CommonTokenStream tokens = new CommonTokenStream(lexer);
Java8Parser parser = new Java8Parser(tokens); Java8Parser parser = new Java8Parser(tokens);
Java8Parser.CompilationUnitContext tree = parser.compilationUnit(); Java8Parser.CompilationUnitContext tree = parser.compilationUnit();
SyntaxTreeGenerator generator = new SyntaxTreeGenerator(); SyntaxTreeGenerator generator = new SyntaxTreeGenerator(new JavaClassRegistry());
return generator.convert(tree); return generator.convert(tree);
} }
} }