MCPcopy
hub / github.com/DulLabs/bhai-lang / interpret

Method interpret

packages/interpreter/src/components/interpreter.ts:16–24  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

14 }
15
16 interpret(code: string) {
17 try {
18 const ast = this._parser.parse(code);
19 InterpreterModule.getVisitor(ast.type).visitNode(ast);
20 } finally {
21 // reset the scope for next run
22 InterpreterModule.setCurrentScope(new Scope(null));
23 }
24 }
25}

Callers 3

testRunner.test.tsFile · 0.80
index.tsFile · 0.80
executeCodeFunction · 0.80

Calls 4

parseMethod · 0.80
getVisitorMethod · 0.80
setCurrentScopeMethod · 0.80
visitNodeMethod · 0.65

Tested by

no test coverage detected