Aymerick
d0d2168ec2
Fixes typo in tests
...
mutache => mustache
2015-05-06 14:03:14 +02:00
kpdecker
e3d3eda2e1
Add full support for es6
...
Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions.
Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules.
Fixes #855
Fixes #993
2015-04-16 16:43:01 -05:00
kpdecker
dfd141cd35
Allow undefined and null in helper names
2015-04-13 21:18:53 -05:00
kpdecker
2d149e7797
Add undefined and null literal support
...
This adds the UndefinedLiteral and NullLiteral to AST.
Fixes #990
2015-04-07 23:37:38 -05:00
Marcio Junior
f857471cc8
Boolean literals can be passed to mustaches
2015-02-08 19:31:38 -02:00
kpdecker
3238645f26
Allow blockParams on chained inverse statements
2014-11-29 18:38:22 -06:00
kpdecker
8a6796e5c0
Move Jison parsing out of AST into helpers
2014-11-28 17:26:52 -06:00
kpdecker
6a7a8c803d
Rename AST objects to match type names
2014-11-28 14:42:24 -06:00
kpdecker
5c921cafeb
Replace DataNode and IdNode with PathNode
...
This is a breaking change for string mode users as there is no longer a distinct type for data parameters. Instead data consumers should look for the @ prefix value.
2014-11-26 20:36:36 -06:00
kpdecker
2a4819d75c
Update statement node ASTs
2014-11-26 19:04:18 -06:00
Martin Muñoz
b8a9f7264d
Add parser support for block params
2014-11-11 21:35:10 -05:00
kpdecker
bf8cc50798
Merge branch 'remove-block-mustache' of github.com:mmun/handlebars.js into mmun-remove-block-mustache
...
Conflicts:
lib/handlebars/compiler/helpers.js
spec/parser.js
2014-11-08 18:57:06 -06:00
Martin Muñoz
12e3d210e8
Simplify BlockNode by removing intermediate MustacheNode
2014-11-02 18:19:20 -05:00
kpdecker
4282668d47
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 .
2014-10-27 19:17:16 -05:00
kpdecker
529e2b6796
Merge branch 'refactor-parser' of github.com:mmun/handlebars.js into mmun-refactor-parser
...
Conflicts:
lib/handlebars/compiler/ast.js
spec/ast.js
src/handlebars.yy
2014-08-23 16:29:22 -05:00
kpdecker
cb22ee5681
Increase test coverage a touch
2014-08-14 12:25:35 -05:00
kpdecker
6070179009
Track root status in ProgramNode constructor
2014-08-12 14:41:58 -05:00
Martin Muñoz
eee2c4d4f2
Refactor blocks, programs and inverses
2014-07-29 02:45:50 -04:00
kpdecker
16f135835e
Add support for depthed resolution of data fields
2014-02-09 18:35:22 -06:00
kpdecker
14b7ef9066
Make raw blocks operate like blocks
2014-02-09 15:11:12 -06:00
kpdecker
d4cfe90959
Allow decimal number values
...
Fixes #472
2014-01-17 20:42:02 -06:00
kpdecker
f90981adf6
Add partial hash parser support
2014-01-17 17:51:52 -06:00
kpdecker
4942324250
Move away from should asserts to internal
...
This is needed as neither Sinon nor Chai support in-browser testing under IE.
2013-12-23 02:19:09 -06:00
kpdecker
4f5c05ffe9
Simplify inverse only block case
2013-07-30 11:08:46 -05:00
kpdecker
dcbc3a55a4
Prevent nonsensical root {{^}}
2013-07-24 23:50:12 -05:00
kpdecker
adda0569e0
Refactor qunit unit tests
...
Allows for testing node, browser, and precompiled modes in the node
tests. Also reorganizes the qunit spec file to provide better
organization.
2013-06-01 23:45:43 -05:00
kpdecker
d13ae310d3
Convert parser and tokenizer tests to javascript
2013-06-01 16:25:45 -05:00