Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Handlebars' parser API #186

Closed
asermax opened this issue Dec 20, 2014 · 4 comments
Closed

New Handlebars' parser API #186

asermax opened this issue Dec 20, 2014 · 4 comments

Comments

@asermax
Copy link

asermax commented Dec 20, 2014

In relation to #139, I was trying to make an Ember project work with tildeio/htmlbars + emblem, but came to realize that htmlbars is using the new parser API discussed on handlebars-lang/handlebars.js#889
Given that, the AST provided by emblem is currently incompatible with htmlbars because some (minor, I think) changes on this new API.

I wouldn't mind trying to adapt emblem to the new API, but I'm not really sure were to start, would you mind giving me some pointers?

@patricklx
Copy link
Contributor

Hi, i started working on this here.
Any help is welcome :)
Just check the commit history on https://github.com/wycats/handlebars.js/commits/master/spec/ast.js
or https://github.com/wycats/handlebars.js/commits/master/lib/handlebars/compiler/ast.js
to see AST API changes

@asermax
Copy link
Author

asermax commented Dec 30, 2014

Nice! I see that you advanced a lot, can't wait to test it 👍

I was aware of the changes on the commit history, but I haven't really gotten into how AST works (what the parameters for the nodes are, for example) nor do I understood how to apply those changes on the emblem grammar, so I'm not very confident about contributing.
If I catch up to it, I'll try to give a hand (not that you need one, looks like you know what you're doing xD).

@asermax
Copy link
Author

asermax commented Jan 3, 2015

Tested your changes in my project and the parsing worked perfectly so far, the htmlbars precompiler didn't complain and the templates worked on the latest ember release. Only caveat was using the ember-htmlbars-attribute-syntax feature flag for bound attributes to work.
Thanks for the hard work!

Sill, looks like some libraries aren't htmlbars ready yet so what I could test was limited. I'll keep trying tho :)

@machty
Copy link
Owner

machty commented Jan 20, 2015

Closing this since we're not targeting Hbs AST any more; I'm finishing up work on an Emblem->Handlebars source compiler that'll take care of all of this

@machty machty closed this as completed Jan 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants