I am currently working on a terminal-based text editor. I want to support a type of syntax highlighting for .ml files I open up in the text editor. I was thinking that if there was a way that I could access the lexer used for OCaml in general, then maybe I could use that lexer to color the text I read from .ml files appropriately.
Is this possible?