[WIP] Start implementing execution in the new TS version
This commit is contained in:
@@ -4,6 +4,7 @@ import {Input} from './vm/input.js'
|
||||
import {Lexer} from "./vm/lexer.js";
|
||||
import {Parser} from "./vm/parser.js";
|
||||
import {commands} from "./vm/commands/index.js";
|
||||
import {Executor} from "./vm/vm.js";
|
||||
|
||||
const lifecycle = new Lifecycle()
|
||||
const input = new Input()
|
||||
@@ -16,6 +17,9 @@ lexer.subscribe(token => log.verbose('token', token))
|
||||
const parser = new Parser(commands, lexer)
|
||||
parser.subscribe(exec => log.verbose('exec', exec))
|
||||
|
||||
const exec = new Executor(parser)
|
||||
exec.subscribe(state => state.output())
|
||||
|
||||
input.setupPrompt()
|
||||
|
||||
process.on('SIGINT', () => lifecycle.close())
|
||||
|
||||
Reference in New Issue
Block a user