2

I'm working on a syntax highlighter for TextMate and I want to correctly highlight string interpolation. For example:

var count = 0
while (count < 5)
{
    count++
    print("\(count)\n")
}

In this case I already count highlighted as a variabe but I want to be able to have anything in there and have that highlighted correctly. How can I tell the highlighter to recursively parse that bit? Here's what I have now:

{   name = 'string.quoted.double.moo';
    begin = '"';
    end = '"';
    patterns = (
        {   name = 'keyword.operator.moo';
            match = '\\\((?<var>.*?)\)';
            captures = { var = { name = 'constant.language.moo'; }; };
        },
    );
},
CaseyB
  • 24,780
  • 14
  • 77
  • 112

0 Answers0