{"action":"created","issue":{"url":"https://api.github.com/repos/whitequark/parser/issues/316","repository_url":"https://api.github.com/repos/whitequark/parser","labels_url":"https://api.github.com/repos/whitequark/parser/issues/316/labels{/name}","comments_url":"https://api.github.com/repos/whitequark/parser/issues/316/comments","events_url":"https://api.github.com/repos/whitequark/parser/issues/316/events","html_url":"https://github.com/whitequark/parser/issues/316","id":177572178,"number":316,"title":"control flow and boolean operators produce the same AST","user":{"login":"sumangurung","id":30770,"avatar_url":"https://avatars.githubusercontent.com/u/30770?v=3","gravatar_id":"","url":"https://api.github.com/users/sumangurung","html_url":"https://github.com/sumangurung","followers_url":"https://api.github.com/users/sumangurung/followers","following_url":"https://api.github.com/users/sumangurung/following{/other_user}","gists_url":"https://api.github.com/users/sumangurung/gists{/gist_id}","starred_url":"https://api.github.com/users/sumangurung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumangurung/subscriptions","organizations_url":"https://api.github.com/users/sumangurung/orgs","repos_url":"https://api.github.com/users/sumangurung/repos","events_url":"https://api.github.com/users/sumangurung/events{/privacy}","received_events_url":"https://api.github.com/users/sumangurung/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-17T12:04:43Z","updated_at":"2016-09-17T13:34:12Z","closed_at":"2016-09-17T13:15:11Z","body":"These produce the same AST:\r\n1. && and `and`\r\n2. || and `or`\r\n\r\n```\r\nirb(main):015:0> Parser::CurrentRuby.parse('foo and bar')\r\n=> s(:and,\r\n  s(:send, nil, :foo),\r\n  s(:send, nil, :bar))\r\nirb(main):016:0> Parser::CurrentRuby.parse('foo && bar')\r\n=> s(:and,\r\n  s(:send, nil, :foo),\r\n  s(:send, nil, :bar))\r\nirb(main):017:0> Parser::CurrentRuby.parse('foo or bar')\r\n=> s(:or,\r\n  s(:send, nil, :foo),\r\n  s(:send, nil, :bar))\r\nirb(main):018:0> Parser::CurrentRuby.parse('foo || bar')\r\n=> s(:or,\r\n  s(:send, nil, :foo),\r\n  s(:send, nil, :bar))\r\n```\r\n\r\nThere are differences in these pair of operators with regards to precedence and should produce different ASTs."},"comment":{"url":"https://api.github.com/repos/whitequark/parser/issues/comments/247769947","html_url":"https://github.com/whitequark/parser/issues/316#issuecomment-247769947","issue_url":"https://api.github.com/repos/whitequark/parser/issues/316","id":247769947,"user":{"login":"sumangurung","id":30770,"avatar_url":"https://avatars.githubusercontent.com/u/30770?v=3","gravatar_id":"","url":"https://api.github.com/users/sumangurung","html_url":"https://github.com/sumangurung","followers_url":"https://api.github.com/users/sumangurung/followers","following_url":"https://api.github.com/users/sumangurung/following{/other_user}","gists_url":"https://api.github.com/users/sumangurung/gists{/gist_id}","starred_url":"https://api.github.com/users/sumangurung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumangurung/subscriptions","organizations_url":"https://api.github.com/users/sumangurung/orgs","repos_url":"https://api.github.com/users/sumangurung/repos","events_url":"https://api.github.com/users/sumangurung/events{/privacy}","received_events_url":"https://api.github.com/users/sumangurung/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T13:34:12Z","updated_at":"2016-09-17T13:34:12Z","body":"By the way, do you know of any open source projects using the parser and unparser gems? I would love to know what they are using it and how they are using it?"}}
{"actor":{"display_login":"sumangurung"}}