Closed mmun closed 7 years ago
@mmun thank you!
Ember 1.13 test is failing. In the current test suite, we're not testing inline let in 1.13.
Should we exclude the AST transform from for Ember 1.13 or is it possible to make it work with 1.13?
Should be possible. :)
EDIT: Actually, it would be a pain to get it working in 1.13 so I disable the transform below 2.0.0.
I've changed the example in the PR message to demonstrate that bindings are created in parallel rather than series (E.g. the semantics are like LISP's let
rather than let*
).
This is pretty awesome 🎉
is this glimmer 2 compatible?
An excellent question, is there a way that we can test it?
https://github.com/emberjs/ember.js/pull/14156 looks like we can build vs canary?
So looks like it's going to require some work to get it working on Glimmer. We can track it with #14, but I don't think it should hold this up getting merged.
I can't begin to express how happy this makes me. A truly lexical inline form is almost bringing tears to my eyes y'all. Not even joking. Thanks @mmun and @rwjblue making this happen.
Absolutely, thanks guys so much for helping us make this work.
@cowboyd I have a follow up PR soon that adds the warning.
EDIT: The syntax of {{let}} and {{#let}} has changed since this PR.
This PR reimplements inline let as an HTMLBars AST transform. There is no notion of inline let at runtime. It works by rewriting the let statements as nested blocks. For example,
is transformed to (excluding whitespace changes to make it easier to read):
Both templates generate the DOM