The problem is, all but the most trivial syntax highlighting requires some kind of *context* instead of simple pattern matching. For instance, in the following script,
Code:
ffc script foo {
void run()
{
Screen->D[0] = 1;
{
int Screen = 0;
Screen = Screen*2;
}
}
}
the syntax highlighter would need to understand that the first instance of Screen should be highlighted in the "built-in" color, but that the next two lines are just normal variables.
The compiler can figure things out of course, but at compile time, not during real-time editing.