MCPcopy Create free account
hub / github.com/QuiltMC/chasm / run

Method run

buildSrc/src/main/java/GenerateParserTask.java:20–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 public abstract DirectoryProperty getOutputDir();
19
20 @TaskAction
21 public void run() {
22 getProject().delete(getOutputDir());
23
24 int returnValue;
25 try {
26 returnValue = Main.mainProgram(
27 getGrammarFile().get().getAsFile().toPath(),
28 getOutputDir().get().getAsFile().toPath(),
29 "java",
30 8,
31 true,
32 Collections.emptyMap()
33 );
34 } catch (Exception e) {
35 throw new RuntimeException(e);
36 }
37
38 if (returnValue != 0) {
39 throw new RuntimeException("JavaCC returned a non-zero exit code.");
40 }
41 }
42}

Callers

nothing calls this directly

Calls 4

getOutputDirMethod · 0.95
getGrammarFileMethod · 0.95
emptyMapMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected