mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
async calls WIP
This commit is contained in:
@@ -255,6 +255,10 @@ const external_imports_loaded = (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO refactor, make index controlled property and get it from state instead
|
||||||
|
// of setting to zero
|
||||||
|
const rerun_code = state => run_code(state, 0)
|
||||||
|
|
||||||
const input = (state, code, index) => {
|
const input = (state, code, index) => {
|
||||||
const files = {...state.files, [state.current_module]: code}
|
const files = {...state.files, [state.current_module]: code}
|
||||||
const next = run_code({...state, files}, index, [state.current_module])
|
const next = run_code({...state, files}, index, [state.current_module])
|
||||||
@@ -785,6 +789,7 @@ export const get_initial_state = state => {
|
|||||||
|
|
||||||
export const COMMANDS = {
|
export const COMMANDS = {
|
||||||
input,
|
input,
|
||||||
|
rerun_code,
|
||||||
load_dir,
|
load_dir,
|
||||||
create_file,
|
create_file,
|
||||||
step_into,
|
step_into,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const open_run_window = () => {
|
|||||||
globalThis.run_window.close()
|
globalThis.run_window.close()
|
||||||
}
|
}
|
||||||
globalThis.run_window = open('about:blank')
|
globalThis.run_window = open('about:blank')
|
||||||
|
exec('rerun_code')
|
||||||
}
|
}
|
||||||
|
|
||||||
const read_modules = async () => {
|
const read_modules = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user