whoward / cadenza

parser and renderer library for liquid-like templates
13 stars 6 forks source link

Haml inspired Cadenza lexer #32

Open whoward opened 9 years ago

whoward commented 9 years ago

While this won't be the most easiest way to use Cadenza I personally like the succinctness of languages like Haml or Slim and I think this could be applied to Cadenza as well. Here's an example of the syntax that we could hopefully support:

html
   head
      title My Page!
      link rel="stylesheet" href=page.application_css_url
   body
      h1 My Page!
      ul
         {% for item in collection %}
            li class=item.css_class 
               {{ item.name | trim: 30 }}