kpdecker
0c6829f8af
v1.3.0
v1.3.0
2014-01-01 22:10:31 -06:00
kpdecker
2b9f3c195f
Update release notes
2014-01-01 22:09:50 -06:00
kpdecker
f445b96cb7
Merge branch 'master' of github.com:wycats/handlebars.js
2014-01-01 19:42:16 -06:00
kpdecker
e0d0ad5027
Merge branch 'compiler-options' of github.com:blakeembrey/handlebars.js into blakeembrey-compiler-options
...
Conflicts:
lib/handlebars/compiler/javascript-compiler.js
2014-01-01 19:38:31 -06:00
Kevin Decker
3f71fde155
Merge pull request #696 from nateirwin/master
...
Fix for reserved keyword "default"
2014-01-01 17:17:19 -08:00
kpdecker
6e4e1f8404
Include line info in compiler thrown exceptions
...
Fixes #636
2014-01-01 19:14:51 -06:00
kpdecker
3c85720137
Remove duplication from generated subexpressions
2014-01-01 18:59:21 -06:00
kpdecker
4713abc8f1
Add subexpression benchmark
2014-01-01 18:15:39 -06:00
kpdecker
e7e94dc697
Whitespace cleanup
2013-12-31 21:20:59 -06:00
kpdecker
c1a93d33e7
Use literal for data lookup
2013-12-31 21:19:00 -06:00
kpdecker
cd885bf855
Add stack handling sanity checks
2013-12-31 21:18:48 -06:00
kpdecker
ddfe457abf
Fix stack id "leak" on replaceStack
2013-12-31 21:17:50 -06:00
kpdecker
f4d337d252
Fix incorrect stack pop when replacing literals
2013-12-31 21:17:16 -06:00
kpdecker
cbfec5b9e9
Set laxbreak jshint flag
2013-12-31 20:25:46 -06:00
kpdecker
af3358d195
Fix multiple hash handling in subexpressions
2013-12-31 16:10:51 -06:00
Nate Irwin
641358a905
Fix for reserved keyword "default"
2013-12-31 15:09:41 -07:00
kpdecker
f2df220a1f
Add location tracking to sexpr
2013-12-31 13:31:47 -06:00
Kevin Decker
a2ca31bb19
Merge pull request #690 from machty/subsexpr
...
Added support for subexpressions
2013-12-30 16:09:41 -08:00
machty
b09333db79
Added support for subexpressions
...
Handlebars now supports subexpressions.
{{foo (bar 3)}}
Subexpressions are always evaluated as helpers; if
`3` were omitted from the above example, `bar`
would be invoked as a param-less helper, even
though a top-levell `{{bar}}` would be considered
ambiguous.
The return value of a subexpression helper is
passed in as a parameter of a parent subexpression
helper, even in string params mode. Their type,
as listed in `options.types` or `options.hashTypes`
in string params mode, is "sexpr".
The main conceptual change in the Handlebars code
is that there is a new AST.SexprNode that manages
the params/hash passed into a mustache, as well
as the logic that governs whether that mustache
is a helper invocation, property lookup, etc.
MustacheNode, which used to manage this stuff,
still exists, but only manages things like
white-space stripping and whether the mustache
is escaped or not. So, a MustacheNode _has_
a SexprNode.
The introduction of subexpressions is fully
backwards compatible, but a few things needed
to change about the compiled output of a template
in order to support subexpressions. The main one
is that the options hash is no longer stashed in
a local `options` var before being passed to
either the helper being invoked or the
`helperMissing` fallback. Rather, the options
object is inlined in these cases. This does
mean compiled template sizes will be a little
bit larger, even those that don't make use of
subexpressions, but shouldn't have any noticeable
impact on performance when actually rendering
templates as only one of these inlined objects
will actually get evaluated.
2013-12-30 19:07:04 -05:00
Kevin Decker
ac98e7b177
Merge pull request #694 from blakeembrey/compile-env
...
Make the environment reusable
2013-12-29 15:23:47 -08:00
kpdecker
14d1d4270f
Fix ProgramNode parameter handling under IE
2013-12-29 17:16:59 -06:00
Blake Embrey
150e55aa00
Pull options out from param setup to allow easier extension.
2013-12-28 22:31:45 -05:00
Blake Embrey
2f0c96b618
Make the environment reusable.
2013-12-28 21:35:40 -05:00
Yehuda Katz
6c2137a420
Merge pull request #692 from fivetanley/line-numbers
...
add line numbers to nodes when parsing
2013-12-28 17:12:25 -08:00
Stanley Stuart
e1878050b5
add line numbers to nodes when parsing
...
closes #691
2013-12-28 18:55:36 -06:00
kpdecker
1c0614bd88
v1.2.1
v1.2.1
2013-12-26 16:25:42 -06:00
kpdecker
ba7a37a3b8
Update release notes
2013-12-26 16:25:17 -06:00
Kevin Decker
77fd7dcc1d
Merge pull request #686 from wycats/amd-tests
...
Falsy AMD module names in version 1.2.0
2013-12-26 13:58:04 -08:00
kpdecker
7311ab0b3f
Use quotes for reserved token name
...
Fixes test exec under IE
2013-12-26 15:39:11 -06:00
kpdecker
4160ff3ee2
Revert unused flag addition
2013-12-26 15:26:12 -06:00
kpdecker
7151d15abb
Add AMD tests to sauce tests
2013-12-26 15:20:37 -06:00
kpdecker
19f443f68e
Use latest jshint
2013-12-26 15:12:10 -06:00
Kevin Decker
9f1b3bcea0
Merge pull request #685 from blakeembrey/dombars
...
Add dombars to the projects list
2013-12-25 10:13:13 -08:00
Kevin Decker
2dae244185
Merge pull request #684 from blakeembrey/javascript-variable
...
Allow any number of trailing characters for valid JavaScript variable
2013-12-25 10:12:11 -08:00
Blake Embrey
c62ce32cc9
Add dombars to the projects list.
2013-12-24 16:21:28 -05:00
Blake Embrey
f3a90812a6
Allow any number of trailing characters.
2013-12-24 16:14:57 -05:00
kpdecker
096b8ccd2e
v1.2.0
v1.2.0
2013-12-23 21:39:46 -06:00
kpdecker
923993dfb1
Update release notes
2013-12-23 21:39:23 -06:00
kpdecker
fcf4e4ef0e
Update release documentation
2013-12-23 21:30:34 -06:00
kpdecker
ae1795f82c
Update sauce tests for supported versions
2013-12-23 21:24:11 -06:00
kpdecker
2666553383
Cleanup jshint globals a bit
2013-12-23 21:16:25 -06:00
kpdecker
15af03c8bf
Remove unused var
2013-12-23 21:16:14 -06:00
kpdecker
97c7d65931
Do not minimize multiple times
2013-12-23 21:16:07 -06:00
kpdecker
bbc7c7d080
Expose compilerInfo and checkRevision as APIs
...
Fixes #656
2013-12-23 21:00:59 -06:00
kpdecker
1a751b2f6e
Add JavascriptCompiler public API tests
2013-12-23 20:59:16 -06:00
kpdecker
abe9c82e75
Use env.VM to lookup runtime methods
...
Allows for overrides by 3rd parties
Fixes #679
2013-12-23 19:53:11 -06:00
kpdecker
956ac95e7a
Add browserify runtime export
...
Fixes #668
2013-12-23 19:51:10 -06:00
kpdecker
40e1837b14
Merge branch 'fix-escapes' of github.com:dmarcotte/handlebars.js into dmarcotte-fix-escapes
...
Conflicts:
spec/tokenizer.js
2013-12-23 19:22:30 -06:00
kpdecker
ddea5be2a4
Add AST test coverage for more complex paths
2013-12-23 19:02:45 -06:00
kpdecker
b4968bb8d4
Fix handling of boolean escape in MustacheNode
...
Fixes issue with Ember compatibility due to direct instantiation of MustacheNode.
2013-12-23 19:02:24 -06:00