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

Method execute

src/main/java/org/dynjs/runtime/Runner.java:91–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 }
90
91 public Object execute() {
92 try {
93 Completion completion = executionContext().execute(program());
94 if (completion.type == Completion.Type.BREAK || completion.type == Completion.Type.CONTINUE) {
95 throw new ThrowException(executionContext(), executionContext().createSyntaxError("illegal break or continue"));
96 }
97 Object v = completion.value;
98 if (v instanceof Reference) {
99 return ((Reference) v).getValue(context);
100 }
101 return v;
102 } catch (SyntaxError e) {
103 throw new ThrowException(executionContext(), executionContext().createSyntaxError(e.getMessage()));
104 } catch (ParserException e) {
105 throw new ThrowException(executionContext(), e);
106 }
107 }
108
109 public Object evaluate() {
110 try {

Callers 1

evalMethod · 0.95

Calls 6

executionContextMethod · 0.95
programMethod · 0.95
executeMethod · 0.65
createSyntaxErrorMethod · 0.65
getValueMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected