Commit Graph

17 Commits

Author SHA1 Message Date
tomhuda 88e7003331 * Added a few public API methods to JavaScriptCompiler.prototype, so it can be subclassed.
* made it possible to define an alternate name lookup scheme (so that {{foo}} does not have to be
    context.foo, but can instead be something like context.get('foo'))
  * made it possible to substitute an alternate buffer instead of the default empty String and override how
    the compiled template appends to the buffer
* Added the concept of template-local data. In order to enable template-local data, pass true
  as the second parameter to the template compiler. Then, pass in the data as the fourth
  parameter (context, helpers, partials, data). These signatures may change before the 1.0 release.
2011-02-11 17:03:12 -08:00
wycats bf6c74aa83 Restructure things more simply 2010-12-29 18:21:43 -08:00
wycats 72fa62529e Merge branch 'master' of https://github.com/zaach/handlebars.js into zaach-master 2010-12-27 13:02:20 -08:00
wycats fc0d721b96 Use pluggable logger rather the puts 2010-12-21 09:45:59 -08:00
Zach Carter faea35f8fa Merging with latest master 2010-12-20 02:25:25 -05:00
wycats e15d675a64 Everything is working now on the new VM except for partials and inverse sections 2010-12-15 23:42:53 -08:00
Zach Carter 97536f897e Switch to Jison's lexer. 2010-12-14 19:07:05 -05:00
wycats ec948c7382 Small restructuring. Have I mentioned how much I hate having to write modules that work in both CommonJS and the browser? 2010-12-12 13:33:17 -08:00
wycats 62cea5b05e Make sure rspec returns the right line number from library files 2010-12-11 18:29:05 -08:00
wycats fdc8e425d0 Improve compiling infrastructure, and restore a bit of duplication in spec_helper to make debugging easier in test failures 2010-12-11 18:10:26 -08:00
wycats 4db1abcd74 Fix up the compilation process 2010-12-04 17:35:36 -05:00
wycats f205cec745 Finish compatibility with the old handlebars:
* foo"bar" is an invalid param
* {{foo}}bar{{/baz}} is invalid
* fix a number of issues with inverse sections
* add partials
2010-12-03 16:49:04 -05:00
wycats 8f6f3051e6 Add support for inverted sections in the parser 2010-12-03 00:54:18 -05:00
wycats 762329913d Fix a number of outstanding issues:
* {{}} escape their contents, {{{}}} and {{& }} do not
* Add support in the parser, tokenizer and AST for partials
  with context (support is still not there in the runtime)
* Fix some inconsistencies with the old behavior involving
  the correct printing of null and undefined
* Add Handlebars.Exception
* Fixed an issue involving ./foo and this/foo
* Fleshed out helperMissing in the specs (this will be
  moved out into handlebars proper once registerHelper
  and registerPartial are added)
2010-12-02 01:13:24 -05:00
wycats 9846fb8a28 Got Qunit tests running through RSpec and fixed a bunch of bugs... 33 fails from the original suite to go 2010-11-28 17:36:05 -08:00
wycats 7d0204bf9f Add some more tests, and properly handle errors across the boundary in tests 2010-11-25 16:09:42 -08:00
wycats 83fa737e04 Add tests for the tokenizer using RubyRacer 2010-11-25 11:53:41 -08:00