You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.
I'm able to get a switch statement out of Eco when I remove when from the dedent regular expression in scanner.coffee, then create a template that expresses a switch statement on a single line, with no text between the switch and when statements.
There would have to be logic added to the scanner or preprocessors that turns off text gathering while in a switch. The first when would have to not dedent.
Picking at this. It's not pretty. Because when is in the dedent regex, I imagine that supporting switch is desired, but not there yet. I can implement it if is desired, or create an implementation and @sstephenson can decide if it is worth adding the clutter to scanner.
An example implementation can be found in this branch.
It seems that you cannot have a Coffeescript switch statement in an eco template:
http://stackoverflow.com/questions/8920981/can-i-use-a-coffeescript-switch-block-in-eco
Or if you can, it is not obvious how.
The text was updated successfully, but these errors were encountered: