mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
WIP
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
const entry = `
|
||||
import {parse, load_modules} from './src/parse_js.js';
|
||||
|
||||
import {get_initial_state} from './src/cmd.js';
|
||||
import {COMMANDS} from './src/cmd.js';
|
||||
//console.time('p');
|
||||
//const parsed = parse(globalThis.module_cache['./src/parse_js.js']);
|
||||
//console.timeEnd('p');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {find_leaf, ancestry, find_node} from '../src/ast_utils.js'
|
||||
import {parse, print_debug_node} from '../src/parse_js.js'
|
||||
import {eval_tree, eval_frame, eval_modules} from '../src/eval.js'
|
||||
import {COMMANDS, get_initial_state} from '../src/cmd.js'
|
||||
import {COMMANDS} from '../src/cmd.js'
|
||||
import {root_calltree_node, active_frame, pp_calltree, get_async_calls}
|
||||
from '../src/calltree.js'
|
||||
import {color_file} from '../src/color.js'
|
||||
@@ -2241,7 +2241,7 @@ const y = x()`
|
||||
}),
|
||||
|
||||
test('get_initial_state toplevel not entrypoint', () => {
|
||||
const s = get_initial_state({
|
||||
const s = COMMANDS.get_initial_state({
|
||||
files: {
|
||||
'' : `import {x} from 'x'; x()`,
|
||||
'x' : `export const x = () => 1; x()`,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {parse, print_debug_node, load_modules} from '../src/parse_js.js'
|
||||
import {eval_tree, eval_frame} from '../src/eval.js'
|
||||
import {get_initial_state} from '../src/cmd.js'
|
||||
import {COMMANDS} from '../src/cmd.js'
|
||||
|
||||
Object.assign(globalThis, {log: console.log})
|
||||
|
||||
@@ -28,7 +28,7 @@ export const assert_code_error = (codestring, error) => {
|
||||
}
|
||||
|
||||
export const test_initial_state = (code, state) => {
|
||||
return get_initial_state(
|
||||
return COMMANDS.get_initial_state(
|
||||
{
|
||||
...state,
|
||||
files: typeof(code) == 'object' ? code : { '' : code},
|
||||
|
||||
Reference in New Issue
Block a user