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

Method eval

src/chap10/ArrayEvaluator.java:17–24  ·  view source on GitHub ↗
(Environment env)

Source from the content-addressed store, hash-verified

15 @Reviser public static class ArrayLitEx extends ArrayLiteral {
16 public ArrayLitEx(List<ASTree> list) { super(list); }
17 public Object eval(Environment env) {
18 int s = numChildren();
19 Object[] res = new Object[s];
20 int i = 0;
21 for (ASTree t: this)
22 res[i++] = ((ASTreeEx)t).eval(env);
23 return res;
24 }
25 }
26 @Reviser public static class ArrayRefEx extends ArrayRef {
27 public ArrayRefEx(List<ASTree> c) { super(c); }

Callers 2

evalMethod · 0.45
computeAssignMethod · 0.45

Calls 1

numChildrenMethod · 0.45

Tested by

no test coverage detected