kpdecker
078c1eecba
Export AST as an object rather than module
...
The parser expects the AST object to be mutable, which modules are not.
2013-12-01 11:37:25 -06:00
kpdecker
151e6d49c0
Wrap AST nodes in strip opcodes if defined
2013-10-14 22:50:50 -05:00
kpdecker
14ef86f9ca
Use accept for all compiler traversal
2013-10-14 22:50:50 -05:00
kpdecker
b6c9f85d22
Use template env and compile methods
2013-10-09 03:20:22 -07:00
kpdecker
e676e43dc5
Use proper default vs. module import semantics
2013-10-01 21:19:49 -05:00
kpdecker
6a23391a9a
Break exception class out into a standalone module
2013-10-01 21:14:18 -05:00
Yehuda Katz
5f664dd78b
Make the Handlebars environment into an object
...
The idea is that the environment wraps up the mutable stuff in
Handlebars (like the helpers) and that you could theoretically create a
new one at any time and pass it in to Handlebars.template.
Every test makes a new environment and uses it in template compilation.
2013-07-26 16:50:37 +00:00
Yehuda Katz
f5c8484ea0
Further progress towards modularization.
...
At this point, I have only 2 fails in the Node build, but I'm doing a
bunch of manual stuff locally and still have a bunch of hacks.
2013-07-24 05:03:27 +00:00
Yehuda Katz
da130f7745
Building an AMD file
2013-07-16 19:10:37 +00:00
Yehuda Katz
88ee4757e7
Initial work on ES6 modules
2013-07-01 13:59:58 -07:00
kpdecker
c3ff573184
Break JavascriptCompiler into standalone file
2013-06-03 23:27:35 -05:00
kpdecker
16fd601a5c
Merge global and passed helpers and partials
2013-05-31 13:12:06 -04:00
kpdecker
d7b345b2da
Allow execution of helpers on the context
...
Fixes #285
2013-05-30 15:47:30 -04:00
kpdecker
3ddbc5237f
Protect from object prototype modifications
...
Fixes #534
2013-05-28 17:03:07 -04:00
kpdecker
822a8911ec
Add support for complex ids in @data references
2013-05-27 14:40:52 -05:00
Kevin Decker
075fdb8ac4
Merge pull request #454 from leshill/fix_string_mode_contexts
...
Add contexts for string mode hash values
2013-04-07 17:21:40 -07:00
kpdecker
0329c852bd
Merge branch 'program-metadata'
2013-04-07 12:29:54 -05:00
kpdecker
f6ff5c648b
Restore knownHelpersOnly throw
...
Fixes #302
2013-04-06 23:23:40 -05:00
kpdecker
12d68caa58
Allow compilation of empty string
...
Fixes #461
2013-04-06 23:17:39 -05:00
kpdecker
4d66d0c0a6
Escape unicode newlines in string literals
...
Fixes #375
2013-04-06 16:42:24 -05:00
Les Hill
53de75927c
Add contexts for string mode hash values
...
Allows for evaluating hash parameters such as ../city in string mode.
2013-03-19 21:41:36 -07:00
kpdecker
baccdb4cfc
Add program metadata
...
Include program id and depth on the generated wrapper objects. This
allows helpers who are passed these objects to differentiate between
helpers for cases where they may want to cache the generated DOM
structure.
2013-02-17 04:27:42 -06:00
kpdecker
d6f146f8a5
Fix #428 nested if else rendering
...
The program equality checker was not taking children into account
when determining equality, causing breakages under similar cases.
2013-02-16 16:18:17 -06:00
Kevin Decker
8b2c1e5d23
Merge pull request #442 from tricknotes/fix-method-name-in-error-message
...
Fix method name in error message
2013-02-16 14:01:31 -08:00
kpdecker
10453d1ef8
Use local vars
2013-02-16 13:56:19 -06:00
kpdecker
3e86bb0f64
Remove unnecessary child scopes
2013-02-16 13:08:46 -06:00
Ryunosuke SATO
261a2deb51
Fix method name in error message
...
- compile -> precompile
2013-02-16 20:14:38 +09:00
Tommy Messbauer
1ca7462497
merge
2013-02-11 23:00:47 -06:00
Peter Wagenet
7c633b604d
Better error messages for precompiler runtime mismatch
2013-02-09 19:25:53 -08:00
Peter Wagenet
51e9259fac
Decouple compiler version checks from release versions
2013-02-08 18:42:20 -08:00
machty
a48e32bbf6
Handlebars.parse/precompile/compile can now be passed an already-compiled Handlebars AST.
2013-02-07 02:06:17 -05:00
Peter Wagenet
6fe7f17c89
Improved precompile template version check
...
This check reduces duplicated code as well as also failing if the
template was precompiled on a version before the check was added.
2013-01-30 22:44:30 -08:00
Peter Wagenet
d7758fe1a9
Check version when evaluating templates.
...
This makes sure that we throw an error when a template was precompiled
with a version of Handlebars that doesn't match the evaluating version.
2013-01-29 13:29:19 -08:00
kpdecker
b0c9f3d83b
mergeSource helper
2013-01-21 01:03:42 -06:00
kpdecker
b661977966
Merge duplicate programs
2013-01-21 00:49:28 -06:00
kpdecker
969b418291
Remove inline option from pushStack
2013-01-21 00:23:08 -06:00
kpdecker
8e9688792b
Use push rather than pushStack for inline ops
2013-01-21 00:21:17 -06:00
kpdecker
9ac47df7dd
Make replaceStack always inline
2013-01-20 23:58:42 -06:00
kpdecker
0f6651bad9
Formatting updates for inlined content
2013-01-20 21:19:39 -06:00
kpdecker
231543feaf
Merge consecutive buffer appends
2013-01-20 21:18:49 -06:00
kpdecker
b3a39ccefd
Use options register for blockHelperMissing
2013-01-20 17:30:40 -06:00
kpdecker
956b0a62a6
Inline known helper calls
2013-01-20 17:05:17 -06:00
kpdecker
94e70043f9
Use stack rather than register for invoke lookup
2013-01-20 17:04:30 -06:00
kpdecker
bf201a66c2
Prevent duplication of inline content in append
2013-01-20 17:00:46 -06:00
kpdecker
39cc7c6816
Update 2nd level opcodes to use inlines
2013-01-19 18:33:49 -06:00
kpdecker
e9ac494ffd
Allow replaceStack to work with the inline stack
2013-01-19 18:21:05 -06:00
kpdecker
cb50caaf53
Use inline values for simple terminals
2013-01-19 17:39:13 -06:00
kpdecker
ae95407775
Inline stack helper implementation
2013-01-19 17:35:05 -06:00
kpdecker
7277284132
Merge branch 'master' into inline-ops
2013-01-19 17:01:20 -06:00
kpdecker
d486e7fa47
Remove unused vars
2013-01-19 17:01:08 -06:00