You might want to run with a custom build that doesn't have that swap in it... Or if there's a way to pass the language type into the grammar class constructor some of those rules could be made to vary based on what the target language is.
Hi,
Cheers,
John
--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.
There was an question about using spark as a template engine to output csharp source code - but the elements that look natural in an html or xml template look really out of place in a csharp file.
So that was an example of looking into creating an entirely different cs-file-friendly syntax. That syntax wouldn't need to understand elements and attributes at all - probably based more on something that looked like specialized comments.
In the end he said the normal spark syntax worked quite well, even when mixed in with text that wasn't anything like markup, so the alternate csharp syntax remains essentially incomplete, unused, and unnecessary.
But yeah, in general, adding an alternate syntax provider is a very powerful way of taking control of the entire text-to-nodes parsing stage. You can introduce any syntax concepts you would like - and the rest of the system of node visitors recognizing special elements and attributes is still intact and runs after the syntax provider is done.