MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / exec

Method exec

src/interpreter/index.ts:107–117  ·  view source on GitHub ↗
(script?: Ast.Node[])

Source from the content-addressed store, hash-verified

105
106 @autobind
107 public async exec(script?: Ast.Node[]): Promise<void> {
108 if (script == null || script.length === 0) return;
109 try {
110 await this.collectNs(script);
111 const result = await this._run(script, this.scope, []);
112 assertValue(result);
113 this.log('end', { val: result });
114 } catch (e) {
115 this.handleError(e);
116 }
117 }
118
119 @autobind
120 public execSync(script?: Ast.Node[]): Value | undefined {

Callers 10

exeFunction · 0.95
exeAndGetErrPosFunction · 0.95
exeAndGetErrMessageFunction · 0.95
countSleepsFunction · 0.95
exePausableFunction · 0.95
getAttrFunction · 0.95
interpreter.tsFile · 0.80
getLangVersionFunction · 0.80
mainFunction · 0.80
start.mjsFile · 0.80

Calls 5

collectNsMethod · 0.95
_runMethod · 0.95
logMethod · 0.95
handleErrorMethod · 0.95
assertValueFunction · 0.85

Tested by

no test coverage detected