Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Additional test coverage cleanup | kpdecker | 2014-08-23 | 1 | -4/+2 | |
| | | | Also fixes the template._child implementation which broke with the depthed work. | |||||
* | Restore helperMissing for ambiguous statements | kpdecker | 2014-08-23 | 1 | -1/+2 | |
| | | | | Fixes #318 (regression) Partial fix for #783 | |||||
* | Cleanup from code coverage report | kpdecker | 2014-08-23 | 2 | -13/+9 | |
| | ||||||
* | Move strip processing into AST helper logic | kpdecker | 2014-08-23 | 3 | -53/+67 | |
| | | | | | We already have to track these behaviors for the standalone parsing and rather than having two whitespace pruning implementations this moves all of the behavior into one place. Fixes #852 | |||||
* | Replace string value rather than add omit flag | kpdecker | 2014-08-23 | 2 | -3/+4 | |
| | ||||||
* | Add original value tracking to ContentNode | kpdecker | 2014-08-23 | 1 | -1/+1 | |
| | ||||||
* | Merge branch 'refactor-parser' of github.com:mmun/handlebars.js into ↵ | kpdecker | 2014-08-23 | 3 | -174/+177 | |
|\ | | | | | | | | | | | | | | | | | mmun-refactor-parser Conflicts: lib/handlebars/compiler/ast.js spec/ast.js src/handlebars.yy | |||||
| * | Refactor blocks, programs and inverses | Martin Muñoz | 2014-07-29 | 3 | -46/+56 | |
| | | ||||||
* | | Optimize replaceStack for inline methods | kpdecker | 2014-08-23 | 1 | -40/+24 | |
| | | | | | | Only use case was with inline input so most of this code was unnecessary. | |||||
* | | Remove unnecessary stack variable from blockHelper | kpdecker | 2014-08-23 | 1 | -4/+4 | |
| | | ||||||
* | | Do not flush subexpressions | kpdecker | 2014-08-23 | 1 | -7/+0 | |
| | | | | | | | | | | | | They are no longer duplicated with the new helper calling pattern and this also introduced stack corruption issues due to improper value lookups. Fixes #767 Fixes #768 | |||||
* | | Fix undefined handling for pathed lookups | kpdecker | 2014-08-15 | 1 | -4/+3 | |
| | | | | | | | | Fixes #837 | |||||
* | | Strip dead code from javascript compiler | kpdecker | 2014-08-15 | 1 | -9/+2 | |
| | | ||||||
* | | Fix compat partial exec without data | kpdecker | 2014-08-15 | 1 | -0/+2 | |
| | | ||||||
* | | Make depthed lookup call non-literal | kpdecker | 2014-08-15 | 1 | -1/+1 | |
| | | | | | | Prevents duplicate calls from being made. | |||||
* | | Fix compiler program de-duping | kpdecker | 2014-08-14 | 1 | -9/+19 | |
| | | ||||||
* | | Drop unused Compiler.disassemble method | kpdecker | 2014-08-14 | 1 | -24/+0 | |
| | | ||||||
* | | Drop unused DECLARE opcode | kpdecker | 2014-08-14 | 2 | -9/+1 | |
| | | ||||||
* | | Increase test coverage a touch | kpdecker | 2014-08-14 | 1 | -4/+2 | |
| | | ||||||
* | | Implement partial recursive lookup | kpdecker | 2014-08-14 | 1 | -1/+4 | |
| | | ||||||
* | | Inherit compat flag for partials | kpdecker | 2014-08-14 | 1 | -1/+4 | |
| | | ||||||
* | | Implement recursive field lookup in compat mode | kpdecker | 2014-08-13 | 2 | -8/+24 | |
| | | | | | | | | | | | | Provides the mustache behavior of recursive lookup without the use of depthed paths. Note that this does incur a fairly dramatic performance penalty for depthed queries. | |||||
* | | Use depths array rather than passing array args | kpdecker | 2014-08-13 | 1 | -9/+20 | |
| | | | | | | Approximately doubles the throughput performance of depthed templates and clears the way for doing recursive path lookups in pathed mode. | |||||
* | | Create contextName helper for context lookup | kpdecker | 2014-08-13 | 2 | -8/+12 | |
| | | ||||||
* | | Render indent for standalone partials | kpdecker | 2014-08-12 | 2 | -3/+3 | |
| | | ||||||
* | | Drop omitted content tags from generated output | kpdecker | 2014-08-12 | 1 | -1/+3 | |
| | | ||||||
* | | Flag standalone nodes in the AST | kpdecker | 2014-08-12 | 1 | -3/+138 | |
| | | ||||||
* | | Track root status in ProgramNode constructor | kpdecker | 2014-08-12 | 1 | -6/+6 | |
| | | ||||||
* | | Remove unused JSCompiler.register method | kpdecker | 2014-08-11 | 1 | -5/+0 | |
|/ | ||||||
* | Do not lookup pathed helpers on the helper stack | kpdecker | 2014-07-12 | 2 | -6/+5 | |
| | | | | Fixes #764 | |||||
* | Fix rendering of paths that resolve to zero | kpdecker | 2014-07-12 | 1 | -1/+1 | |
| | | | | Fixes #820 | |||||
* | Use ID lookup for ambiguous helper evaluation | kpdecker | 2014-07-07 | 2 | -1/+4 | |
| | | | Final change for #731 | |||||
* | Rework lookup null protector logic | kpdecker | 2014-07-06 | 2 | -64/+67 | |
| | | | | | | | - Move the lookup null protection out of `nameLookup` and into that contexts that are aware of the needs for falsy vs. not displayed values. - Optimize lookup for nested path operations Fixes #731 | |||||
* | Move lambda resolution to runtime | kpdecker | 2014-07-06 | 1 | -4/+2 | |
| | | | This has a very positive impact on precompiled output size, particularly for known-helpers cases, and little or no impact on the throughput numbers. | |||||
* | Remove disassemble log statement | kpdecker | 2014-06-28 | 1 | -3/+1 | |
| | | | Fixes #772 | |||||
* | Expose setup wrappers for compiled templates | kpdecker | 2014-05-19 | 1 | -2/+8 | |
| | ||||||
* | Merge pull request #797 from tomdale/full-helper-names | Kevin Decker | 2014-05-19 | 1 | -1/+1 | |
|\ | | | | | Pass full helper ID to helperMissing when options are provided | |||||
| * | Pass full id to helperMissing | Tom Dale | 2014-05-13 | 1 | -1/+1 | |
| | | ||||||
* | | Ensure isHelper is coerced to a boolean | Martin Muñoz | 2014-05-05 | 1 | -1/+1 | |
|/ | ||||||
* | Fix evaluation of paths and subexprs | kpdecker | 2014-03-05 | 2 | -8/+9 | |
| | | | Fixes #743 | |||||
* | Merge pull request #749 from jenseng/option_subexpressions_fix | Kevin Decker | 2014-03-05 | 2 | -10/+9 | |
|\ | | | | | properly handle multiple subexpressions in the same hash, fixes #748 | |||||
| * | properly handle multiple subexpressions in the same hash, fixes #748 | Jon Jensen | 2014-02-20 | 2 | -10/+9 | |
| | | | | | | | | | | push all hash params before popping any so as to avoid the last stackN var stomping previous ones | |||||
* | | fix bug in IE<=8 (no Array::map), closes #751 | Jon Jensen | 2014-03-04 | 1 | -9/+11 | |
|/ | | | | | | | looks like this broke in 2812fe27 also s/this.i/var i/, since the functions that needed it were removed in a1edab6ef | |||||
* | Add child accessor API | kpdecker | 2014-02-09 | 1 | -1/+8 | |
| | ||||||
* | Add support for depthed resolution of data fields | kpdecker | 2014-02-09 | 2 | -7/+7 | |
| | ||||||
* | Implement lookup helper | kpdecker | 2014-02-09 | 1 | -1/+2 | |
| | ||||||
* | Make raw blocks operate like blocks | kpdecker | 2014-02-09 | 1 | -3/+8 | |
| | ||||||
* | raw block helpers | Jesse Ezell | 2014-02-09 | 1 | -0/+9 | |
| | ||||||
* | Optimize buffer generate first and all edge cases | kpdecker | 2014-02-09 | 1 | -26/+39 | |
| | ||||||
* | Merge pull request #729 from wycats/precompile-literal | Kevin Decker | 2014-02-08 | 1 | -57/+55 | |
|\ | | | | | Convert template spec to object literal | |||||
| * | Convert template spec to object literal | kpdecker | 2014-02-06 | 1 | -57/+55 | |
| | | | | | | This allows for metadata to be associated with the template and a simplification of the template init logic. | |||||
* | | Remove unnecessary conditional | kpdecker | 2014-02-06 | 1 | -3/+1 | |
|/ | ||||||
* | Add trackIds compiler flag | kpdecker | 2014-01-17 | 3 | -4/+45 | |
| | | | | 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 mustaches | kpdecker | 2014-01-17 | 3 | -7/+9 | |
| | | | Fixes #658 | |||||
* | Allow decimal number values | kpdecker | 2014-01-17 | 3 | -8/+8 | |
| | | | Fixes #472 | |||||
* | Implement partial hash evaluation | kpdecker | 2014-01-17 | 2 | -3/+9 | |
| | ||||||
* | Add partial hash parser support | kpdecker | 2014-01-17 | 2 | -2/+8 | |
| | ||||||
* | Improve usefulness of extend util, properly use namespace property, update ↵ | Blake Embrey | 2014-01-16 | 1 | -17/+28 | |
| | | | | setup options to use a hash helper. | |||||
* | Merge pull request #634 from wycats/name-option | Kevin Decker | 2014-01-15 | 2 | -19/+14 | |
|\ | | | | | It would be great to have the helper name passed to `blockHelperMissing` | |||||
| * | Cleanup now unused code in jscompiler | kpdecker | 2014-01-06 | 1 | -5/+4 | |
| | | ||||||
| * | Include name option for all helper calls | kpdecker | 2014-01-06 | 2 | -16/+12 | |
| | | | | | | | | | | | | | | | | 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 @root | kpdecker | 2014-01-15 | 1 | -1/+1 | |
|/ | ||||||
* | Refactor out pushParams method | kpdecker | 2014-01-06 | 1 | -34/+19 | |
| | | | Simplifies hash and param push logic | |||||
* | Track stringParams mode in local state vars | kpdecker | 2014-01-06 | 2 | -8/+10 | |
| | ||||||
* | Fix DATA value in stringParams mode | kpdecker | 2014-01-06 | 1 | -0/+1 | |
| | | | | Fixes #699 | |||||
* | Remove redundant conditions. | Blake Embrey | 2014-01-05 | 1 | -4/+1 | |
| | ||||||
* | Simplify ambiguous code | kpdecker | 2014-01-04 | 2 | -9/+10 | |
| | | | | Remove if conditional in favor of boolean failover. | |||||
* | Merge branch 'compiler-options' of github.com:blakeembrey/handlebars.js into ↵ | kpdecker | 2014-01-01 | 1 | -4/+9 | |
|\ | | | | | | | | | | | | | blakeembrey-compiler-options Conflicts: lib/handlebars/compiler/javascript-compiler.js | |||||
| * | Pull options out from param setup to allow easier extension. | Blake Embrey | 2013-12-28 | 1 | -5/+10 | |
| | | ||||||
* | | Include line info in compiler thrown exceptions | kpdecker | 2014-01-01 | 2 | -10/+14 | |
| | | | | | | Fixes #636 | |||||
* | | Remove duplication from generated subexpressions | kpdecker | 2014-01-01 | 3 | -13/+41 | |
| | | ||||||
* | | Whitespace cleanup | kpdecker | 2013-12-31 | 1 | -4/+4 | |
| | | ||||||
* | | Use literal for data lookup | kpdecker | 2013-12-31 | 1 | -1/+1 | |
| | | ||||||
* | | Add stack handling sanity checks | kpdecker | 2013-12-31 | 1 | -0/+8 | |
| | | ||||||
* | | Fix stack id "leak" on replaceStack | kpdecker | 2013-12-31 | 1 | -1/+6 | |
| | | ||||||
* | | Fix incorrect stack pop when replacing literals | kpdecker | 2013-12-31 | 1 | -2/+4 | |
| | | ||||||
* | | Fix multiple hash handling in subexpressions | kpdecker | 2013-12-31 | 1 | -1/+5 | |
| | | ||||||
* | | Add location tracking to sexpr | kpdecker | 2013-12-31 | 1 | -1/+3 | |
| | | ||||||
* | | Added support for subexpressions | machty | 2013-12-30 | 4 | -73/+95 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #694 from blakeembrey/compile-env | Kevin Decker | 2013-12-29 | 1 | -12/+9 | |
|\ \ | | | | | | | Make the environment reusable | |||||
| * | | Make the environment reusable. | Blake Embrey | 2013-12-28 | 1 | -12/+9 | |
| |/ | ||||||
* | | Fix ProgramNode parameter handling under IE | kpdecker | 2013-12-29 | 1 | -3/+5 | |
|/ | ||||||
* | add line numbers to nodes when parsing | Stanley Stuart | 2013-12-28 | 1 | -15/+55 | |
| | | | | closes #691 | |||||
* | Merge pull request #684 from blakeembrey/javascript-variable | Kevin Decker | 2013-12-25 | 1 | -1/+1 | |
|\ | | | | | Allow any number of trailing characters for valid JavaScript variable | |||||
| * | Allow any number of trailing characters. | Blake Embrey | 2013-12-24 | 1 | -1/+1 | |
| | | ||||||
* | | Remove unused var | kpdecker | 2013-12-23 | 1 | -1/+0 | |
| | | ||||||
* | | Expose compilerInfo and checkRevision as APIs | kpdecker | 2013-12-23 | 1 | -3/+7 | |
| | | | | | | Fixes #656 | |||||
* | | Fix handling of boolean escape in MustacheNode | kpdecker | 2013-12-23 | 1 | -3/+8 | |
| | | | | | | Fixes issue with Ember compatibility due to direct instantiation of MustacheNode. | |||||
* | | Use charAt rather than string index | kpdecker | 2013-12-23 | 1 | -1/+2 | |
| | | | | | | | | | | Older versions of IE do not support [] access to string contents so charAt must be used. Fixes #677 | |||||
* | | Export AST as an object rather than module | kpdecker | 2013-12-01 | 3 | -138/+144 | |
| | | | | | | The parser expects the AST object to be mutable, which modules are not. | |||||
* | | Protect context-lookups from undefined values | kpdecker | 2013-11-03 | 1 | -3/+15 | |
| | | | | | | | | Fixes #166 Fixes #587 | |||||
* | | Implement strip opcode | kpdecker | 2013-10-14 | 1 | -0/+19 | |
| | | ||||||
* | | Defer content output | kpdecker | 2013-10-14 | 1 | -2/+19 | |
| | | | | | | | | Allows for stripping of the content after the fact. | |||||
* | | Load strip flags from lex stream | kpdecker | 2013-10-14 | 1 | -8/+26 | |
| | | ||||||
* | | Wrap AST nodes in strip opcodes if defined | kpdecker | 2013-10-14 | 1 | -2/+14 | |
| | | ||||||
* | | Use accept for all compiler traversal | kpdecker | 2013-10-14 | 1 | -4/+3 | |
| | | ||||||
* | | Kill unused functions | kpdecker | 2013-10-14 | 1 | -9/+0 | |
| | | ||||||
* | | Push Source helper method | kpdecker | 2013-10-14 | 1 | -11/+15 | |
| | | ||||||
* | | Pass open token to MustacheNode for flag parsing | kpdecker | 2013-10-14 | 1 | -2/+3 | |
| | | ||||||
* | | Fix argument not found error | kpdecker | 2013-10-14 | 1 | -1/+1 | |
| | |