mte/unikernel/duniverse/cppo/examples/lexer.mll
2025-11-11 02:07:51 +01:00

9 lines
206 B
OCaml

(* Warning: ocamllex doesn't accept cppo directives
within the rules section. *)
rule token = parse
['a'-'z']+ { `String (Lexing.lexeme lexbuf) }
{
#ifndef NOFOO
let foo () = ()
#endif
}