{"action":"created","issue":{"url":"https://api.github.com/repos/thefrontside/ember-let/issues/12","repository_url":"https://api.github.com/repos/thefrontside/ember-let","labels_url":"https://api.github.com/repos/thefrontside/ember-let/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/thefrontside/ember-let/issues/12/comments","events_url":"https://api.github.com/repos/thefrontside/ember-let/issues/12/events","html_url":"https://github.com/thefrontside/ember-let/pull/12","id":173680404,"number":12,"title":"Rewrite inline let to have lexical scope","user":{"login":"mmun","id":1151810,"avatar_url":"https://avatars.githubusercontent.com/u/1151810?v=3","gravatar_id":"","url":"https://api.github.com/users/mmun","html_url":"https://github.com/mmun","followers_url":"https://api.github.com/users/mmun/followers","following_url":"https://api.github.com/users/mmun/following{/other_user}","gists_url":"https://api.github.com/users/mmun/gists{/gist_id}","starred_url":"https://api.github.com/users/mmun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmun/subscriptions","organizations_url":"https://api.github.com/users/mmun/orgs","repos_url":"https://api.github.com/users/mmun/repos","events_url":"https://api.github.com/users/mmun/events{/privacy}","received_events_url":"https://api.github.com/users/mmun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-29T01:31:13Z","updated_at":"2016-08-29T19:37:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thefrontside/ember-let/pulls/12","html_url":"https://github.com/thefrontside/ember-let/pull/12","diff_url":"https://github.com/thefrontside/ember-let/pull/12.diff","patch_url":"https://github.com/thefrontside/ember-let/pull/12.patch"},"body":"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,\r\n\r\n```hbs\r\n<div>\r\n  {{let a 1 b 2}}\r\n  {{let a 11 b 12 c (add a b)}}\r\n  {{a}} {{b}} {{c}}\r\n  <div>\r\n    {{let a 5}}\r\n    {{a}} {{b}} {{c}}\r\n  </div>\r\n  {{let a (add a 10)}}\r\n  {{a}} {{b}} {{c}}\r\n</div>\r\n```\r\n\r\nis transformed to (excluding whitespace changes to make it easier to read):\r\n\r\n```hbs\r\n<div>\r\n  {{#let 1 2 as |a b|}}\r\n    {{#let 11 12 (add a b) as |a b c|}}\r\n      {{a}} {{b}} {{c}}\r\n      <div>\r\n        {{#let 5 as |a|}}\r\n          {{a}} {{b}} {{c}}\r\n        {{/let}}\r\n      </div>\r\n      {{#let (add a 10) as |a|}}\r\n        {{a}} {{b}} {{c}}\r\n      {{/let}}\r\n    {{/let}}\r\n  {{/let}}\r\n</div>\r\n```\r\n\r\nBoth templates generate the DOM\r\n\r\n```hbs\r\n<div>\r\n  11 12 3\r\n  <div>\r\n    5 12 3\r\n  </div>\r\n  21 12 3\r\n</div>\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/thefrontside/ember-let/issues/comments/243231127","html_url":"https://github.com/thefrontside/ember-let/pull/12#issuecomment-243231127","issue_url":"https://api.github.com/repos/thefrontside/ember-let/issues/12","id":243231127,"user":{"login":"Robdel12","id":2072894,"avatar_url":"https://avatars.githubusercontent.com/u/2072894?v=3","gravatar_id":"","url":"https://api.github.com/users/Robdel12","html_url":"https://github.com/Robdel12","followers_url":"https://api.github.com/users/Robdel12/followers","following_url":"https://api.github.com/users/Robdel12/following{/other_user}","gists_url":"https://api.github.com/users/Robdel12/gists{/gist_id}","starred_url":"https://api.github.com/users/Robdel12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robdel12/subscriptions","organizations_url":"https://api.github.com/users/Robdel12/orgs","repos_url":"https://api.github.com/users/Robdel12/repos","events_url":"https://api.github.com/users/Robdel12/events{/privacy}","received_events_url":"https://api.github.com/users/Robdel12/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T19:37:17Z","updated_at":"2016-08-29T19:37:17Z","body":"This is pretty awesome 🎉 "}}
{"actor":{"display_login":"Robdel12"}}