Kevin Decker
d4070c3667
Merge pull request #915 from wycats/ast-update
...
Ast update
2014-11-29 18:02:12 -06:00
kpdecker
a655aedb5c
s/Subexpression/SubExpression/
2014-11-29 17:59:09 -06:00
kpdecker
928ba56b95
Rework strip flags to make clearer at in AST level
...
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.
2014-11-28 23:13:06 -06:00
kpdecker
8a6796e5c0
Move Jison parsing out of AST into helpers
2014-11-28 17:26:52 -06:00
kpdecker
95b23095c0
First crack at compiler API docs
2014-11-28 16:55:53 -06:00
kpdecker
ffc9fb5007
Add original to BooleanLiteral
2014-11-28 16:55:41 -06:00
kpdecker
6a7a8c803d
Rename AST objects to match type names
2014-11-28 14:42:24 -06:00
kpdecker
f990cf0064
Treat partial exec in a manner closer to helpers
...
This helps unify the code handling and will also be needed to support string/id tracking on partials.
2014-11-27 09:11:03 -06:00
kpdecker
1124908d2a
Update subexpression and hash AST constructs
2014-11-27 08:37:48 -06:00
kpdecker
e1cba432a6
Simplify Path and Sexpr calculated flags
2014-11-27 07:32:15 -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
697bbe59ca
Update literal ast nodes for new spec
2014-11-26 19:22:09 -06:00
kpdecker
2a4819d75c
Update statement node ASTs
2014-11-26 19:04:18 -06:00
kpdecker
5cfe6a0be1
Update MustacheNode for new AST structure
2014-11-26 09:31:46 -06:00
kpdecker
df421f1e4b
Update ProgramNode to better match SpiderMonkey
2014-11-26 09:18:33 -06:00
kpdecker
61dd721ca2
Update AST location info to match SpiderMonkey
...
Part of #889
2014-11-26 09:01:03 -06:00
kpdecker
3a9440f954
Make each helper data uniform
...
Provide @key and @last value for all forms of iteration.
Fixes #910
2014-11-26 08:02:55 -06:00
kpdecker
e4c874d1af
Update to latest es6-module-packager
2014-11-26 08:00:23 -06:00
kpdecker
5594416121
Export the default object for handlebars/runtime
...
Maintains consistency with the prior export pattern, while avoids the knarly default loading issues.
2014-11-26 07:49:29 -06:00
kpdecker
c4b3c901a5
Provide Handlebars.noConflict implementation
...
Allows for users who are loading via a global pattern to avoid conflicting with other instances of the library.
Fixes #887
2014-11-26 07:48:45 -06:00
kpdecker
617dd57162
Lookup partials when undefined
2014-11-25 23:15:11 -06:00
kpdecker
d044a8c99d
Optimize variable declaration
2014-11-25 23:15:11 -06:00
Kevin Decker
bf993528d1
Merge pull request #906 from mmun/block-params
...
Add parser support for block params
2014-11-12 21:36:25 -06:00
Martin Muñoz
b8a9f7264d
Add parser support for block params
2014-11-11 21:35:10 -05:00
Kevin Decker
b3b5b35889
Merge pull request #856 from MajorBreakfast/patch-1
...
jspm compatibility
2014-11-11 15:05:10 -06:00
MajorBreakfast
80b5b24cce
jspm compatibility
...
This will enable compatibilty with jspm as soon as https://github.com/wycats/handlebars.js/issues/855 has been addressed.
2014-11-10 15:12:58 +01:00
kpdecker
4a2afa9d02
Propagate options for client compiled partials
...
Fixes #901
2014-11-08 19:06:40 -06:00
kpdecker
4415f3151d
Merge branch 'mmun-remove-block-mustache'
2014-11-08 18:57:19 -06: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
kpdecker
ac208b1bcd
Only provide aliases for multiple use calls
...
Fixes #903
2014-11-08 18:53:43 -06:00
kpdecker
8dfeabdd16
Fix missing coverage
2014-11-08 18:11:29 -06:00
kpdecker
6d7696ef66
Remove unnecessary test stub
2014-11-08 18:09:15 -06:00
Kevin Decker
8e6e9fbc60
Merge pull request #902 from wycats/source-map
...
Generate Source Maps
2014-11-08 18:04:56 -06:00
kpdecker
1429587dd4
Provide default mapping for boilerplate code
2014-11-08 17:50:01 -06:00
kpdecker
0dbeeb4503
Add source map output support to the CLI
2014-11-08 17:50:01 -06:00
kpdecker
3ee0682247
Generate source maps
...
Allow the precompiler to generate source maps when the srcFile parameter is passed.
This refactors large chunks of the code generation pipeline, allowing metadata to be associated with code chunks as well as breaking out much of the code generation logic into a separate helper.
2014-11-08 17:50:01 -06:00
kpdecker
249f559104
Include location information in all opcodes
2014-11-08 17:50:01 -06:00
Kevin Decker
ea6b0be910
Merge pull request #892 from wycats/else-if
...
Implement parser for else chaining of helpers
2014-11-08 17:49:14 -06:00
Kevin Decker
e779ecf12d
Merge pull request #890 from wycats/to-html-safe
...
Use toHTML vs. instanceof checks for SafeString
2014-11-08 17:47:25 -06:00
kpdecker
01a22e61df
Use toHTML vs. instanceof checks for SafeString
...
Allows for us to play nicely in environments such as Node that could have multiple versions of the library loaded. Also allows for implementors to provide their own behavior, provided they know what they are doing.
Fixes #886
2014-11-08 17:46:53 -06:00
Kevin Decker
c8af90f697
Merge pull request #863 from tomByrer/patch-1
...
+ jsDelivr CDN info
2014-11-08 17:44:22 -06:00
Kevin Decker
b5f03c95ab
Merge pull request #870 from max-b/master
...
Registering undefined partial throws exception.
2014-11-08 17:43:41 -06:00
kpdecker
d595ebc0e2
Simplify program generation logic
2014-11-08 14:36:17 -06:00
kpdecker
d47e4dd1f7
Bump test coverage
2014-11-08 14:35:23 -06:00
kpdecker
83bcbee222
Ignore unused code paths
...
We don’t want to remove these as the generic code may need it in the future, but these code paths are not triggered through the existing language constructs.
2014-11-08 14:35:23 -06:00
kpdecker
30034c75e7
Merge setupParams and setupOptions
2014-11-06 09:43:43 -06:00
kpdecker
d3bd1a523d
Simplify flushInline implementation
2014-11-05 23:23:43 -06:00
kpdecker
9665379cdc
Use terinary operator for inline appends
...
Allows for append operations to avoid breaking inline chain.
2014-11-05 22:28:12 -06:00
kpdecker
a7000f8129
Provide stubbed visitor implementation
...
Part of #889
2014-11-05 21:57:09 -06:00
Martin Muñoz
a5d0491d57
Remove RawBlockNode in favor of prepareRawBlock helper
2014-11-05 11:00:39 -05:00