Skip to content

Instantly share code, notes, and snippets.

@PollRobots
Created February 1, 2013 07:46
Show Gist options
  • Save PollRobots/4689984 to your computer and use it in GitHub Desktop.
Save PollRobots/4689984 to your computer and use it in GitHub Desktop.
| Sequence x | Choice x as y ->
let fn = match y with | Sequence _ -> "Sequence" | Choice _ -> "Choice" | _ -> failwith "Internal Error"
let processItem index item =
ibprintfn b 0 ""
ibprintfn b (i + 4) "(fun offset -> "
codeGen b (i + 8) item
ibprintf b 0 ");"
ibprintf b i "let l = ["
List.iteri processItem x
ibprintf b 0 "] in match%s input offset l" fn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment