MCPcopy Index your code
hub / github.com/bazelbuild/bazel / execIf

Method execIf

src/main/java/net/starlark/java/eval/Eval.java:233–242  ·  view source on GitHub ↗
(StarlarkThread.Frame fr, IfStatement node)

Source from the content-addressed store, hash-verified

231 }
232
233 private static TokenKind execIf(StarlarkThread.Frame fr, IfStatement node)
234 throws EvalException, InterruptedException {
235 boolean cond = Starlark.truth(eval(fr, node.getCondition()));
236 if (cond) {
237 return execStatements(fr, node.getThenBlock(), /* indented= */ true);
238 } else if (node.getElseBlock() != null) {
239 return execStatements(fr, node.getElseBlock(), /* indented= */ true);
240 }
241 return TokenKind.PASS;
242 }
243
244 private static void execLoad(StarlarkThread.Frame fr, LoadStatement node) throws EvalException {
245 // Has the application defined a behavior for load statements in this thread?

Callers 1

execMethod · 0.95

Calls 6

truthMethod · 0.95
evalMethod · 0.95
execStatementsMethod · 0.95
getThenBlockMethod · 0.80
getElseBlockMethod · 0.80
getConditionMethod · 0.45

Tested by

no test coverage detected