Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Drop AST constructors in favor of JSON | kpdecker | 2015-08-18 | 1 | -126/+0 |
| | | | | | These were little more than object literal statements that were less clear due to their use of index-based arguments. Fixes #1077 | ||||
* | Bulletproof AST.helpers.helperExpression | kpdecker | 2015-08-03 | 1 | -1/+3 |
| | | | | | Avoid undefined values and potential false positives from other type values such as partials. Fixes #1055 | ||||
* | Update for let and optional parameters | kpdecker | 2015-04-20 | 1 | -1/+1 |
| | |||||
* | Add full support for es6 | kpdecker | 2015-04-16 | 1 | -5/+4 |
| | | | | | | | | Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions. Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules. Fixes #855 Fixes #993 | ||||
* | Add undefined and null literal support | kpdecker | 2015-04-07 | 1 | -0/+12 |
| | | | | | This adds the UndefinedLiteral and NullLiteral to AST. Fixes #990 | ||||
* | Avoid direct references to sexpr in statements | kpdecker | 2015-01-18 | 1 | -19/+17 |
| | | | | | This allows us to avoid creating unnecessary AST nodes and avoids things like isHelper. Side effect of these changes is that @data functions can now have data parameters passed to them. | ||||
* | Add support for dynamic partial names | kpdecker | 2015-01-18 | 1 | -0/+9 |
| | | | | | | | | | Uses the subexpression syntax to allow for dynamic partial lookups. Ex: ``` {{> (helper) }} ``` Fixes #933 | ||||
* | Expose AST helpers in public API | kpdecker | 2014-12-21 | 1 | -0/+21 |
| | |||||
* | Remove unused vars and add jshint checking | kpdecker | 2014-12-16 | 1 | -2/+0 |
| | |||||
* | Add instructions for 'spec/mustache' to CONTRIBUTING.md, fix a few typos ↵ | Or Neeman | 2014-12-07 | 1 | -1/+1 |
| | | | | elsewere | ||||
* | Rework strip flags to make clearer at in AST level | kpdecker | 2014-11-28 | 1 | -4/+5 |
| | | | 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. | ||||
* | Move Jison parsing out of AST into helpers | kpdecker | 2014-11-28 | 1 | -38/+9 |
| | |||||
* | Add original to BooleanLiteral | kpdecker | 2014-11-28 | 1 | -1/+2 |
| | |||||
* | Rename AST objects to match type names | kpdecker | 2014-11-28 | 1 | -12/+12 |
| | |||||
* | Update subexpression and hash AST constructs | kpdecker | 2014-11-27 | 1 | -10/+15 |
| | |||||
* | Simplify Path and Sexpr calculated flags | kpdecker | 2014-11-27 | 1 | -21/+2 |
| | |||||
* | Replace DataNode and IdNode with PathNode | kpdecker | 2014-11-26 | 1 | -19/+8 |
| | | | 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. | ||||
* | Update literal ast nodes for new spec | kpdecker | 2014-11-26 | 1 | -9/+6 |
| | |||||
* | Update statement node ASTs | kpdecker | 2014-11-26 | 1 | -46/+35 |
| | |||||
* | Update MustacheNode for new AST structure | kpdecker | 2014-11-26 | 1 | -16/+5 |
| | |||||
* | Update ProgramNode to better match SpiderMonkey | kpdecker | 2014-11-26 | 1 | -2/+3 |
| | |||||
* | Update AST location info to match SpiderMonkey | kpdecker | 2014-11-26 | 1 | -22/+14 |
| | | | Part of #889 | ||||
* | Add parser support for block params | Martin Muñoz | 2014-11-11 | 1 | -1/+2 |
| | |||||
* | Remove RawBlockNode in favor of prepareRawBlock helper | Martin Muñoz | 2014-11-05 | 1 | -8/+0 |
| | |||||
* | Simplify BlockNode by removing intermediate MustacheNode | Martin Muñoz | 2014-11-02 | 1 | -10/+4 |
| | |||||
* | Allow whitespace control on comments | kpdecker | 2014-11-02 | 1 | -4/+3 |
| | | | | | This changes the call signature for the CommentNode constructor, which is a potentially breaking change for AST users. Fixes #866 | ||||
* | Prune unused code | kpdecker | 2014-08-25 | 1 | -2/+0 |
| | |||||
* | 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 | 1 | -172/+6 |
|\ | | | | | | | | | | | | | | | | | 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 | 1 | -44/+6 |
| | | |||||
* | | 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 |
|/ | |||||
* | Ensure isHelper is coerced to a boolean | Martin Muñoz | 2014-05-05 | 1 | -1/+1 |
| | |||||
* | Make raw blocks operate like blocks | kpdecker | 2014-02-09 | 1 | -3/+8 |
| | |||||
* | raw block helpers | Jesse Ezell | 2014-02-09 | 1 | -0/+9 |
| | |||||
* | Add trackIds compiler flag | kpdecker | 2014-01-17 | 1 | -1/+5 |
| | | | | 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 | 1 | -5/+5 |
| | | | Fixes #658 | ||||
* | Allow decimal number values | kpdecker | 2014-01-17 | 1 | -4/+4 |
| | | | Fixes #472 | ||||
* | Add partial hash parser support | kpdecker | 2014-01-17 | 1 | -1/+2 |
| | |||||
* | Fix DATA value in stringParams mode | kpdecker | 2014-01-06 | 1 | -0/+1 |
| | | | | Fixes #699 | ||||
* | Include line info in compiler thrown exceptions | kpdecker | 2014-01-01 | 1 | -7/+12 |
| | | | Fixes #636 | ||||
* | Remove duplication from generated subexpressions | kpdecker | 2014-01-01 | 1 | -0/+2 |
| | |||||
* | Add location tracking to sexpr | kpdecker | 2013-12-31 | 1 | -1/+3 |
| | |||||
* | Added support for subexpressions | machty | 2013-12-30 | 1 | -3/+21 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | 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 | ||||
* | 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 | 1 | -136/+142 |
| | | | The parser expects the AST object to be mutable, which modules are not. | ||||
* | Load strip flags from lex stream | kpdecker | 2013-10-14 | 1 | -8/+26 |
| | |||||
* | Pass open token to MustacheNode for flag parsing | kpdecker | 2013-10-14 | 1 | -2/+3 |
| | |||||
* | Remove global Handlebars references | kpdecker | 2013-10-09 | 1 | -1/+1 |
| | |||||
* | Use proper default vs. module import semantics | kpdecker | 2013-10-01 | 1 | -30/+26 |
| | |||||
* | Break exception class out into a standalone module | kpdecker | 2013-10-01 | 1 | -1/+1 |
| | |||||
* | Further progress towards modularization. | Yehuda Katz | 2013-07-24 | 1 | -15/+19 |
| | | | | | 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. | ||||
* | Initial work on ES6 modules | Yehuda Katz | 2013-07-01 | 1 | -24/+15 |
| | |||||
* | Remove unnecessary function | kpdecker | 2013-06-02 | 1 | -6/+3 |
| | |||||
* | Allow ID, STRING, or INTEGER for partial name | kpdecker | 2013-05-29 | 1 | -1/+1 |
| | | | Fixes #519 | ||||
* | Improve tracking of original path values | kpdecker | 2013-05-27 | 1 | -7/+12 |
| | |||||
* | Remove unused scope function | kpdecker | 2013-02-16 | 1 | -101/+98 |
| | |||||
* | merge | Tommy Messbauer | 2013-02-11 | 1 | -91/+101 |
|\ | |||||
| * | Only allow 'this' or '..' to lead a path | Les Hill | 2013-01-21 | 1 | -2/+5 |
| | | | | | | | | Paths like 'outer/../key' raise an exception when compiling. | ||||
| * | Boolean("false") === true | tomhuda | 2013-01-18 | 1 | -1/+1 |
| | | |||||
| * | Add support for getting types in string mode | Yehuda Katz | 2013-01-16 | 1 | -0/+5 |
| | | | | | | | | | | This makes it possible to determine whether an argument was passed as a string or as a path when implementing helpers in string mode. | ||||
| * | Partials can be paths | Les Hill | 2012-12-13 | 1 | -7/+9 |
| | | | | | | | | | | | | Allows partials with slashes, a common partial syntax. For example: {{> shared/dude}} | ||||
* | | restored scope of var verifyMatch | Tommy Messbauer | 2013-02-11 | 1 | -6/+6 |
| | | |||||
* | | Factory update with tabs to spaces.. sorry :( | Tommy Messbauer | 2012-11-26 | 1 | -117/+119 |
| | | |||||
* | | Commiting initial factory code | Tommy Messbauer | 2012-08-29 | 1 | -3/+4 |
|/ | |||||
* | Add support for @data variables | Yehuda Katz | 2012-07-05 | 1 | -0/+5 |
| | |||||
* | Clean up parser tests and AST printer | tomhuda | 2012-05-28 | 1 | -0/+4 |
| | |||||
* | More cleanup | tomhuda | 2012-05-28 | 1 | -8/+2 |
| | | | | * Make block and inverse use the main helper path * Eliminate separate inverse AST node | ||||
* | Start doing earlier work on helpers | Yehuda Katz | 2012-05-28 | 1 | -5/+22 |
| | |||||
* | Fix module loading within node | kpdecker | 2011-07-30 | 1 | -1/+1 |
| | |||||
* | Move art into compiler dir | kpdecker | 2011-07-30 | 1 | -0/+103 |