summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/helpers.js
Commit message (Collapse)AuthorAgeFilesLines
* Avoid direct references to sexpr in statementskpdecker2015-01-181-10/+12
| | | | | 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.
* Bump code coveragekpdecker2014-12-261-2/+2
|
* Rework strip flags to make clearer at in AST levelkpdecker2014-11-281-183/+21
| | | 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.
* Move Jison parsing out of AST into helperskpdecker2014-11-281-0/+37
|
* Rename AST objects to match type nameskpdecker2014-11-281-4/+4
|
* Update subexpression and hash AST constructskpdecker2014-11-271-4/+4
|
* Update statement node ASTskpdecker2014-11-261-11/+11
|
* Update ProgramNode to better match SpiderMonkeykpdecker2014-11-261-39/+39
|
* Update AST location info to match SpiderMonkeykpdecker2014-11-261-8/+14
| | | Part of #889
* Add parser support for block paramsMartin Muñoz2014-11-111-1/+3
|
* Merge branch 'remove-block-mustache' of github.com:mmun/handlebars.js into ↵kpdecker2014-11-081-7/+27
|\ | | | | | | | | | | | | | | mmun-remove-block-mustache Conflicts: lib/handlebars/compiler/helpers.js spec/parser.js
| * Remove RawBlockNode in favor of prepareRawBlock helperMartin Muñoz2014-11-051-1/+3
| |
| * Simplify BlockNode by removing intermediate MustacheNodeMartin Muñoz2014-11-021-7/+25
| |
* | Merge pull request #892 from wycats/else-ifKevin Decker2014-11-081-7/+26
|\ \ | | | | | | Implement parser for else chaining of helpers
| * | Implement parser for else chaining of helperskpdecker2014-10-271-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Bump test coveragekpdecker2014-11-081-1/+2
| |/ |/|
* | Allow whitespace control on commentskpdecker2014-11-021-0/+5
|/ | | | | This changes the call signature for the CommentNode constructor, which is a potentially breaking change for AST users. Fixes #866
* Refactor content blocks to ignore lineskpdecker2014-08-251-57/+31
| | | | | We can simplify our previous standalone determination logic by merging content blocks again. Fixes #854
* Cleanup from code coverage reportkpdecker2014-08-231-2/+2
|
* Move strip processing into AST helper logickpdecker2014-08-231-18/+66
| | | | | 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
* Replace string value rather than add omit flagkpdecker2014-08-231-2/+3
|
* Merge branch 'refactor-parser' of github.com:mmun/handlebars.js into ↵kpdecker2014-08-231-9/+131
| | | | | | | | | mmun-refactor-parser Conflicts: lib/handlebars/compiler/ast.js spec/ast.js src/handlebars.yy
* Refactor blocks, programs and inversesMartin Muñoz2014-07-291-0/+41