Commit Graph

11 Commits

Author SHA1 Message Date
wycats c19f06b4ee Updated semantics 2010-12-29 19:20:03 -08:00
wycats d87ae129c0 Add a #with helper 2010-12-21 09:47:01 -08:00
wycats b418ef6eb2 Add optimized compiled version of handlebars, which should be significantly faster. Use Handlebars.VM.compile instead of Handlebars.compile to use the optimized version.
Major TODOS:

* clean up a bunch of code duplication in the compiler
* reorganize the compiler
* add support for debug symbols which would make it possible
  to provide information about what part of the source caused
  a runtime error.
2010-12-18 23:27:34 -08: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
wycats 9fcd85bbac Allow helperMissing to apply to simple mustaches (paves the way to support things like link_to in a Rails context) 2010-12-11 18:43:58 -08:00
wycats 215754c268 Make helperMissing a built-in feature 2010-12-11 18:28:37 -08:00
wycats 5097c18912 Make it possible to register helpers and partials and then skip passing in the helpers or partials later 2010-12-11 18:10:56 -08: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 9a6f77af56 A few more lingering bugs:
* add helperMissing.not to the specs
* add Handlebars.Utils.isEmpty
* add runtime handling for inverse sections
* fix __get__ to pass an IdNode to evaluate
* handle case in wrapProgram where context is undefined
2010-12-03 01:39:00 -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