Skip to content

Instantly share code, notes, and snippets.

@PollRobots
Created February 1, 2013 07:52
Show Gist options
  • Save PollRobots/4690005 to your computer and use it in GitHub Desktop.
Save PollRobots/4690005 to your computer and use it in GitHub Desktop.
| ZeroOrMore x | OneOrMore x | Optional x | And x | Not x as y ->
let fn = match y with | ZeroOrMore _ -> "ZeroOrMore" | OneOrMore _ -> "OneOrMore" | Optional _ -> "Optional" | And _ -> "And" | Not _ -> "Not" | _ -> failwith "Internal Error"
ibprintfn b i "match%s input offset (fun offset -> " fn
codeGen b (i + 8) x
ibprintf b 0 ");"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment