Here’s some pseudo-code (that is valid in my language):
However, in my language it’s completely valid to escape out of embedded code to form an expression and insert it into that embedded code:
You can think of the way that works as similar to php:
<?php $variable = "Hello, world!"; ?> <script type="text/html"> alert("<?php echo $variable; ?>"); </script>
The problem is not implementing this, the problem is figuring out how to write something that works for it in my atom language grammar. =P
But now I have no control over the grammar until the JS grammar finishes successfully, and I’m pretty sure when it reaches my
<-$variable-> it’s just going to stop working.
Is there a way I can make an escape back into my grammar temporarily?