Commit 8d168760 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-06-17 16:05:23 by cvscast] Simplify unhilight.cd -- Alain

Original author: cvscast
Date: 2003-06-17 16:05:23+00:00
parent 58bc2a6d
let highlight (Latin1 -> Latin1)
| [ '{{' h ::(Char *?) '}}' ; rest ] ->
[ !h ; highlight rest ]
| [ '%%' h ::(Char *?) '%%' ; rest ] ->
[ !h ; highlight rest ]
| [ c; rest ] -> [ c; highlight rest ]
| [] -> []
;;
match argv with
| [ f ] -> print (highlight (load_file f))
| [ f ] -> let [ ('{{' h ::(_ *?) '}}'| h::_)* ] = load_file f in print h
| _ -> raise "Specify an input file !"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment