{"action":"created","comment":{"url":"https://api.github.com/repos/jimmyhchan/tornado/pulls/comments/31943359","id":31943359,"diff_hunk":"@@ -0,0 +1,58 @@\n+# Comiler Architecture\n+\n+The compiler receives an AST from the parser, then passes over that AST in 3 stages (checks, transforms, generates). Each stage may have multiple passes, and each pass is run in order. The output of this process is a set of code generation instructions that are fed to a code generator, and the code generator outputs compiled code.\n+\n+## Checks\n+\n+Check for bad Tornado code. A linter could be implemented in the check stage.\n+\n+## Transforms\n+\n+The Tornado grammar accepts anything that appears to be valid Tornado/HTML (which keeps logic in the parser to a minimum). The transform stage walks and transforms the AST as necessary. In this stage, HTML entities can be replaced with unicode characters, elements with non-HTML XML Namespaces can be marked as such (e.g. SVG elements), and inconsistent attribute names can be adjusted. Optionally, whitespace and blacklisted elements (e.g. `script` or `style`) can be stripped.\n+\n+## Generates\n+\n+The transformed AST is fed to the generates stage. The generate passes are used to create a series of code generation instructions. This willy probably happen in a single pass, but multiple passes are possible.","path":"src/compiler/README.md","position":15,"original_position":15,"commit_id":"ead946eb3765abb770867bf41d7ae7a22452e434","original_commit_id":"ead946eb3765abb770867bf41d7ae7a22452e434","user":{"login":"jimmyhchan","id":718471,"avatar_url":"https://avatars.githubusercontent.com/u/718471?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyhchan","html_url":"https://github.com/jimmyhchan","followers_url":"https://api.github.com/users/jimmyhchan/followers","following_url":"https://api.github.com/users/jimmyhchan/following{/other_user}","gists_url":"https://api.github.com/users/jimmyhchan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyhchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyhchan/subscriptions","organizations_url":"https://api.github.com/users/jimmyhchan/orgs","repos_url":"https://api.github.com/users/jimmyhchan/repos","events_url":"https://api.github.com/users/jimmyhchan/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyhchan/received_events","type":"User","site_admin":false},"body":"sp?  willy","created_at":"2015-06-08T18:18:22Z","updated_at":"2015-06-08T18:18:22Z","html_url":"https://github.com/jimmyhchan/tornado/pull/1#discussion_r31943359","pull_request_url":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jimmyhchan/tornado/pulls/comments/31943359"},"html":{"href":"https://github.com/jimmyhchan/tornado/pull/1#discussion_r31943359"},"pull_request":{"href":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1","id":37172277,"html_url":"https://github.com/jimmyhchan/tornado/pull/1","diff_url":"https://github.com/jimmyhchan/tornado/pull/1.diff","patch_url":"https://github.com/jimmyhchan/tornado/pull/1.patch","issue_url":"https://api.github.com/repos/jimmyhchan/tornado/issues/1","number":1,"state":"open","locked":false,"title":"COMPILATION: use a stack and output instructions","user":{"login":"smfoote","id":452458,"avatar_url":"https://avatars.githubusercontent.com/u/452458?v=3","gravatar_id":"","url":"https://api.github.com/users/smfoote","html_url":"https://github.com/smfoote","followers_url":"https://api.github.com/users/smfoote/followers","following_url":"https://api.github.com/users/smfoote/following{/other_user}","gists_url":"https://api.github.com/users/smfoote/gists{/gist_id}","starred_url":"https://api.github.com/users/smfoote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smfoote/subscriptions","organizations_url":"https://api.github.com/users/smfoote/orgs","repos_url":"https://api.github.com/users/smfoote/repos","events_url":"https://api.github.com/users/smfoote/events{/privacy}","received_events_url":"https://api.github.com/users/smfoote/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-08T16:37:27Z","updated_at":"2015-06-08T18:18:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acf6fde4d41bc66e15e6b911095ccaad8c324f45","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jimmyhchan/tornado/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jimmyhchan/tornado/issues/1/comments","statuses_url":"https://api.github.com/repos/jimmyhchan/tornado/statuses/ead946eb3765abb770867bf41d7ae7a22452e434","head":{"label":"smfoote:extensible-stack","ref":"extensible-stack","sha":"ead946eb3765abb770867bf41d7ae7a22452e434","user":{"login":"smfoote","id":452458,"avatar_url":"https://avatars.githubusercontent.com/u/452458?v=3","gravatar_id":"","url":"https://api.github.com/users/smfoote","html_url":"https://github.com/smfoote","followers_url":"https://api.github.com/users/smfoote/followers","following_url":"https://api.github.com/users/smfoote/following{/other_user}","gists_url":"https://api.github.com/users/smfoote/gists{/gist_id}","starred_url":"https://api.github.com/users/smfoote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smfoote/subscriptions","organizations_url":"https://api.github.com/users/smfoote/orgs","repos_url":"https://api.github.com/users/smfoote/repos","events_url":"https://api.github.com/users/smfoote/events{/privacy}","received_events_url":"https://api.github.com/users/smfoote/received_events","type":"User","site_admin":false},"repo":{"id":33144981,"name":"tornado","full_name":"smfoote/tornado","owner":{"login":"smfoote","id":452458,"avatar_url":"https://avatars.githubusercontent.com/u/452458?v=3","gravatar_id":"","url":"https://api.github.com/users/smfoote","html_url":"https://github.com/smfoote","followers_url":"https://api.github.com/users/smfoote/followers","following_url":"https://api.github.com/users/smfoote/following{/other_user}","gists_url":"https://api.github.com/users/smfoote/gists{/gist_id}","starred_url":"https://api.github.com/users/smfoote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smfoote/subscriptions","organizations_url":"https://api.github.com/users/smfoote/orgs","repos_url":"https://api.github.com/users/smfoote/repos","events_url":"https://api.github.com/users/smfoote/events{/privacy}","received_events_url":"https://api.github.com/users/smfoote/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smfoote/tornado","description":"HTML templates with asynchronous rendering, built with JavaScript.","fork":false,"url":"https://api.github.com/repos/smfoote/tornado","forks_url":"https://api.github.com/repos/smfoote/tornado/forks","keys_url":"https://api.github.com/repos/smfoote/tornado/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smfoote/tornado/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smfoote/tornado/teams","hooks_url":"https://api.github.com/repos/smfoote/tornado/hooks","issue_events_url":"https://api.github.com/repos/smfoote/tornado/issues/events{/number}","events_url":"https://api.github.com/repos/smfoote/tornado/events","assignees_url":"https://api.github.com/repos/smfoote/tornado/assignees{/user}","branches_url":"https://api.github.com/repos/smfoote/tornado/branches{/branch}","tags_url":"https://api.github.com/repos/smfoote/tornado/tags","blobs_url":"https://api.github.com/repos/smfoote/tornado/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smfoote/tornado/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smfoote/tornado/git/refs{/sha}","trees_url":"https://api.github.com/repos/smfoote/tornado/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smfoote/tornado/statuses/{sha}","languages_url":"https://api.github.com/repos/smfoote/tornado/languages","stargazers_url":"https://api.github.com/repos/smfoote/tornado/stargazers","contributors_url":"https://api.github.com/repos/smfoote/tornado/contributors","subscribers_url":"https://api.github.com/repos/smfoote/tornado/subscribers","subscription_url":"https://api.github.com/repos/smfoote/tornado/subscription","commits_url":"https://api.github.com/repos/smfoote/tornado/commits{/sha}","git_commits_url":"https://api.github.com/repos/smfoote/tornado/git/commits{/sha}","comments_url":"https://api.github.com/repos/smfoote/tornado/comments{/number}","issue_comment_url":"https://api.github.com/repos/smfoote/tornado/issues/comments{/number}","contents_url":"https://api.github.com/repos/smfoote/tornado/contents/{+path}","compare_url":"https://api.github.com/repos/smfoote/tornado/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smfoote/tornado/merges","archive_url":"https://api.github.com/repos/smfoote/tornado/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smfoote/tornado/downloads","issues_url":"https://api.github.com/repos/smfoote/tornado/issues{/number}","pulls_url":"https://api.github.com/repos/smfoote/tornado/pulls{/number}","milestones_url":"https://api.github.com/repos/smfoote/tornado/milestones{/number}","notifications_url":"https://api.github.com/repos/smfoote/tornado/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smfoote/tornado/labels{/name}","releases_url":"https://api.github.com/repos/smfoote/tornado/releases{/id}","created_at":"2015-03-30T20:03:47Z","updated_at":"2015-05-29T17:44:49Z","pushed_at":"2015-06-08T16:36:04Z","git_url":"git://github.com/smfoote/tornado.git","ssh_url":"git@github.com:smfoote/tornado.git","clone_url":"https://github.com/smfoote/tornado.git","svn_url":"https://github.com/smfoote/tornado","homepage":"http://smfoote.github.io/tornado/","size":1107,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":16,"forks":2,"open_issues":16,"watchers":4,"default_branch":"master"}},"base":{"label":"jimmyhchan:extensible","ref":"extensible","sha":"d97d5e328da8b71d1c0cff79b54c27ba5a273972","user":{"login":"jimmyhchan","id":718471,"avatar_url":"https://avatars.githubusercontent.com/u/718471?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyhchan","html_url":"https://github.com/jimmyhchan","followers_url":"https://api.github.com/users/jimmyhchan/followers","following_url":"https://api.github.com/users/jimmyhchan/following{/other_user}","gists_url":"https://api.github.com/users/jimmyhchan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyhchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyhchan/subscriptions","organizations_url":"https://api.github.com/users/jimmyhchan/orgs","repos_url":"https://api.github.com/users/jimmyhchan/repos","events_url":"https://api.github.com/users/jimmyhchan/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyhchan/received_events","type":"User","site_admin":false},"repo":{"id":36466656,"name":"tornado","full_name":"jimmyhchan/tornado","owner":{"login":"jimmyhchan","id":718471,"avatar_url":"https://avatars.githubusercontent.com/u/718471?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyhchan","html_url":"https://github.com/jimmyhchan","followers_url":"https://api.github.com/users/jimmyhchan/followers","following_url":"https://api.github.com/users/jimmyhchan/following{/other_user}","gists_url":"https://api.github.com/users/jimmyhchan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyhchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyhchan/subscriptions","organizations_url":"https://api.github.com/users/jimmyhchan/orgs","repos_url":"https://api.github.com/users/jimmyhchan/repos","events_url":"https://api.github.com/users/jimmyhchan/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyhchan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimmyhchan/tornado","description":"HTML templates with asynchronous rendering, built with JavaScript.","fork":true,"url":"https://api.github.com/repos/jimmyhchan/tornado","forks_url":"https://api.github.com/repos/jimmyhchan/tornado/forks","keys_url":"https://api.github.com/repos/jimmyhchan/tornado/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimmyhchan/tornado/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimmyhchan/tornado/teams","hooks_url":"https://api.github.com/repos/jimmyhchan/tornado/hooks","issue_events_url":"https://api.github.com/repos/jimmyhchan/tornado/issues/events{/number}","events_url":"https://api.github.com/repos/jimmyhchan/tornado/events","assignees_url":"https://api.github.com/repos/jimmyhchan/tornado/assignees{/user}","branches_url":"https://api.github.com/repos/jimmyhchan/tornado/branches{/branch}","tags_url":"https://api.github.com/repos/jimmyhchan/tornado/tags","blobs_url":"https://api.github.com/repos/jimmyhchan/tornado/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimmyhchan/tornado/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimmyhchan/tornado/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimmyhchan/tornado/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimmyhchan/tornado/statuses/{sha}","languages_url":"https://api.github.com/repos/jimmyhchan/tornado/languages","stargazers_url":"https://api.github.com/repos/jimmyhchan/tornado/stargazers","contributors_url":"https://api.github.com/repos/jimmyhchan/tornado/contributors","subscribers_url":"https://api.github.com/repos/jimmyhchan/tornado/subscribers","subscription_url":"https://api.github.com/repos/jimmyhchan/tornado/subscription","commits_url":"https://api.github.com/repos/jimmyhchan/tornado/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimmyhchan/tornado/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimmyhchan/tornado/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimmyhchan/tornado/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimmyhchan/tornado/contents/{+path}","compare_url":"https://api.github.com/repos/jimmyhchan/tornado/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimmyhchan/tornado/merges","archive_url":"https://api.github.com/repos/jimmyhchan/tornado/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimmyhchan/tornado/downloads","issues_url":"https://api.github.com/repos/jimmyhchan/tornado/issues{/number}","pulls_url":"https://api.github.com/repos/jimmyhchan/tornado/pulls{/number}","milestones_url":"https://api.github.com/repos/jimmyhchan/tornado/milestones{/number}","notifications_url":"https://api.github.com/repos/jimmyhchan/tornado/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimmyhchan/tornado/labels{/name}","releases_url":"https://api.github.com/repos/jimmyhchan/tornado/releases{/id}","created_at":"2015-05-28T21:17:13Z","updated_at":"2015-05-28T21:17:13Z","pushed_at":"2015-06-08T16:37:27Z","git_url":"git://github.com/jimmyhchan/tornado.git","ssh_url":"git@github.com:jimmyhchan/tornado.git","clone_url":"https://github.com/jimmyhchan/tornado.git","svn_url":"https://github.com/jimmyhchan/tornado","homepage":"http://smfoote.github.io/tornado/","size":349,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1"},"html":{"href":"https://github.com/jimmyhchan/tornado/pull/1"},"issue":{"href":"https://api.github.com/repos/jimmyhchan/tornado/issues/1"},"comments":{"href":"https://api.github.com/repos/jimmyhchan/tornado/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jimmyhchan/tornado/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jimmyhchan/tornado/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jimmyhchan/tornado/statuses/ead946eb3765abb770867bf41d7ae7a22452e434"}}}}