Skip to content

Instantly share code, notes, and snippets.

@chaxiu
Last active October 18, 2020 13:54
Show Gist options
  • Save chaxiu/dcc5b80fbb771a0573ae564718d67931 to your computer and use it in GitHub Desktop.
Save chaxiu/dcc5b80fbb771a0573ae564718d67931 to your computer and use it in GitHub Desktop.
// pseudocode
// marked by label
// ↓ ↓
label: whenStart
when (continuation.label) {
0 -> {
...
}
1 -> {
...
suspendReturn = noSuspendFriendList(user, continuation)
if (suspendReturn == sFlag) {
return suspendReturn
} else {
result = suspendReturn
// Jump to the place marked by label
// To execute the "when expression" again
goto: whenStart
}
}
2 -> {
...
}
3 -> {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment