{"action":"created","comment":{"url":"https://api.github.com/repos/servo/rust-bindgen/pulls/comments/84871698","pull_request_review_id":5620421,"id":84871698,"diff_hunk":"@@ -169,3 +165,22 @@ fn parse_int_literal_tokens(cursor: &clang::Cursor,\n         lit.parse().ok()\n     }\n }\n+\n+fn get_integer_literal_from_cursor(cursor: &clang::Cursor,\n+                                   unit: &clang::TranslationUnit) -> Option<i64> {\n+    use clangll::*;\n+    let mut value = None;\n+    cursor.visit(|c, _| {\n+        match c.kind() {\n+            CXCursor_IntegerLiteral => {\n+                value = parse_int_literal_tokens(&c, unit);\n+            }\n+            CXCursor_FirstExpr => {","path":"src/ir/var.rs","position":null,"original_position":43,"commit_id":"a608b278ed2b9b994184a011373048fa7374d02f","original_commit_id":"f15a33bfe61e109d58e0f6c184188e1a67333202","user":{"login":"emilio","id":1323194,"avatar_url":"https://avatars.githubusercontent.com/u/1323194?v=3","gravatar_id":"","url":"https://api.github.com/users/emilio","html_url":"https://github.com/emilio","followers_url":"https://api.github.com/users/emilio/followers","following_url":"https://api.github.com/users/emilio/following{/other_user}","gists_url":"https://api.github.com/users/emilio/gists{/gist_id}","starred_url":"https://api.github.com/users/emilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilio/subscriptions","organizations_url":"https://api.github.com/users/emilio/orgs","repos_url":"https://api.github.com/users/emilio/repos","events_url":"https://api.github.com/users/emilio/events{/privacy}","received_events_url":"https://api.github.com/users/emilio/received_events","type":"User","site_admin":false},"body":"Can you use `UnexposedExpr` instead? First/Last is just the way clang gives you to iterate over them.","created_at":"2016-10-25T10:18:43Z","updated_at":"2016-10-25T10:18:43Z","html_url":"https://github.com/servo/rust-bindgen/pull/126#discussion_r84871698","pull_request_url":"https://api.github.com/repos/servo/rust-bindgen/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/servo/rust-bindgen/pulls/comments/84871698"},"html":{"href":"https://github.com/servo/rust-bindgen/pull/126#discussion_r84871698"},"pull_request":{"href":"https://api.github.com/repos/servo/rust-bindgen/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/servo/rust-bindgen/pulls/126","id":90745322,"html_url":"https://github.com/servo/rust-bindgen/pull/126","diff_url":"https://github.com/servo/rust-bindgen/pull/126.diff","patch_url":"https://github.com/servo/rust-bindgen/pull/126.patch","issue_url":"https://api.github.com/repos/servo/rust-bindgen/issues/126","number":126,"state":"open","locked":false,"title":"Recognize constants with alias type","user":{"login":"upsuper","id":333750,"avatar_url":"https://avatars.githubusercontent.com/u/333750?v=3","gravatar_id":"","url":"https://api.github.com/users/upsuper","html_url":"https://github.com/upsuper","followers_url":"https://api.github.com/users/upsuper/followers","following_url":"https://api.github.com/users/upsuper/following{/other_user}","gists_url":"https://api.github.com/users/upsuper/gists{/gist_id}","starred_url":"https://api.github.com/users/upsuper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upsuper/subscriptions","organizations_url":"https://api.github.com/users/upsuper/orgs","repos_url":"https://api.github.com/users/upsuper/repos","events_url":"https://api.github.com/users/upsuper/events{/privacy}","received_events_url":"https://api.github.com/users/upsuper/received_events","type":"User","site_admin":false},"body":"This fixes #101.","created_at":"2016-10-25T06:18:38Z","updated_at":"2016-10-25T10:37:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2d7a513710b4f70397f3a2e786d96278b2d9a61","assignee":{"login":"emilio","id":1323194,"avatar_url":"https://avatars.githubusercontent.com/u/1323194?v=3","gravatar_id":"","url":"https://api.github.com/users/emilio","html_url":"https://github.com/emilio","followers_url":"https://api.github.com/users/emilio/followers","following_url":"https://api.github.com/users/emilio/following{/other_user}","gists_url":"https://api.github.com/users/emilio/gists{/gist_id}","starred_url":"https://api.github.com/users/emilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilio/subscriptions","organizations_url":"https://api.github.com/users/emilio/orgs","repos_url":"https://api.github.com/users/emilio/repos","events_url":"https://api.github.com/users/emilio/events{/privacy}","received_events_url":"https://api.github.com/users/emilio/received_events","type":"User","site_admin":false},"assignees":[{"login":"emilio","id":1323194,"avatar_url":"https://avatars.githubusercontent.com/u/1323194?v=3","gravatar_id":"","url":"https://api.github.com/users/emilio","html_url":"https://github.com/emilio","followers_url":"https://api.github.com/users/emilio/followers","following_url":"https://api.github.com/users/emilio/following{/other_user}","gists_url":"https://api.github.com/users/emilio/gists{/gist_id}","starred_url":"https://api.github.com/users/emilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilio/subscriptions","organizations_url":"https://api.github.com/users/emilio/orgs","repos_url":"https://api.github.com/users/emilio/repos","events_url":"https://api.github.com/users/emilio/events{/privacy}","received_events_url":"https://api.github.com/users/emilio/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/rust-bindgen/pulls/126/commits","review_comments_url":"https://api.github.com/repos/servo/rust-bindgen/pulls/126/comments","review_comment_url":"https://api.github.com/repos/servo/rust-bindgen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/rust-bindgen/issues/126/comments","statuses_url":"https://api.github.com/repos/servo/rust-bindgen/statuses/a608b278ed2b9b994184a011373048fa7374d02f","head":{"label":"upsuper:integer-constant","ref":"integer-constant","sha":"a608b278ed2b9b994184a011373048fa7374d02f","user":{"login":"upsuper","id":333750,"avatar_url":"https://avatars.githubusercontent.com/u/333750?v=3","gravatar_id":"","url":"https://api.github.com/users/upsuper","html_url":"https://github.com/upsuper","followers_url":"https://api.github.com/users/upsuper/followers","following_url":"https://api.github.com/users/upsuper/following{/other_user}","gists_url":"https://api.github.com/users/upsuper/gists{/gist_id}","starred_url":"https://api.github.com/users/upsuper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upsuper/subscriptions","organizations_url":"https://api.github.com/users/upsuper/orgs","repos_url":"https://api.github.com/users/upsuper/repos","events_url":"https://api.github.com/users/upsuper/events{/privacy}","received_events_url":"https://api.github.com/users/upsuper/received_events","type":"User","site_admin":false},"repo":{"id":63572530,"name":"rust-bindgen","full_name":"upsuper/rust-bindgen","owner":{"login":"upsuper","id":333750,"avatar_url":"https://avatars.githubusercontent.com/u/333750?v=3","gravatar_id":"","url":"https://api.github.com/users/upsuper","html_url":"https://github.com/upsuper","followers_url":"https://api.github.com/users/upsuper/followers","following_url":"https://api.github.com/users/upsuper/following{/other_user}","gists_url":"https://api.github.com/users/upsuper/gists{/gist_id}","starred_url":"https://api.github.com/users/upsuper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upsuper/subscriptions","organizations_url":"https://api.github.com/users/upsuper/orgs","repos_url":"https://api.github.com/users/upsuper/repos","events_url":"https://api.github.com/users/upsuper/events{/privacy}","received_events_url":"https://api.github.com/users/upsuper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/upsuper/rust-bindgen","description":"binding generator for rust language","fork":true,"url":"https://api.github.com/repos/upsuper/rust-bindgen","forks_url":"https://api.github.com/repos/upsuper/rust-bindgen/forks","keys_url":"https://api.github.com/repos/upsuper/rust-bindgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/upsuper/rust-bindgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/upsuper/rust-bindgen/teams","hooks_url":"https://api.github.com/repos/upsuper/rust-bindgen/hooks","issue_events_url":"https://api.github.com/repos/upsuper/rust-bindgen/issues/events{/number}","events_url":"https://api.github.com/repos/upsuper/rust-bindgen/events","assignees_url":"https://api.github.com/repos/upsuper/rust-bindgen/assignees{/user}","branches_url":"https://api.github.com/repos/upsuper/rust-bindgen/branches{/branch}","tags_url":"https://api.github.com/repos/upsuper/rust-bindgen/tags","blobs_url":"https://api.github.com/repos/upsuper/rust-bindgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/upsuper/rust-bindgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/upsuper/rust-bindgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/upsuper/rust-bindgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/upsuper/rust-bindgen/statuses/{sha}","languages_url":"https://api.github.com/repos/upsuper/rust-bindgen/languages","stargazers_url":"https://api.github.com/repos/upsuper/rust-bindgen/stargazers","contributors_url":"https://api.github.com/repos/upsuper/rust-bindgen/contributors","subscribers_url":"https://api.github.com/repos/upsuper/rust-bindgen/subscribers","subscription_url":"https://api.github.com/repos/upsuper/rust-bindgen/subscription","commits_url":"https://api.github.com/repos/upsuper/rust-bindgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/upsuper/rust-bindgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/upsuper/rust-bindgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/upsuper/rust-bindgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/upsuper/rust-bindgen/contents/{+path}","compare_url":"https://api.github.com/repos/upsuper/rust-bindgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/upsuper/rust-bindgen/merges","archive_url":"https://api.github.com/repos/upsuper/rust-bindgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/upsuper/rust-bindgen/downloads","issues_url":"https://api.github.com/repos/upsuper/rust-bindgen/issues{/number}","pulls_url":"https://api.github.com/repos/upsuper/rust-bindgen/pulls{/number}","milestones_url":"https://api.github.com/repos/upsuper/rust-bindgen/milestones{/number}","notifications_url":"https://api.github.com/repos/upsuper/rust-bindgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/upsuper/rust-bindgen/labels{/name}","releases_url":"https://api.github.com/repos/upsuper/rust-bindgen/releases{/id}","deployments_url":"https://api.github.com/repos/upsuper/rust-bindgen/deployments","created_at":"2016-07-18T05:21:41Z","updated_at":"2016-07-18T05:21:42Z","pushed_at":"2016-10-25T10:07:17Z","git_url":"git://github.com/upsuper/rust-bindgen.git","ssh_url":"git@github.com:upsuper/rust-bindgen.git","clone_url":"https://github.com/upsuper/rust-bindgen.git","svn_url":"https://github.com/upsuper/rust-bindgen","homepage":"","size":7409,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"e06aab1271978a8005ab84a4296acd7f357b9755","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":61728459,"name":"rust-bindgen","full_name":"servo/rust-bindgen","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/rust-bindgen","description":"binding generator for rust language","fork":true,"url":"https://api.github.com/repos/servo/rust-bindgen","forks_url":"https://api.github.com/repos/servo/rust-bindgen/forks","keys_url":"https://api.github.com/repos/servo/rust-bindgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/rust-bindgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/rust-bindgen/teams","hooks_url":"https://api.github.com/repos/servo/rust-bindgen/hooks","issue_events_url":"https://api.github.com/repos/servo/rust-bindgen/issues/events{/number}","events_url":"https://api.github.com/repos/servo/rust-bindgen/events","assignees_url":"https://api.github.com/repos/servo/rust-bindgen/assignees{/user}","branches_url":"https://api.github.com/repos/servo/rust-bindgen/branches{/branch}","tags_url":"https://api.github.com/repos/servo/rust-bindgen/tags","blobs_url":"https://api.github.com/repos/servo/rust-bindgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/rust-bindgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/rust-bindgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/rust-bindgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/rust-bindgen/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/rust-bindgen/languages","stargazers_url":"https://api.github.com/repos/servo/rust-bindgen/stargazers","contributors_url":"https://api.github.com/repos/servo/rust-bindgen/contributors","subscribers_url":"https://api.github.com/repos/servo/rust-bindgen/subscribers","subscription_url":"https://api.github.com/repos/servo/rust-bindgen/subscription","commits_url":"https://api.github.com/repos/servo/rust-bindgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/rust-bindgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/rust-bindgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/rust-bindgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/rust-bindgen/contents/{+path}","compare_url":"https://api.github.com/repos/servo/rust-bindgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/rust-bindgen/merges","archive_url":"https://api.github.com/repos/servo/rust-bindgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/rust-bindgen/downloads","issues_url":"https://api.github.com/repos/servo/rust-bindgen/issues{/number}","pulls_url":"https://api.github.com/repos/servo/rust-bindgen/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/rust-bindgen/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/rust-bindgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/rust-bindgen/labels{/name}","releases_url":"https://api.github.com/repos/servo/rust-bindgen/releases{/id}","deployments_url":"https://api.github.com/repos/servo/rust-bindgen/deployments","created_at":"2016-06-22T15:05:51Z","updated_at":"2016-10-23T11:05:22Z","pushed_at":"2016-10-25T10:07:18Z","git_url":"git://github.com/servo/rust-bindgen.git","ssh_url":"git@github.com:servo/rust-bindgen.git","clone_url":"https://github.com/servo/rust-bindgen.git","svn_url":"https://github.com/servo/rust-bindgen","homepage":"","size":7434,"stargazers_count":19,"watchers_count":19,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":38,"forks":12,"open_issues":38,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/rust-bindgen/pulls/126"},"html":{"href":"https://github.com/servo/rust-bindgen/pull/126"},"issue":{"href":"https://api.github.com/repos/servo/rust-bindgen/issues/126"},"comments":{"href":"https://api.github.com/repos/servo/rust-bindgen/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/rust-bindgen/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/rust-bindgen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/rust-bindgen/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/servo/rust-bindgen/statuses/a608b278ed2b9b994184a011373048fa7374d02f"}}}}
{"actor":{"display_login":"emilio"}}