*.o
lex_*.ml
tide-hl
+tide-hl.rb
let range_stop ctx clr =
Printf.printf "%d,%d,%d\n"
- ctx.pos (lexeme_end ctx.lbuf) (get_color clr)
+ ctx.pos (lexeme_end ctx.lbuf) (get_color clr);
+ ctx.pos <- (-1)
| eof { raise Eof }
and preproc ctx = parse
- | sys_incl { set_color ctx Constant }
+ | sys_incl { set_color ctx String }
| _ { (* skip *) }
| eof { raise Eof }
let ctx = Colormap.({ lbuf = lbuf; pos = 0; }) in
try while true do lexfn ctx lbuf done
with Colormap.Eof ->
+ if ctx.pos >= 0 then Colormap.range_stop ctx Comment;
Printf.printf "0,0,0\n";
flush stdout;
scan_input lexfn