MCPcopy Create free account
hub / github.com/badvision/jace / compile

Method compile

src/main/java/jace/applesoft/ApplesoftHandler.java:24–63  ·  view source on GitHub ↗
(Program program)

Source from the content-addressed store, hash-verified

22 }
23
24 @Override
25 public CompileResult<ApplesoftProgram> compile(Program program) {
26 final ApplesoftProgram result = ApplesoftProgram.fromString(program.getValue());
27 final Map<Integer, String> warnings = new LinkedHashMap<>();
28// int lineNumber = 1;
29// for (Line l : result.lines) {
30// warnings.put(lineNumber++, l.toString());
31// }
32 return new CompileResult<ApplesoftProgram>() {
33 @Override
34 public boolean isSuccessful() {
35 return result != null;
36 }
37
38 @Override
39 public ApplesoftProgram getCompiledAsset() {
40 return result;
41 }
42
43 @Override
44 public Map<Integer, String> getErrors() {
45 return Collections.emptyMap();
46 }
47
48 @Override
49 public Map<Integer, String> getWarnings() {
50 return warnings;
51 }
52
53 @Override
54 public List<String> getOtherMessages() {
55 return Collections.emptyList();
56 }
57
58 @Override
59 public List<String> getRawOutput() {
60 return Collections.emptyList();
61 }
62 };
63 }
64
65 @Override
66 public void execute(CompileResult<ApplesoftProgram> lastResult) {

Callers

nothing calls this directly

Calls 2

fromStringMethod · 0.95
getValueMethod · 0.65

Tested by

no test coverage detected