| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This allows us to avoid creating unnecessary AST nodes and avoids things like isHelper.
Side effect of these changes is that @data functions can now have data parameters passed to them.
|
| |
|
|
|
| |
Rather than keeping state in the AST, which requires some gymnastics, we create a separate visitor flow which does the top down iteration necessary to calculate all of the state needed for proper whitespace control evaluation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Part of #889
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
mmun-remove-block-mustache
Conflicts:
lib/handlebars/compiler/helpers.js
spec/parser.js
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Implement parser for else chaining of helpers
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allows users to chain multiple helpers together using their inverse callbacks. I.e.
```
{{#if foo}}
{{else if bar}}
{{else}}
{{/if}}
```
The control flow here effectively causes the helpers to be nested. The above is actually syntactic sugar for this:
```
{{#if foo}}
{{else}}
{{#if bar}}
{{else}}
{{/if}}
{{/if}}
```
Any helper may be used in this manner, the only requirement is they support normal calls and inverse calls.
Introduces a breaking change in that `{{else foo}}` may no longer be used as a root level operator. Instead `{{^foo}}` must be used.
Fixes #72.
|
| |/
|/| |
|
|/
|
|
|
| |
This changes the call signature for the CommentNode constructor, which is a potentially breaking change for AST users.
Fixes #866
|
|
|
|
|
| |
We can simplify our previous standalone determination logic by merging content blocks again.
Fixes #854
|
| |
|
|
|
|
|
| |
We already have to track these behaviors for the standalone parsing and rather than having two whitespace pruning implementations this moves all of the behavior into one place.
Fixes #852
|
| |
|
|
|
|
|
|
|
|
|
| |
mmun-refactor-parser
Conflicts:
lib/handlebars/compiler/ast.js
spec/ast.js
src/handlebars.yy
|
|
|