{"action":"created","comment":{"url":"https://api.github.com/repos/google/skylark/pulls/comments/169437937","pull_request_review_id":97963984,"id":169437937,"diff_hunk":"@@ -9,6 +9,47 @@ package syntax\n type Node interface {\n \t// Span returns the start and end position of the expression.\n \tSpan() (start, end Position)\n+\n+\t// Comments returns the comments associated with this node.\n+\t// It returns nil if RetainComments was not specified during parsing.\n+\tComments() *Comments\n+\n+\t// AllocComments allocates a new Comments node if there was none.\n+\t// This makes possible to add new comments using Comments() method.\n+\tAllocComments()\n+}\n+\n+// A Comment represents a single # comment.\n+type Comment struct {\n+\tStart  Position\n+\tText   string // without trailing newline\n+\tSuffix bool   // an end-of-line (not whole line) comment\n+}\n+\n+// Comments collects the comments associated with an expression.\n+type Comments struct {\n+\tBefore []Comment // whole-line comments before this expression\n+\tSuffix []Comment // end-of-line comments after this expression\n+\n+\t// For top-level expressions only, After lists whole-line\n+\t// comments following the expression.\n+\tAfter []Comment\n+}\n+\n+// A CommentsRef is a possibly-nil reference to a set of comments.","path":"syntax/syntax.go","position":32,"original_position":31,"commit_id":"c3d71547acce7c341ff8b24bc94a633fbee695b4","original_commit_id":"3e10ab77e407a33338f0fa6c6dd3bc931c39e78d","user":{"login":"alandonovan","id":8433140,"avatar_url":"https://avatars0.githubusercontent.com/u/8433140?v=4","gravatar_id":"","url":"https://api.github.com/users/alandonovan","html_url":"https://github.com/alandonovan","followers_url":"https://api.github.com/users/alandonovan/followers","following_url":"https://api.github.com/users/alandonovan/following{/other_user}","gists_url":"https://api.github.com/users/alandonovan/gists{/gist_id}","starred_url":"https://api.github.com/users/alandonovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alandonovan/subscriptions","organizations_url":"https://api.github.com/users/alandonovan/orgs","repos_url":"https://api.github.com/users/alandonovan/repos","events_url":"https://api.github.com/users/alandonovan/events{/privacy}","received_events_url":"https://api.github.com/users/alandonovan/received_events","type":"User","site_admin":false},"body":"The loop over struct fields in treeString will need to skip the commentRef field.","created_at":"2018-02-20T19:47:21Z","updated_at":"2018-02-20T19:47:21Z","html_url":"https://github.com/google/skylark/pull/64#discussion_r169437937","pull_request_url":"https://api.github.com/repos/google/skylark/pulls/64","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/google/skylark/pulls/comments/169437937"},"html":{"href":"https://github.com/google/skylark/pull/64#discussion_r169437937"},"pull_request":{"href":"https://api.github.com/repos/google/skylark/pulls/64"}},"in_reply_to_id":169415282},"pull_request":{"url":"https://api.github.com/repos/google/skylark/pulls/64","id":169114706,"html_url":"https://github.com/google/skylark/pull/64","diff_url":"https://github.com/google/skylark/pull/64.diff","patch_url":"https://github.com/google/skylark/pull/64.patch","issue_url":"https://api.github.com/repos/google/skylark/issues/64","number":64,"state":"open","locked":false,"title":"Attach comments to AST nodes.","user":{"login":"laurentlb","id":485572,"avatar_url":"https://avatars2.githubusercontent.com/u/485572?v=4","gravatar_id":"","url":"https://api.github.com/users/laurentlb","html_url":"https://github.com/laurentlb","followers_url":"https://api.github.com/users/laurentlb/followers","following_url":"https://api.github.com/users/laurentlb/following{/other_user}","gists_url":"https://api.github.com/users/laurentlb/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentlb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentlb/subscriptions","organizations_url":"https://api.github.com/users/laurentlb/orgs","repos_url":"https://api.github.com/users/laurentlb/repos","events_url":"https://api.github.com/users/laurentlb/events{/privacy}","received_events_url":"https://api.github.com/users/laurentlb/received_events","type":"User","site_admin":false},"body":"This feature is off by default. More testing will be needed before\r\nexposing it to the ParseFile function.\r\n\r\nLogic is copied from Buildifier (https://github.com/bazelbuild/buildtools/tree/master/build).\r\n\r\nbug #63","created_at":"2018-02-14T13:50:35Z","updated_at":"2018-02-20T19:47:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3b956be2f4eeedf8ffbe0c7a5c742983eb0fa17","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/skylark/pulls/64/commits","review_comments_url":"https://api.github.com/repos/google/skylark/pulls/64/comments","review_comment_url":"https://api.github.com/repos/google/skylark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/skylark/issues/64/comments","statuses_url":"https://api.github.com/repos/google/skylark/statuses/c3d71547acce7c341ff8b24bc94a633fbee695b4","head":{"label":"laurentlb:master","ref":"master","sha":"c3d71547acce7c341ff8b24bc94a633fbee695b4","user":{"login":"laurentlb","id":485572,"avatar_url":"https://avatars2.githubusercontent.com/u/485572?v=4","gravatar_id":"","url":"https://api.github.com/users/laurentlb","html_url":"https://github.com/laurentlb","followers_url":"https://api.github.com/users/laurentlb/followers","following_url":"https://api.github.com/users/laurentlb/following{/other_user}","gists_url":"https://api.github.com/users/laurentlb/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentlb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentlb/subscriptions","organizations_url":"https://api.github.com/users/laurentlb/orgs","repos_url":"https://api.github.com/users/laurentlb/repos","events_url":"https://api.github.com/users/laurentlb/events{/privacy}","received_events_url":"https://api.github.com/users/laurentlb/received_events","type":"User","site_admin":false},"repo":{"id":120930487,"name":"skylark","full_name":"laurentlb/skylark","owner":{"login":"laurentlb","id":485572,"avatar_url":"https://avatars2.githubusercontent.com/u/485572?v=4","gravatar_id":"","url":"https://api.github.com/users/laurentlb","html_url":"https://github.com/laurentlb","followers_url":"https://api.github.com/users/laurentlb/followers","following_url":"https://api.github.com/users/laurentlb/following{/other_user}","gists_url":"https://api.github.com/users/laurentlb/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentlb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentlb/subscriptions","organizations_url":"https://api.github.com/users/laurentlb/orgs","repos_url":"https://api.github.com/users/laurentlb/repos","events_url":"https://api.github.com/users/laurentlb/events{/privacy}","received_events_url":"https://api.github.com/users/laurentlb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/laurentlb/skylark","description":"Skylark in Go: the Skylark configuration language, implemented in Go","fork":true,"url":"https://api.github.com/repos/laurentlb/skylark","forks_url":"https://api.github.com/repos/laurentlb/skylark/forks","keys_url":"https://api.github.com/repos/laurentlb/skylark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laurentlb/skylark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laurentlb/skylark/teams","hooks_url":"https://api.github.com/repos/laurentlb/skylark/hooks","issue_events_url":"https://api.github.com/repos/laurentlb/skylark/issues/events{/number}","events_url":"https://api.github.com/repos/laurentlb/skylark/events","assignees_url":"https://api.github.com/repos/laurentlb/skylark/assignees{/user}","branches_url":"https://api.github.com/repos/laurentlb/skylark/branches{/branch}","tags_url":"https://api.github.com/repos/laurentlb/skylark/tags","blobs_url":"https://api.github.com/repos/laurentlb/skylark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laurentlb/skylark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laurentlb/skylark/git/refs{/sha}","trees_url":"https://api.github.com/repos/laurentlb/skylark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laurentlb/skylark/statuses/{sha}","languages_url":"https://api.github.com/repos/laurentlb/skylark/languages","stargazers_url":"https://api.github.com/repos/laurentlb/skylark/stargazers","contributors_url":"https://api.github.com/repos/laurentlb/skylark/contributors","subscribers_url":"https://api.github.com/repos/laurentlb/skylark/subscribers","subscription_url":"https://api.github.com/repos/laurentlb/skylark/subscription","commits_url":"https://api.github.com/repos/laurentlb/skylark/commits{/sha}","git_commits_url":"https://api.github.com/repos/laurentlb/skylark/git/commits{/sha}","comments_url":"https://api.github.com/repos/laurentlb/skylark/comments{/number}","issue_comment_url":"https://api.github.com/repos/laurentlb/skylark/issues/comments{/number}","contents_url":"https://api.github.com/repos/laurentlb/skylark/contents/{+path}","compare_url":"https://api.github.com/repos/laurentlb/skylark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laurentlb/skylark/merges","archive_url":"https://api.github.com/repos/laurentlb/skylark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laurentlb/skylark/downloads","issues_url":"https://api.github.com/repos/laurentlb/skylark/issues{/number}","pulls_url":"https://api.github.com/repos/laurentlb/skylark/pulls{/number}","milestones_url":"https://api.github.com/repos/laurentlb/skylark/milestones{/number}","notifications_url":"https://api.github.com/repos/laurentlb/skylark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laurentlb/skylark/labels{/name}","releases_url":"https://api.github.com/repos/laurentlb/skylark/releases{/id}","deployments_url":"https://api.github.com/repos/laurentlb/skylark/deployments","created_at":"2018-02-09T16:42:42Z","updated_at":"2018-02-09T16:42:44Z","pushed_at":"2018-02-20T19:05:00Z","git_url":"git://github.com/laurentlb/skylark.git","ssh_url":"git@github.com:laurentlb/skylark.git","clone_url":"https://github.com/laurentlb/skylark.git","svn_url":"https://github.com/laurentlb/skylark","homepage":"","size":1715,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"a0e5de7e63b47e716cca7226662a4c95d47bf873","user":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":105541516,"name":"skylark","full_name":"google/skylark","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/skylark","description":"Skylark in Go: the Skylark configuration language, implemented in Go","fork":false,"url":"https://api.github.com/repos/google/skylark","forks_url":"https://api.github.com/repos/google/skylark/forks","keys_url":"https://api.github.com/repos/google/skylark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/skylark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/skylark/teams","hooks_url":"https://api.github.com/repos/google/skylark/hooks","issue_events_url":"https://api.github.com/repos/google/skylark/issues/events{/number}","events_url":"https://api.github.com/repos/google/skylark/events","assignees_url":"https://api.github.com/repos/google/skylark/assignees{/user}","branches_url":"https://api.github.com/repos/google/skylark/branches{/branch}","tags_url":"https://api.github.com/repos/google/skylark/tags","blobs_url":"https://api.github.com/repos/google/skylark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/skylark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/skylark/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/skylark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/skylark/statuses/{sha}","languages_url":"https://api.github.com/repos/google/skylark/languages","stargazers_url":"https://api.github.com/repos/google/skylark/stargazers","contributors_url":"https://api.github.com/repos/google/skylark/contributors","subscribers_url":"https://api.github.com/repos/google/skylark/subscribers","subscription_url":"https://api.github.com/repos/google/skylark/subscription","commits_url":"https://api.github.com/repos/google/skylark/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/skylark/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/skylark/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/skylark/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/skylark/contents/{+path}","compare_url":"https://api.github.com/repos/google/skylark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/skylark/merges","archive_url":"https://api.github.com/repos/google/skylark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/skylark/downloads","issues_url":"https://api.github.com/repos/google/skylark/issues{/number}","pulls_url":"https://api.github.com/repos/google/skylark/pulls{/number}","milestones_url":"https://api.github.com/repos/google/skylark/milestones{/number}","notifications_url":"https://api.github.com/repos/google/skylark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/skylark/labels{/name}","releases_url":"https://api.github.com/repos/google/skylark/releases{/id}","deployments_url":"https://api.github.com/repos/google/skylark/deployments","created_at":"2017-10-02T14:05:01Z","updated_at":"2018-02-20T12:07:24Z","pushed_at":"2018-02-20T19:05:02Z","git_url":"git://github.com/google/skylark.git","ssh_url":"git@github.com:google/skylark.git","clone_url":"https://github.com/google/skylark.git","svn_url":"https://github.com/google/skylark","homepage":"","size":1633,"stargazers_count":924,"watchers_count":924,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":52,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":52,"open_issues":11,"watchers":924,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/skylark/pulls/64"},"html":{"href":"https://github.com/google/skylark/pull/64"},"issue":{"href":"https://api.github.com/repos/google/skylark/issues/64"},"comments":{"href":"https://api.github.com/repos/google/skylark/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/google/skylark/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/google/skylark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/skylark/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/google/skylark/statuses/c3d71547acce7c341ff8b24bc94a633fbee695b4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alandonovan"}}