This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(test
|
||||
(name test)
|
||||
(preprocess (action (run pp/pp.exe %{input-file}))))
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello, world!
|
||||
|
|
@ -0,0 +1 @@
|
|||
print_endline _STRING_
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(executable
|
||||
(name pp))
|
||||
|
||||
(ocamllex pp)
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
rule main = parse
|
||||
| eof { () }
|
||||
| "_STRING_" { Printf.printf "%S" "Hello, world!"; main lexbuf }
|
||||
| _ as c { print_char c; main lexbuf }
|
||||
|
||||
{
|
||||
let () =
|
||||
set_binary_mode_out stdout true;
|
||||
main (Lexing.from_channel (open_in_bin Sys.argv.(1)))
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
This test check that we can preprocess source code with actions
|
||||
|
||||
$ dune runtest --display short 2>&1 | grep " pp"
|
||||
pp dune/test.pp.ml
|
||||
Loading…
Add table
Add a link
Reference in a new issue