MCPcopy Create free account
hub / github.com/chibash/stone / translate

Method translate

src/chap14/ToJava.java:209–217  ·  view source on GitHub ↗
(TypeInfo result)

Source from the content-addressed store, hash-verified

207 @Reviser public static class WhileEx extends WhileStmnt {
208 public WhileEx(List<ASTree> c) { super(c); }
209 public String translate(TypeInfo result) {
210 String code = "while(" + ((ASTreeEx)condition()).translate(null)
211 + "!=0){\n" + ((ASTreeEx)body()).translate(result)
212 + "}\n";
213 if (result == null)
214 return code;
215 else
216 return returnZero(result) + "\n" + code;
217 }
218 }
219 @Reviser public static class DefStmntEx3 extends TypeChecker.DefStmntEx2 {
220 public DefStmntEx3(List<ASTree> c) { super(c); }

Callers

nothing calls this directly

Calls 4

returnZeroMethod · 0.80
translateMethod · 0.45
conditionMethod · 0.45
bodyMethod · 0.45

Tested by

no test coverage detected