Heh. You knew I couldn’t go ten minutes without requesting an API feature…
So, I’m liking the way that the lexer is giving me syntax highlighting. I’ve invented a mini-markup language. Neat!
Now, of course, I want to write a program that parses the markup using the same rules as the syntax highlighter.
Ie, if I’m using this syntax for creating emphasis;
here is an important message
I’d love to get a hierarchical version of the output, something like;
{
doc =
{
text = "here is an ",
markup.italic.script = “important”,
text = “message”
}
}
If, by some stroke of luck, such a thing is available in ST, is it possible to get hold of it?