{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/comments/233537211","pull_request_review_id":174974820,"id":233537211,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzUzNzIxMQ==","diff_hunk":"@@ -44,24 +44,34 @@\n \t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n \tOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n+/**\n+ * @author Christian <c@ethdev.com>\n+ * @date 2014\n+ * Solidity scanner.\n+ */\n \n #pragma once\n \n+#include <cstdint>\n #include <string>\n #include <tuple>\n \n-namespace dev\n-{\n-namespace solidity\n-{\n+namespace langutil {\n \n+/**\n+ * Unidirectional stream of characters.","path":"liblangutil/CharStream.h","position":62,"original_position":23,"commit_id":"516bdd77febaaa2748d467bea0cd5886ab0a6828","original_commit_id":"7d7ecb2d25ab0fbbfbe86be19591490e547d2de6","user":{"login":"chriseth","id":9073706,"node_id":"MDQ6VXNlcjkwNzM3MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/9073706?v=4","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"body":"It actually is bidirectional.","created_at":"2018-11-14T17:07:10Z","updated_at":"2018-11-14T17:07:10Z","html_url":"https://github.com/ethereum/solidity/pull/5427#discussion_r233537211","pull_request_url":"https://api.github.com/repos/ethereum/solidity/pulls/5427","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments/233537211"},"html":{"href":"https://github.com/ethereum/solidity/pull/5427#discussion_r233537211"},"pull_request":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/5427"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/5427","id":230896035,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwODk2MDM1","html_url":"https://github.com/ethereum/solidity/pull/5427","diff_url":"https://github.com/ethereum/solidity/pull/5427.diff","patch_url":"https://github.com/ethereum/solidity/pull/5427.patch","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/5427","number":5427,"state":"open","locked":false,"title":"factor out <langutil>, a new [static] library that is shared","user":{"login":"christianparpart","id":56763,"node_id":"MDQ6VXNlcjU2NzYz","avatar_url":"https://avatars1.githubusercontent.com/u/56763?v=4","gravatar_id":"","url":"https://api.github.com/users/christianparpart","html_url":"https://github.com/christianparpart","followers_url":"https://api.github.com/users/christianparpart/followers","following_url":"https://api.github.com/users/christianparpart/following{/other_user}","gists_url":"https://api.github.com/users/christianparpart/gists{/gist_id}","starred_url":"https://api.github.com/users/christianparpart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christianparpart/subscriptions","organizations_url":"https://api.github.com/users/christianparpart/orgs","repos_url":"https://api.github.com/users/christianparpart/repos","events_url":"https://api.github.com/users/christianparpart/events{/privacy}","received_events_url":"https://api.github.com/users/christianparpart/received_events","type":"User","site_admin":false},"body":"Factor out <langutil>, a new [static] library that is shared between libsolidity (solidity language frontend) and future libyul (YUL language frontend)\r\n\r\nThe motivation behind this is to eliminate circular dependencies in our build system and end up also having a standalone libyul static library (PR following this one).\r\n\r\n**NOTE:** This is a recreation of PR #5381 that performs the changes incrementally:\r\n1.  Isolating the files into its own directory (`liblangutil/`)\r\n2. Splitting out new files (for `CharStream` API)\r\n3. Introducing namespace `langutil`\r\n4. Making the new directory its own modular static library.\r\n\r\nThis PR is also a prerequisite for the #5399 (libyul as static library, eliminating circular dependencies)\r\n\r\n## CHANGES (AND THOUGHTS)\r\n\r\n* moved general purpose language frontend files out of libsolidity/\r\n* **also** moved Scanner and Token, as they're both shared between Solidity and Yul (for now), can be generalized (maybe later, not now)\r\n* introduced new namespace `langutil` and put all underneath it, adapting the users of them\r\n* also added `EVMVersion` out (as it is shared); however, that one should have a namespace such as `eth`  or `evm` as it's actually about the EVM here (could be more appropriate in another folder, but I didn't wanna overdo it here).\r\n* Extracted CharSource into its own header/impl file, with the future vision of potentially having one lexer/token API per language (solidity, yul,) that could share this API in order allow transition from one recognizer to another (forth and back).\r\n","created_at":"2018-11-14T16:20:52Z","updated_at":"2018-11-14T17:07:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b833e3f2b491df8c31c5452b70dfae6fb22fbfa5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"axic","id":20340,"node_id":"MDQ6VXNlcjIwMzQw","avatar_url":"https://avatars3.githubusercontent.com/u/20340?v=4","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},{"login":"leonardoalt","id":504195,"node_id":"MDQ6VXNlcjUwNDE5NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/504195?v=4","gravatar_id":"","url":"https://api.github.com/users/leonardoalt","html_url":"https://github.com/leonardoalt","followers_url":"https://api.github.com/users/leonardoalt/followers","following_url":"https://api.github.com/users/leonardoalt/following{/other_user}","gists_url":"https://api.github.com/users/leonardoalt/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardoalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardoalt/subscriptions","organizations_url":"https://api.github.com/users/leonardoalt/orgs","repos_url":"https://api.github.com/users/leonardoalt/repos","events_url":"https://api.github.com/users/leonardoalt/events{/privacy}","received_events_url":"https://api.github.com/users/leonardoalt/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/solidity/pulls/5427/commits","review_comments_url":"https://api.github.com/repos/ethereum/solidity/pulls/5427/comments","review_comment_url":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/5427/comments","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/516bdd77febaaa2748d467bea0cd5886ab0a6828","head":{"label":"ethereum:liblangutil","ref":"liblangutil","sha":"516bdd77febaaa2748d467bea0cd5886ab0a6828","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"node_id":"MDEwOlJlcG9zaXRvcnk0MDg5MjgxNw==","name":"solidity","full_name":"ethereum/solidity","private":false,"owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ethereum/solidity","description":"Solidity, the Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2018-11-14T16:26:36Z","pushed_at":"2018-11-14T17:04:04Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"https://solidity.readthedocs.io","size":24505,"stargazers_count":6291,"watchers_count":6291,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1687,"mirror_url":null,"archived":false,"open_issues_count":647,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1687,"open_issues":647,"watchers":6291,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"88fbd315bc09ad0e2cf9377082b8090738657546","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"node_id":"MDEwOlJlcG9zaXRvcnk0MDg5MjgxNw==","name":"solidity","full_name":"ethereum/solidity","private":false,"owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ethereum/solidity","description":"Solidity, the Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2018-11-14T16:26:36Z","pushed_at":"2018-11-14T17:04:04Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"https://solidity.readthedocs.io","size":24505,"stargazers_count":6291,"watchers_count":6291,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1687,"mirror_url":null,"archived":false,"open_issues_count":647,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1687,"open_issues":647,"watchers":6291,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/5427"},"html":{"href":"https://github.com/ethereum/solidity/pull/5427"},"issue":{"href":"https://api.github.com/repos/ethereum/solidity/issues/5427"},"comments":{"href":"https://api.github.com/repos/ethereum/solidity/issues/5427/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/5427/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/5427/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/solidity/statuses/516bdd77febaaa2748d467bea0cd5886ab0a6828"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chriseth"}}