Skip to content

Instantly share code, notes, and snippets.

@quackingduck
Last active August 1, 2018 03:44
Show Gist options
  • Save quackingduck/28127ff6ec45c87308cae7854ae30fd0 to your computer and use it in GitHub Desktop.
Save quackingduck/28127ff6ec45c87308cae7854ae30fd0 to your computer and use it in GitHub Desktop.
ric session*
ric session*
start -> analyze
analyze*
lang can run commands -> cmd runner mode
lang can run files & projects -> runner mode
# action: log error
invalid props -> inactive
# entry action: reset if dirty, write lang header, unset dirty
active
# action: log error
socket error -> inactive
# action: send cmd stop to sever, dispose all disposables
clear console -> active
# action: write run file plz if dirty not set
runner mode
# action: set dirty
run -> raw mode
# entry action: spawn input control
cmd runner mode
# action: send command to server
submit input command -> raw mode
raw mode
# action: send input command push msg with keystroke
keystroke -> raw mode
# action: write output
output msg -> raw mode
# action: write result
cmd result msg -> cmd runner mode
# action: write error
cmd error msg -> cmd runner mode
inactive
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment