{"action":"created","issue":{"url":"https://api.github.com/repos/ConsenSys/solidity-parser/issues/13","repository_url":"https://api.github.com/repos/ConsenSys/solidity-parser","labels_url":"https://api.github.com/repos/ConsenSys/solidity-parser/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ConsenSys/solidity-parser/issues/13/comments","events_url":"https://api.github.com/repos/ConsenSys/solidity-parser/issues/13/events","html_url":"https://github.com/ConsenSys/solidity-parser/issues/13","id":179014564,"number":13,"title":"Allow Version Pragma Statements","user":{"login":"duaraghav8","id":12758282,"avatar_url":"https://avatars.githubusercontent.com/u/12758282?v=3","gravatar_id":"","url":"https://api.github.com/users/duaraghav8","html_url":"https://github.com/duaraghav8","followers_url":"https://api.github.com/users/duaraghav8/followers","following_url":"https://api.github.com/users/duaraghav8/following{/other_user}","gists_url":"https://api.github.com/users/duaraghav8/gists{/gist_id}","starred_url":"https://api.github.com/users/duaraghav8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duaraghav8/subscriptions","organizations_url":"https://api.github.com/users/duaraghav8/orgs","repos_url":"https://api.github.com/users/duaraghav8/repos","events_url":"https://api.github.com/users/duaraghav8/events{/privacy}","received_events_url":"https://api.github.com/users/duaraghav8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-24T06:25:32Z","updated_at":"2016-10-10T18:01:07Z","closed_at":null,"body":"There's a new feature in Solidity - [pragma statements](https://solidity.readthedocs.io/en/develop/layout-of-source-files.html#version-pragma)\r\n\r\nThe statement looks like:\r\n```\r\npragma solidity ^0.4.0;\r\n```\r\n\r\nProposed AST Node for the above:\r\n```js\r\n{\r\n\ttype: 'PragmaStatement',\r\n\tversion: '0.4.0',\r\n\tupward_compatible: false,\r\n\tstart: <START_OFFSET>,\r\n\tend: start: <END_OFFSET>\r\n}\r\n```\r\n\r\n```upward_compatible``` is false because of the presence of the cap '^' (as mentioned in the doc) which means the contract is not even compatible with v0.5.0 for example.\r\n\r\nIt will be true if no cap is set, like:\r\n\r\n ```\r\npragma solidity 0.4.0;\r\n```\r\n```js\r\n{\r\n\ttype: 'PragmaStatement',\r\n\tversion: '0.4.0',\r\n\tupward_compatible: true,\r\n\tstart: <START_OFFSET>,\r\n\tend: start: <END_OFFSET>\r\n}\r\n```\r\n\r\n@tcoulter thoughts?"},"comment":{"url":"https://api.github.com/repos/ConsenSys/solidity-parser/issues/comments/252694946","html_url":"https://github.com/ConsenSys/solidity-parser/issues/13#issuecomment-252694946","issue_url":"https://api.github.com/repos/ConsenSys/solidity-parser/issues/13","id":252694946,"user":{"login":"tcoulter","id":92629,"avatar_url":"https://avatars.githubusercontent.com/u/92629?v=3","gravatar_id":"","url":"https://api.github.com/users/tcoulter","html_url":"https://github.com/tcoulter","followers_url":"https://api.github.com/users/tcoulter/followers","following_url":"https://api.github.com/users/tcoulter/following{/other_user}","gists_url":"https://api.github.com/users/tcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/tcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcoulter/subscriptions","organizations_url":"https://api.github.com/users/tcoulter/orgs","repos_url":"https://api.github.com/users/tcoulter/repos","events_url":"https://api.github.com/users/tcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/tcoulter/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T18:01:07Z","updated_at":"2016-10-10T18:01:07Z","body":"Thanks @duaraghav8! I'll take a look and see what I can do.\r\n\r\nAs far as Truffle is concerned, I'm going to do the bare minimum to get people compiling on 0.4.x, as there's there's huge interest there. We can patch things up later.\r\n\r\nRegarding this statement:\r\n\r\n> it requires us to fully understand how NPM versioning works and then write the parseing code\r\n\r\nI thought it worked differently than NPM semver. Is there any documentation on how it's supposed to work?"}}
{"actor":{"display_login":"tcoulter"}}