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

Method translate

src/chap14/ToJava.java:279–287  ·  view source on GitHub ↗
(String expr)

Source from the content-addressed store, hash-verified

277 @Reviser public static class ArgumentsEx extends TypeChecker.ArgumentsEx {
278 public ArgumentsEx(List<ASTree> c) { super(c); }
279 public String translate(String expr) {
280 StringBuilder code = new StringBuilder(expr);
281 code.append('(').append(ENV);
282 for (int i = 0; i < size(); i++)
283 code.append(',')
284 .append(translateExpr(child(i), argTypes[i],
285 funcType.parameterTypes[i]));
286 return code.append(')').toString();
287 }
288 public Object eval(Environment env, Object value) {
289 if (!(value instanceof JavaFunction))
290 throw new StoneException("bad function", this);

Callers

nothing calls this directly

Calls 5

translateExprMethod · 0.80
appendMethod · 0.45
sizeMethod · 0.45
childMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected