tridactyl/src/state.ts

22 lines
573 B
TypeScript
Raw Normal View History

/* import {normalmode, insertmode} from './parsing' */
2017-11-08 23:20:41 +00:00
import {parser as hintmode_parser} from './hinting_background'
import * as normalmode from "./parsers/normalmode"
import * as insertmode from "./parsers/insertmode"
2017-11-08 23:20:41 +00:00
export type ModeName = 'normal'|'insert'|'hint'
2017-11-08 23:20:41 +00:00
class State {
modes = {
/* normal: normalmode.parser, */
/* insert: insertmode.parser, */
2017-11-08 23:20:41 +00:00
normal: normalmode.parser,
insert: insertmode.parser,
hint: hintmode_parser,
}
mode: ModeName = 'normal'
}
2017-11-08 23:20:41 +00:00
const state = new State()
export {state as default}