defunkt/mustache — pull request #140 by josh (2012-07-24 00:42:53+00:00)
Title: Add line offsets to parser ast

Because Mustache has certain whitespace stripping "features", it creates some ambiguous ASTs.

For an example, all of the following generating the same AST.

```
"{{#user}}{{name}}{{/user}}"
"{{#user}}\n{{name}}{{/user}}"
"{{#user}}{{name}}\n{{/user}}"
```

For pure interpretation, its fine. However, I'm trying to provide the correct line offsets in my [mustache-rails](https://github.com/josh/mustache-rails) implementation.

This adds the current line number and column offset to each `:mustache` AST node.

Future: I'm kind of interested in seeing my [buffered generator](https://github.com/josh/mustache-rails/blob/master/lib/action_view/mustache/generator.rb) moved into mustache core. It handles line number exceptions and I think its a little faster than the current string interpolation one. Plus it works nicely with custom buffer's like Rails safe buffer stuff.

/cc @defunkt @pvande