machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Added else-if block support #235

Closed thec0keman closed 9 years ago

thec0keman commented 9 years ago

This adds basic else if support.

I had to extract the logic for mustache attrs from mustache-parser.pegjs so that the else blocks could reuse it. I'm not as happy with how that ended up since some rules had to be duplicated across the 3 mustache- pegjs files.

This also required some changes to the api for invertible nodes so that they could be nested.