{"action":"created","comment":{"url":"https://api.github.com/repos/cksac/graphql-rs/pulls/comments/57532000","id":57532000,"diff_hunk":"@@ -0,0 +1,363 @@\n+#![allow(dead_code, unused_variables)]\n+use ast::*;\n+use lexer::Punctuator::*;\n+use lexer::Token::{\n+  Eof,\n+  Punctuator,\n+  Name as TokenName,\n+  IntValue as TokenInt,\n+  FloatValue as TokenFloat,\n+  StringValue as TokenString,\n+};\n+use lexer::{Lexer, Token};\n+use source::Source;\n+use std::iter::Peekable;\n+\n+pub type Res<'a, T> = Result<T, &'a str>;\n+pub type DRes<'a, T> = Res<'a, (T, usize)>;\n+\n+pub struct Parser<'a> {\n+  lexer: Peekable<Lexer<'a>>,\n+  source: Source<'a>,\n+}\n+\n+impl<'a> Parser<'a> {\n+  pub fn new(src: Source<'a>) -> Self {","path":"graphql-language/src/parser.rs","position":25,"original_position":25,"commit_id":"104c679498213037b3afc33e2a10bb3a08e991b1","original_commit_id":"f2c2802bd9e31b2eca725b868f9cea3aa4b90f44","user":{"login":"calebmer","id":8282507,"avatar_url":"https://avatars.githubusercontent.com/u/8282507?v=3","gravatar_id":"","url":"https://api.github.com/users/calebmer","html_url":"https://github.com/calebmer","followers_url":"https://api.github.com/users/calebmer/followers","following_url":"https://api.github.com/users/calebmer/following{/other_user}","gists_url":"https://api.github.com/users/calebmer/gists{/gist_id}","starred_url":"https://api.github.com/users/calebmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebmer/subscriptions","organizations_url":"https://api.github.com/users/calebmer/orgs","repos_url":"https://api.github.com/users/calebmer/repos","events_url":"https://api.github.com/users/calebmer/events{/privacy}","received_events_url":"https://api.github.com/users/calebmer/received_events","type":"User","site_admin":false},"body":"I think we should prefer `&mut self`, it feels more idiomatic, especially if we want to move all state into `Parser`. Also it has the advantage of putting all the docs for these methods on a single page. \r\n\r\nDoes clippy not give a warning for `&mut Parser`?","created_at":"2016-03-27T17:25:06Z","updated_at":"2016-03-27T17:25:06Z","html_url":"https://github.com/cksac/graphql-rs/pull/15#discussion_r57532000","pull_request_url":"https://api.github.com/repos/cksac/graphql-rs/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/cksac/graphql-rs/pulls/comments/57532000"},"html":{"href":"https://github.com/cksac/graphql-rs/pull/15#discussion_r57532000"},"pull_request":{"href":"https://api.github.com/repos/cksac/graphql-rs/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/cksac/graphql-rs/pulls/15","id":64254327,"html_url":"https://github.com/cksac/graphql-rs/pull/15","diff_url":"https://github.com/cksac/graphql-rs/pull/15.diff","patch_url":"https://github.com/cksac/graphql-rs/pull/15.patch","issue_url":"https://api.github.com/repos/cksac/graphql-rs/issues/15","number":15,"state":"open","locked":false,"title":"parser!","user":{"login":"svmnotn","id":12618337,"avatar_url":"https://avatars.githubusercontent.com/u/12618337?v=3","gravatar_id":"","url":"https://api.github.com/users/svmnotn","html_url":"https://github.com/svmnotn","followers_url":"https://api.github.com/users/svmnotn/followers","following_url":"https://api.github.com/users/svmnotn/following{/other_user}","gists_url":"https://api.github.com/users/svmnotn/gists{/gist_id}","starred_url":"https://api.github.com/users/svmnotn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmnotn/subscriptions","organizations_url":"https://api.github.com/users/svmnotn/orgs","repos_url":"https://api.github.com/users/svmnotn/repos","events_url":"https://api.github.com/users/svmnotn/events{/privacy}","received_events_url":"https://api.github.com/users/svmnotn/received_events","type":"User","site_admin":false},"body":"Still not done, but I think I'm taking a tad too long on this, so I'm releasing what I have for review.\r\n\r\nPlease review with the knowledge that this is an ***_unfinished_*** PR. Also, the errors will happen after the parser has no more `unimplemented!`s, until then `unwrap()` _everywhere_.","created_at":"2016-03-27T01:25:58Z","updated_at":"2016-03-27T17:25:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6175bcced8516f8fdac14311fde1ec4c100eb059","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cksac/graphql-rs/pulls/15/commits","review_comments_url":"https://api.github.com/repos/cksac/graphql-rs/pulls/15/comments","review_comment_url":"https://api.github.com/repos/cksac/graphql-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cksac/graphql-rs/issues/15/comments","statuses_url":"https://api.github.com/repos/cksac/graphql-rs/statuses/104c679498213037b3afc33e2a10bb3a08e991b1","head":{"label":"svmnotn:feature/parser","ref":"feature/parser","sha":"104c679498213037b3afc33e2a10bb3a08e991b1","user":{"login":"svmnotn","id":12618337,"avatar_url":"https://avatars.githubusercontent.com/u/12618337?v=3","gravatar_id":"","url":"https://api.github.com/users/svmnotn","html_url":"https://github.com/svmnotn","followers_url":"https://api.github.com/users/svmnotn/followers","following_url":"https://api.github.com/users/svmnotn/following{/other_user}","gists_url":"https://api.github.com/users/svmnotn/gists{/gist_id}","starred_url":"https://api.github.com/users/svmnotn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmnotn/subscriptions","organizations_url":"https://api.github.com/users/svmnotn/orgs","repos_url":"https://api.github.com/users/svmnotn/repos","events_url":"https://api.github.com/users/svmnotn/events{/privacy}","received_events_url":"https://api.github.com/users/svmnotn/received_events","type":"User","site_admin":false},"repo":{"id":54282619,"name":"graphql-rs","full_name":"svmnotn/graphql-rs","owner":{"login":"svmnotn","id":12618337,"avatar_url":"https://avatars.githubusercontent.com/u/12618337?v=3","gravatar_id":"","url":"https://api.github.com/users/svmnotn","html_url":"https://github.com/svmnotn","followers_url":"https://api.github.com/users/svmnotn/followers","following_url":"https://api.github.com/users/svmnotn/following{/other_user}","gists_url":"https://api.github.com/users/svmnotn/gists{/gist_id}","starred_url":"https://api.github.com/users/svmnotn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmnotn/subscriptions","organizations_url":"https://api.github.com/users/svmnotn/orgs","repos_url":"https://api.github.com/users/svmnotn/repos","events_url":"https://api.github.com/users/svmnotn/events{/privacy}","received_events_url":"https://api.github.com/users/svmnotn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/svmnotn/graphql-rs","description":"A implementation of GraphQL for Rust","fork":true,"url":"https://api.github.com/repos/svmnotn/graphql-rs","forks_url":"https://api.github.com/repos/svmnotn/graphql-rs/forks","keys_url":"https://api.github.com/repos/svmnotn/graphql-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svmnotn/graphql-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svmnotn/graphql-rs/teams","hooks_url":"https://api.github.com/repos/svmnotn/graphql-rs/hooks","issue_events_url":"https://api.github.com/repos/svmnotn/graphql-rs/issues/events{/number}","events_url":"https://api.github.com/repos/svmnotn/graphql-rs/events","assignees_url":"https://api.github.com/repos/svmnotn/graphql-rs/assignees{/user}","branches_url":"https://api.github.com/repos/svmnotn/graphql-rs/branches{/branch}","tags_url":"https://api.github.com/repos/svmnotn/graphql-rs/tags","blobs_url":"https://api.github.com/repos/svmnotn/graphql-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svmnotn/graphql-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svmnotn/graphql-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/svmnotn/graphql-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svmnotn/graphql-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/svmnotn/graphql-rs/languages","stargazers_url":"https://api.github.com/repos/svmnotn/graphql-rs/stargazers","contributors_url":"https://api.github.com/repos/svmnotn/graphql-rs/contributors","subscribers_url":"https://api.github.com/repos/svmnotn/graphql-rs/subscribers","subscription_url":"https://api.github.com/repos/svmnotn/graphql-rs/subscription","commits_url":"https://api.github.com/repos/svmnotn/graphql-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/svmnotn/graphql-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/svmnotn/graphql-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/svmnotn/graphql-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/svmnotn/graphql-rs/contents/{+path}","compare_url":"https://api.github.com/repos/svmnotn/graphql-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svmnotn/graphql-rs/merges","archive_url":"https://api.github.com/repos/svmnotn/graphql-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svmnotn/graphql-rs/downloads","issues_url":"https://api.github.com/repos/svmnotn/graphql-rs/issues{/number}","pulls_url":"https://api.github.com/repos/svmnotn/graphql-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/svmnotn/graphql-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/svmnotn/graphql-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svmnotn/graphql-rs/labels{/name}","releases_url":"https://api.github.com/repos/svmnotn/graphql-rs/releases{/id}","deployments_url":"https://api.github.com/repos/svmnotn/graphql-rs/deployments","created_at":"2016-03-19T19:09:21Z","updated_at":"2016-03-19T19:09:22Z","pushed_at":"2016-03-27T01:23:13Z","git_url":"git://github.com/svmnotn/graphql-rs.git","ssh_url":"git@github.com:svmnotn/graphql-rs.git","clone_url":"https://github.com/svmnotn/graphql-rs.git","svn_url":"https://github.com/svmnotn/graphql-rs","homepage":null,"size":50,"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":"cksac:master","ref":"master","sha":"a2ca08d203c416a8fdd6e277a8c4385c39868ed6","user":{"login":"cksac","id":147393,"avatar_url":"https://avatars.githubusercontent.com/u/147393?v=3","gravatar_id":"","url":"https://api.github.com/users/cksac","html_url":"https://github.com/cksac","followers_url":"https://api.github.com/users/cksac/followers","following_url":"https://api.github.com/users/cksac/following{/other_user}","gists_url":"https://api.github.com/users/cksac/gists{/gist_id}","starred_url":"https://api.github.com/users/cksac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cksac/subscriptions","organizations_url":"https://api.github.com/users/cksac/orgs","repos_url":"https://api.github.com/users/cksac/repos","events_url":"https://api.github.com/users/cksac/events{/privacy}","received_events_url":"https://api.github.com/users/cksac/received_events","type":"User","site_admin":false},"repo":{"id":53198216,"name":"graphql-rs","full_name":"cksac/graphql-rs","owner":{"login":"cksac","id":147393,"avatar_url":"https://avatars.githubusercontent.com/u/147393?v=3","gravatar_id":"","url":"https://api.github.com/users/cksac","html_url":"https://github.com/cksac","followers_url":"https://api.github.com/users/cksac/followers","following_url":"https://api.github.com/users/cksac/following{/other_user}","gists_url":"https://api.github.com/users/cksac/gists{/gist_id}","starred_url":"https://api.github.com/users/cksac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cksac/subscriptions","organizations_url":"https://api.github.com/users/cksac/orgs","repos_url":"https://api.github.com/users/cksac/repos","events_url":"https://api.github.com/users/cksac/events{/privacy}","received_events_url":"https://api.github.com/users/cksac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cksac/graphql-rs","description":"A implementation of GraphQL for Rust","fork":false,"url":"https://api.github.com/repos/cksac/graphql-rs","forks_url":"https://api.github.com/repos/cksac/graphql-rs/forks","keys_url":"https://api.github.com/repos/cksac/graphql-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cksac/graphql-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cksac/graphql-rs/teams","hooks_url":"https://api.github.com/repos/cksac/graphql-rs/hooks","issue_events_url":"https://api.github.com/repos/cksac/graphql-rs/issues/events{/number}","events_url":"https://api.github.com/repos/cksac/graphql-rs/events","assignees_url":"https://api.github.com/repos/cksac/graphql-rs/assignees{/user}","branches_url":"https://api.github.com/repos/cksac/graphql-rs/branches{/branch}","tags_url":"https://api.github.com/repos/cksac/graphql-rs/tags","blobs_url":"https://api.github.com/repos/cksac/graphql-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cksac/graphql-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cksac/graphql-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cksac/graphql-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cksac/graphql-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/cksac/graphql-rs/languages","stargazers_url":"https://api.github.com/repos/cksac/graphql-rs/stargazers","contributors_url":"https://api.github.com/repos/cksac/graphql-rs/contributors","subscribers_url":"https://api.github.com/repos/cksac/graphql-rs/subscribers","subscription_url":"https://api.github.com/repos/cksac/graphql-rs/subscription","commits_url":"https://api.github.com/repos/cksac/graphql-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cksac/graphql-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cksac/graphql-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cksac/graphql-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cksac/graphql-rs/contents/{+path}","compare_url":"https://api.github.com/repos/cksac/graphql-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cksac/graphql-rs/merges","archive_url":"https://api.github.com/repos/cksac/graphql-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cksac/graphql-rs/downloads","issues_url":"https://api.github.com/repos/cksac/graphql-rs/issues{/number}","pulls_url":"https://api.github.com/repos/cksac/graphql-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/cksac/graphql-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/cksac/graphql-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cksac/graphql-rs/labels{/name}","releases_url":"https://api.github.com/repos/cksac/graphql-rs/releases{/id}","deployments_url":"https://api.github.com/repos/cksac/graphql-rs/deployments","created_at":"2016-03-05T11:30:52Z","updated_at":"2016-03-19T18:38:55Z","pushed_at":"2016-03-27T01:25:58Z","git_url":"git://github.com/cksac/graphql-rs.git","ssh_url":"git@github.com:cksac/graphql-rs.git","clone_url":"https://github.com/cksac/graphql-rs.git","svn_url":"https://github.com/cksac/graphql-rs","homepage":null,"size":44,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cksac/graphql-rs/pulls/15"},"html":{"href":"https://github.com/cksac/graphql-rs/pull/15"},"issue":{"href":"https://api.github.com/repos/cksac/graphql-rs/issues/15"},"comments":{"href":"https://api.github.com/repos/cksac/graphql-rs/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/cksac/graphql-rs/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/cksac/graphql-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cksac/graphql-rs/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/cksac/graphql-rs/statuses/104c679498213037b3afc33e2a10bb3a08e991b1"}}}}