MCPcopy Index your code
hub / github.com/beanshell/beanshell / eval

Method eval

src/bsh/BSHIfStatement.java:33–49  ·  view source on GitHub ↗
(CallStack callstack, Interpreter interpreter)

Source from the content-addressed store, hash-verified

31 BSHIfStatement(int id) { super(id); }
32
33 public Object eval(CallStack callstack, Interpreter interpreter)
34 throws EvalError
35 {
36 Object ret = null;
37
38 if( evaluateCondition(
39 (SimpleNode)jjtGetChild(0), callstack, interpreter ) )
40 ret = ((SimpleNode)jjtGetChild(1)).eval(callstack, interpreter);
41 else
42 if(jjtGetNumChildren() > 2)
43 ret = ((SimpleNode)jjtGetChild(2)).eval(callstack, interpreter);
44
45 if(ret instanceof ReturnControl)
46 return ret;
47 else
48 return Primitive.VOID;
49 }
50
51 public static boolean evaluateCondition(
52 SimpleNode condExp, CallStack callstack, Interpreter interpreter)

Callers

nothing calls this directly

Calls 4

evaluateConditionMethod · 0.95
jjtGetChildMethod · 0.65
evalMethod · 0.65
jjtGetNumChildrenMethod · 0.65

Tested by

no test coverage detected