blob: 4822d97ac2a46164465aa34760078038f438c07b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package org.zwobble.couscous;
import org.zwobble.couscous.ast.TypeNode;
import org.zwobble.couscous.frontends.java.JavaFrontend;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
public class CouscousCompiler {
private final JavaFrontend frontend;
private final Backend backend;
public CouscousCompiler(JavaFrontend frontend, Backend backend) {
this.frontend = frontend;
this.backend = backend;
}
public void compileDirectory(List<Path> sourcePaths, Path path) throws IOException {
List<TypeNode> classes = frontend.readSourceDirectory(sourcePaths, path);
backend.compile(classes);
}
}
|