This certainly is an interesting idea. It seems to me though that all of your application logic is jammed into a single file at the presentation layer. This might suffice for very small apps, and that's fine if it is your goal. I can't imagine that you just define all of your logic in one file.
How would you go about reusing code? Could you potentially separate out logic from your template?
I would also like to see how this could be done more unobtrusively. It would also be good to show what the output html looks like after it is compiled to html.