by robert » Sun Nov 11, 2012 4:25 am
Code folding and multi-line comment highlighting were added to SVN in commit 699. They'll be in the 2.0.5 release, which will hopefully be in a week.
As for XML literals, this will be tougher. RSTA already supports this for JavaScript (e4x), but we have an easy way to know when the XML literal is terminated there - stop on the first ';' character. In the case of Scala, this doesn't seem to be something we can rely on. The only way I can think of implementing this is to require the XML literal to be a single element with child content, i.e. this would be valid:
scala code:
val foo = <html>
<body>
Hello world!
</body>
</html>
But this would not be:
scala code:
val2 = <script>
doSomething();
</script>
<script>
doSomethingElse();
</script>
For all I know, this is also enforced by the actual Scala compiler. If it actually does handle the second scenario, then I congratulate them on writing such an intelligent parser.

But it's probably more than RSTA's parsing capabilities can currently handle.
Can you confirm that the first scenario is all that would need to be handled? If so, the parser will probably count the number of opening tags and closing tags, and when the net amount == 0, assume the XML literal has ended.
Code folding and multi-line comment highlighting were added to SVN in commit 699. They'll be in the 2.0.5 release, which will hopefully be in a week.
As for XML literals, this will be tougher. RSTA already supports this for JavaScript (e4x), but we have an easy way to know when the XML literal is terminated there - stop on the first ';' character. In the case of Scala, this doesn't seem to be something we can rely on. The only way I can think of implementing this is to require the XML literal to be a single element with child content, i.e. this would be valid:
[code2=scala]val foo = <html>
<body>
Hello world!
</body>
</html>[/code2]
But this would not be:
[code2=scala]val2 = <script>
doSomething();
</script>
<script>
doSomethingElse();
</script>[/code2]
For all I know, this is also enforced by the actual Scala compiler. If it actually does handle the second scenario, then I congratulate them on writing such an intelligent parser. :P But it's probably more than RSTA's parsing capabilities can currently handle.
Can you confirm that the first scenario is all that would need to be handled? If so, the parser will probably count the number of opening tags and closing tags, and when the net amount == 0, assume the XML literal has ended.