summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/javascript-compiler.js
Commit message (Collapse)AuthorAgeFilesLines
* Add support for depthed resolution of data fieldskpdecker2014-02-091-2/+6
|
* Optimize buffer generate first and all edge caseskpdecker2014-02-091-26/+39
|
* Merge pull request #729 from wycats/precompile-literalKevin Decker2014-02-081-57/+55
|\ | | | | Convert template spec to object literal
| * Convert template spec to object literalkpdecker2014-02-061-57/+55
| | | | | | This allows for metadata to be associated with the template and a simplification of the template init logic.
* | Remove unnecessary conditionalkpdecker2014-02-061-3/+1
|/
* Add trackIds compiler flagkpdecker2014-01-171-3/+36
| | | | Allows helpers that care about where a particular field came from derive this data while maintaining backward compatibility with existing helpers.
* Fix missing parameters for pathed mustacheskpdecker2014-01-171-1/+1
| | | Fixes #658
* Implement partial hash evaluationkpdecker2014-01-171-1/+1
|
* Improve usefulness of extend util, properly use namespace property, update ↵Blake Embrey2014-01-161-17/+28
| | | | setup options to use a hash helper.
* Merge pull request #634 from wycats/name-optionKevin Decker2014-01-151-18/+13
|\ | | | | It would be great to have the helper name passed to `blockHelperMissing`
| * Cleanup now unused code in jscompilerkpdecker2014-01-061-5/+4
| |
| * Include name option for all helper callskpdecker2014-01-061-15/+11
| | | | | | | | | | | | | | | | All helper calls will have access to `options.name` which is the first id value of the mustache operation. As part of this the helperMissing call has been simplified to remove the indexed name in order to optimize the call. This is a breaking change. Fixes #634
* | Expose the initial context via @rootkpdecker2014-01-151-1/+1
|/
* Track stringParams mode in local state varskpdecker2014-01-061-6/+7
|
* Remove redundant conditions.Blake Embrey2014-01-051-4/+1
|
* Simplify ambiguous codekpdecker2014-01-041-9/+9
| | | | Remove if conditional in favor of boolean failover.
* Merge branch 'compiler-options' of github.com:blakeembrey/handlebars.js into ↵kpdecker2014-01-011-4/+9
|\ | | | | | | | | | | | | blakeembrey-compiler-options Conflicts: lib/handlebars/compiler/javascript-compiler.js
| * Pull options out from param setup to allow easier extension.Blake Embrey2013-12-281-5/+10
| |
* | Remove duplication from generated subexpressionskpdecker2014-01-011-12/+38
| |
* | Whitespace cleanupkpdecker2013-12-311-4/+4
| |
* | Use literal for data lookupkpdecker2013-12-311-1/+1
| |
* | Add stack handling sanity checkskpdecker2013-12-311-0/+8
| |
* | Fix stack id "leak" on replaceStackkpdecker2013-12-311-1/+6
| |
* | Fix incorrect stack pop when replacing literalskpdecker2013-12-311-2/+4
| |
* | Fix multiple hash handling in subexpressionskpdecker2013-12-311-1/+5
| |
* | Added support for subexpressionsmachty2013-12-301-22/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #684 from blakeembrey/javascript-variableKevin Decker2013-12-251-1/+1
|\ | | | | Allow any number of trailing characters for valid JavaScript variable
| * Allow any number of trailing characters.Blake Embrey2013-12-241-1/+1
| |
* | Expose compilerInfo and checkRevision as APIskpdecker2013-12-231-3/+7
| | | | | | Fixes #656
* | Protect context-lookups from undefined valueskpdecker2013-11-031-3/+15
| | | | | | | | Fixes #166 Fixes #587
* | Implement strip opcodekpdecker2013-10-141-0/+19
| |
* | Defer content outputkpdecker2013-10-141-2/+19
| | | | | | | | Allows for stripping of the content after the fact.
* | Kill unused functionskpdecker2013-10-141-9/+0
| |
* | Push Source helper methodkpdecker2013-10-141-11/+15
| |
* | Fix argument not found errorkpdecker2013-10-141-1/+1
| |
* | Pass options hash to context function execkpdecker2013-10-141-1/+1
| | | | | | Fixes #599
* | Use proper default vs. module import semanticskpdecker2013-10-011-1/+2
| |
* | Update logger for es6 moduleskpdecker2013-09-301-13/+4
| |
* | Merge commit '87b5d4ee61605b026506e92c9e8873d867c5f150' into es6-moduleskpdecker2013-09-021-3/+3
|\ \ | |/ | | | | | | | | | | | | Conflicts: dist/handlebars.js dist/handlebars.runtime.js lib/handlebars/base.js lib/handlebars/utils.js
| * Remove unused varkpdecker2013-07-301-3/+3
| |
* | Further progress towards modularization.Yehuda Katz2013-07-241-4/+13
| | | | | | | | | | 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.
* | Building an AMD fileYehuda Katz2013-07-161-2/+1
| |
* | Initial work on ES6 modulesYehuda Katz2013-07-011-18/+6
|/
* Break JavascriptCompiler into standalone filekpdecker2013-06-031-0/+856