- transpiler now always returns an object
- emit transpiler metadata from evaluate / afterEval - currently logging miniLocations from Repl.jsx
This commit is contained in:
parent
5f271ed127
commit
8e717d2ea1
7 changed files with 25 additions and 19 deletions
|
|
@ -35,11 +35,10 @@ export function repl({
|
|||
}
|
||||
try {
|
||||
await beforeEval?.({ code });
|
||||
let { pattern } = await _evaluate(code, transpiler);
|
||||
|
||||
let { pattern, meta } = await _evaluate(code, transpiler);
|
||||
logger(`[eval] code updated`);
|
||||
setPattern(pattern, autostart);
|
||||
afterEval?.({ code, pattern });
|
||||
afterEval?.({ code, pattern, meta });
|
||||
return pattern;
|
||||
} catch (err) {
|
||||
// console.warn(`[repl] eval error: ${err.message}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue