MCPcopy Create free account
hub / github.com/dynjs/dynjs / interpret

Method interpret

src/main/java/org/dynjs/parser/ast/IfStatement.java:104–114  ·  view source on GitHub ↗
(ExecutionContext context)

Source from the content-addressed store, hash-verified

102 }
103
104 public Completion interpret(ExecutionContext context) {
105 Boolean result = Types.toBoolean(getValue(this.testGet, context, getTest().interpret(context)));
106
107 if (result) {
108 return(invokeCompiledBlockStatement(context, "Then", getThenBlock()));
109 } else if (getElseBlock() != null) {
110 return(invokeCompiledBlockStatement(context, "Else", getElseBlock()));
111 } else {
112 return(Completion.createNormal());
113 }
114 }
115
116}

Callers

nothing calls this directly

Calls 8

toBooleanMethod · 0.95
getTestMethod · 0.95
getThenBlockMethod · 0.95
getElseBlockMethod · 0.95
createNormalMethod · 0.95
interpretMethod · 0.65
getValueMethod · 0.45

Tested by

no test coverage detected