summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix duplicate return statement on simple templateskpdecker2014-12-271-1/+1
| |
* | Fix case-insensitive file system compile issuekpdecker2014-12-261-1/+1
| |
* | Add parent tracking and mutation to AST visitorskpdecker2014-12-261-35/+78
|/ | | Fixes #916
* Bump code coveragekpdecker2014-12-264-2/+7
|
* Implement block parameterskpdecker2014-12-265-51/+135
| | | Fixes #907
* Expose AST helpers in public APIkpdecker2014-12-212-21/+26
|
* Update fix for #926 for 3.0 codelinekpdecker2014-12-171-1/+1
|
* Track depths on deduped childrenkpdecker2014-12-161-0/+2
| | | | | Fixes a very specific error case where deduped children won’t receive the depths object due to it being omitted by the caller when optimizing. Fixes #926
* Avoid unnecessary this. referencekpdecker2014-12-161-3/+3
|
* Fix remaining depth argkpdecker2014-12-161-1/+0
|
* Remove unused vars and add jshint checkingkpdecker2014-12-167-10/+3
|
* Remove Compiler.depths parameterkpdecker2014-12-162-19/+7
| | | | This is no longer necessary with the depths array tracking and adds compiler overhead.
* Add instructions for 'spec/mustache' to CONTRIBUTING.md, fix a few typos ↵Or Neeman2014-12-073-3/+3
| | | | elsewere
* Add basic docs for JavaScriptCompiler override APIkpdecker2014-11-291-9/+9
|
* Drop unused JavaScriptCompiler.namespace paramkpdecker2014-11-291-2/+0
|
* Move compileProgram out of visitor methodskpdecker2014-11-291-18/+18
|
* Track source node via accept call rather vs opcodekpdecker2014-11-291-41/+46
|
* s/Subexpression/SubExpression/kpdecker2014-11-291-1/+1
|
* Rework strip flags to make clearer at in AST levelkpdecker2014-11-284-188/+239
| | | 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 helperskpdecker2014-11-282-38/+46
|
* Add original to BooleanLiteralkpdecker2014-11-281-1/+2
|
* Rename AST objects to match type nameskpdecker2014-11-282-16/+16
|
* Treat partial exec in a manner closer to helperskpdecker2014-11-274-48/+50
| | | This helps unify the code handling and will also be needed to support string/id tracking on partials.
* Update subexpression and hash AST constructskpdecker2014-11-276-105/+104
|
* Simplify Path and Sexpr calculated flagskpdecker2014-11-272-25/+38
|
* Replace DataNode and IdNode with PathNodekpdecker2014-11-265-55/+42
| | | 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 speckpdecker2014-11-265-26/+23
|
* Update statement node ASTskpdecker2014-11-265-147/+133
|
* Update MustacheNode for new AST structurekpdecker2014-11-264-25/+14
|
* Update ProgramNode to better match SpiderMonkeykpdecker2014-11-266-61/+62
|
* Update AST location info to match SpiderMonkeykpdecker2014-11-267-50/+52
| | | Part of #889
* Make each helper data uniformkpdecker2014-11-261-19/+26
| | | | | Provide @key and @last value for all forms of iteration. Fixes #910
* Provide Handlebars.noConflict implementationkpdecker2014-11-262-0/+18
| | | | | Allows for users who are loading via a global pattern to avoid conflicting with other instances of the library. Fixes #887
* Lookup partials when undefinedkpdecker2014-11-251-0/+3
|
* Optimize variable declarationkpdecker2014-11-251-2/+1
|
* Add parser support for block paramsMartin Muñoz2014-11-113-2/+14
|
* Propagate options for client compiled partialskpdecker2014-11-082-1/+3
| | | Fixes #901
* Merge branch 'remove-block-mustache' of github.com:mmun/handlebars.js into ↵kpdecker2014-11-084-26/+31
|\ | | | | | | | | | | | | | | mmun-remove-block-mustache Conflicts: lib/handlebars/compiler/helpers.js spec/parser.js
| * Remove RawBlockNode in favor of prepareRawBlock helperMartin Muñoz2014-11-052-9/+3
| |
| * Simplify BlockNode by removing intermediate MustacheNodeMartin Muñoz2014-11-024-20/+31
| |
* | Only provide aliases for multiple use callskpdecker2014-11-081-26/+39
| | | | | | Fixes #903
* | Provide default mapping for boilerplate codekpdecker2014-11-081-1/+5
| |
* | Add source map output support to the CLIkpdecker2014-11-081-20/+57
| |
* | Generate source mapskpdecker2014-11-082-100/+275
| | | | | | | | | | | | 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.
* | Include location information in all opcodeskpdecker2014-11-082-45/+50
| |
* | Merge pull request #892 from wycats/else-ifKevin Decker2014-11-081-7/+26
|\ \ | | | | | | Implement parser for else chaining of helpers
| * | Implement parser for else chaining of helperskpdecker2014-10-271-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows users to chain multiple helpers together using their inverse callbacks. I.e. ``` {{#if foo}} {{else if bar}} {{else}} {{/if}} ``` The control flow here effectively causes the helpers to be nested. The above is actually syntactic sugar for this: ``` {{#if foo}} {{else}} {{#if bar}} {{else}} {{/if}} {{/if}} ``` Any helper may be used in this manner, the only requirement is they support normal calls and inverse calls. Introduces a breaking change in that `{{else foo}}` may no longer be used as a root level operator. Instead `{{^foo}}` must be used. Fixes #72.
* | | Use toHTML vs. instanceof checks for SafeStringkpdecker2014-11-082-3/+3
| | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #870 from max-b/masterKevin Decker2014-11-081-0/+3
|\ \ \ | | | | | | | | Registering undefined partial throws exception.
| * | | Registering undefined partial throws exception.Maxb2014-09-191-0/+3
| |/ /
* | | Simplify program generation logickpdecker2014-11-081-10/+2
| | |
* | | Bump test coveragekpdecker2014-11-082-3/+4
| | |
* | | Ignore unused code pathskpdecker2014-11-081-0/+2
| | | | | | | | | | | | 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.
* | | Merge setupParams and setupOptionskpdecker2014-11-061-9/+2
| | |
* | | Simplify flushInline implementationkpdecker2014-11-051-19/+10
| | |
* | | Use terinary operator for inline appendskpdecker2014-11-051-7/+12
| | | | | | | | | | | | Allows for append operations to avoid breaking inline chain.
* | | Provide stubbed visitor implementationkpdecker2014-11-051-2/+58
| |/ |/| | | Part of #889
* | Add preventIndent option for partialskpdecker2014-11-021-1/+6
| | | | | | | | | | This disables the standalone partial indent behavior required by the Mustache spec and allows for users to utilize partials in the same manner as under 1.x. Fixes #858
* | Allow whitespace control on commentskpdecker2014-11-022-4/+8
| | | | | | | | | | This changes the call signature for the CommentNode constructor, which is a potentially breaking change for AST users. Fixes #866
* | Capitalization change in comments for consistencyAlex Jeng2014-09-231-1/+1
|/
* v2.0.0v2.0.0kpdecker2014-09-011-1/+1
|
* Cleanup var names slightlykpdecker2014-08-271-6/+6
|
* v2.0.0-beta.1v2.0.0-beta.1kpdecker2014-08-261-1/+1
|
* Render false literal as “false”kpdecker2014-08-252-2/+4
| | | Fixes #827
* Prune unused codekpdecker2014-08-255-8/+4
|
* Expose default compatibility wrapper for umd buildkpdecker2014-08-252-0/+4
|
* Add template isTop flagkpdecker2014-08-251-0/+1
|
* Fix compiler version tagkpdecker2014-08-251-1/+1
|
* Rev runtime versionkpdecker2014-08-251-2/+3
|
* Refactor content blocks to ignore lineskpdecker2014-08-251-57/+31
| | | | | We can simplify our previous standalone determination logic by merging content blocks again. Fixes #854
* Expose escapeExpression on the root objectkpdecker2014-08-251-0/+1
|
* Allow passing depths to _childkpdecker2014-08-252-6/+6
|
* Optimize compiler opcode callkpdecker2014-08-241-1/+3
|
* Additional test coverage cleanupkpdecker2014-08-232-8/+5
| | | Also fixes the template._child implementation which broke with the depthed work.
* Restore helperMissing for ambiguous statementskpdecker2014-08-231-1/+2
| | | | Fixes #318 (regression) Partial fix for #783
* Cleanup from code coverage reportkpdecker2014-08-233-16/+12
|
* Move strip processing into AST helper logickpdecker2014-08-233-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 flagkpdecker2014-08-232-3/+4
|
* Add original value tracking to ContentNodekpdecker2014-08-231-1/+1
|
* Merge branch 'refactor-parser' of github.com:mmun/handlebars.js into ↵kpdecker2014-08-233-174/+177
|\ | | | | | | | | | | | | | | | | mmun-refactor-parser Conflicts: lib/handlebars/compiler/ast.js spec/ast.js src/handlebars.yy
| * Refactor blocks, programs and inversesMartin Muñoz2014-07-293-46/+56
| |
* | Optimize replaceStack for inline methodskpdecker2014-08-231-40/+24
| | | | | | Only use case was with inline input so most of this code was unnecessary.
* | Remove unnecessary stack variable from blockHelperkpdecker2014-08-231-4/+4
| |
* | Do not flush subexpressionskpdecker2014-08-231-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 lookupskpdecker2014-08-151-4/+3
| | | | | | | | Fixes #837
* | Strip dead code from javascript compilerkpdecker2014-08-151-9/+2
| |
* | Fix compat partial exec without datakpdecker2014-08-151-0/+2
| |
* | Make depthed lookup call non-literalkpdecker2014-08-151-1/+1
| | | | | | Prevents duplicate calls from being made.
* | Provide better error on unexpected templatekpdecker2014-08-151-0/+4
| | | | | | Fixes #806
* | Additional test coveragekpdecker2014-08-151-1/+1
| |
* | Remove nested function eval in blockHelperMissingkpdecker2014-08-141-2/+0
| | | | | | This only worked when a function returned a function, which was then evaluated. This seems like unexpected behavior so this was dropped.
* | Fix compiler program de-dupingkpdecker2014-08-141-9/+19
| |
* | Drop unused Compiler.disassemble methodkpdecker2014-08-141-24/+0
| |
* | Drop unused DECLARE opcodekpdecker2014-08-142-9/+1
| |
* | Drop unused registerHelper inverse parameterkpdecker2014-08-141-3/+2
| |
* | Increase test coverage a touchkpdecker2014-08-145-6/+9
| |
* | Implement partial recursive lookupkpdecker2014-08-142-7/+10
| |
* | Inherit compat flag for partialskpdecker2014-08-142-3/+6
| |
* | Implement recursive field lookup in compat modekpdecker2014-08-133-8/+32
| | | | | | | | | | | | 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.
* | Avoid depth construction overhead for non-depthedkpdecker2014-08-131-1/+1
| |