File: nested.ml

package info (click to toggle)
ocaml-sedlex 3.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 792 kB
  • sloc: ml: 7,866; makefile: 24; sh: 9
file content (9 lines) | stat: -rw-r--r-- 237 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
let%expect_test _ =
  let lb = Sedlexing.Utf8.from_string "ab" in
  let res =
    match%sedlex lb with
      | 'a' -> ( match%sedlex lb with 'b' -> "ok" | _ -> "error")
      | _ -> "error"
  in
  print_endline res;
  [%expect {| ok |}]