{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/27619918","id":27619918,"diff_hunk":"@@ -140,17 +138,16 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax\n             Dim offset = 0\n             Dim pendingWhitespace = 0\n             Dim valueBuilder = GetScratch()\n-\n-            Do While CanGet(offset)\n-\n-                Dim c = Peek(offset)\n+            Dim c, c1 As Char\n+            Do While TryPeek(offset, c)\n \n                 ' Any combination of fullwidth and ASCII curly braces of the same direction is an escaping sequence for the corresponding ASCII curly brace.\n                 ' We insert that curly brace doubled and because this is the escaping sequence understood by String.Format, that will be replaced by a single brace.\n                 ' This is deliberate design and it aligns with existing rules for double quote escaping in strings.\n+                Dim ok = TryPeek(offset+1, c1)","path":"src/Compilers/VisualBasic/Portable/Scanner/ScannerInterpolatedString.vb","position":75,"original_position":75,"commit_id":"80f22ff51fe99e9efe20cccb11ebe20b7f4e4f26","original_commit_id":"23a5f87b00be99aed1a8c909d19ac81374da9c3c","user":{"login":"AlekseyTs","id":10522107,"avatar_url":"https://avatars.githubusercontent.com/u/10522107?v=3","gravatar_id":"","url":"https://api.github.com/users/AlekseyTs","html_url":"https://github.com/AlekseyTs","followers_url":"https://api.github.com/users/AlekseyTs/followers","following_url":"https://api.github.com/users/AlekseyTs/following{/other_user}","gists_url":"https://api.github.com/users/AlekseyTs/gists{/gist_id}","starred_url":"https://api.github.com/users/AlekseyTs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlekseyTs/subscriptions","organizations_url":"https://api.github.com/users/AlekseyTs/orgs","repos_url":"https://api.github.com/users/AlekseyTs/repos","events_url":"https://api.github.com/users/AlekseyTs/events{/privacy}","received_events_url":"https://api.github.com/users/AlekseyTs/received_events","type":"User","site_admin":false},"body":"Consider inlining TryPeek(offset + 1, c1), otherwise we might call it in cases when the call is not needed.","created_at":"2015-04-01T22:53:06Z","updated_at":"2015-04-01T22:53:06Z","html_url":"https://github.com/dotnet/roslyn/pull/1463#discussion_r27619918","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1463","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/27619918"},"html":{"href":"https://github.com/dotnet/roslyn/pull/1463#discussion_r27619918"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1463"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/1463","id":31677064,"html_url":"https://github.com/dotnet/roslyn/pull/1463","diff_url":"https://github.com/dotnet/roslyn/pull/1463.diff","patch_url":"https://github.com/dotnet/roslyn/pull/1463.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/1463","number":1463,"state":"open","locked":false,"title":"Scanner(unification)","user":{"login":"AdamSpeight2008","id":900107,"avatar_url":"https://avatars.githubusercontent.com/u/900107?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamSpeight2008","html_url":"https://github.com/AdamSpeight2008","followers_url":"https://api.github.com/users/AdamSpeight2008/followers","following_url":"https://api.github.com/users/AdamSpeight2008/following{/other_user}","gists_url":"https://api.github.com/users/AdamSpeight2008/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSpeight2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSpeight2008/subscriptions","organizations_url":"https://api.github.com/users/AdamSpeight2008/orgs","repos_url":"https://api.github.com/users/AdamSpeight2008/repos","events_url":"https://api.github.com/users/AdamSpeight2008/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSpeight2008/received_events","type":"User","site_admin":false},"body":"This pull request unifies the contents of `TryScanToken` and `ScanTokenFullWidth`.\r\nI retain those methods so not the break existing calls to them. The internals now call a common implementation method `ScanTokenCommon`.\r\n\r\nThis reduces the size of the sourcecode and the resulting IL (Debug)\r\n```\r\n                       Old |  New \r\n                     ------+------\r\n      TryScanToken:-  1746 |   42\r\nScanTokenFullWidth:-  1972 |   15\r\n   ScanTokenCommon:-       | 2035\r\n                     ------+------\r\n             Total:-  3718 | 2092\r\n```","created_at":"2015-03-21T19:54:17Z","updated_at":"2015-04-01T22:53:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5cc478c7ccfac7a7d53072092abab2c7219f1cb","assignee":{"login":"AlekseyTs","id":10522107,"avatar_url":"https://avatars.githubusercontent.com/u/10522107?v=3","gravatar_id":"","url":"https://api.github.com/users/AlekseyTs","html_url":"https://github.com/AlekseyTs","followers_url":"https://api.github.com/users/AlekseyTs/followers","following_url":"https://api.github.com/users/AlekseyTs/following{/other_user}","gists_url":"https://api.github.com/users/AlekseyTs/gists{/gist_id}","starred_url":"https://api.github.com/users/AlekseyTs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlekseyTs/subscriptions","organizations_url":"https://api.github.com/users/AlekseyTs/orgs","repos_url":"https://api.github.com/users/AlekseyTs/repos","events_url":"https://api.github.com/users/AlekseyTs/events{/privacy}","received_events_url":"https://api.github.com/users/AlekseyTs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/1","html_url":"https://github.com/dotnet/roslyn/milestones/1.0%20(stable)","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/1/labels","id":937397,"number":1,"title":"1.0 (stable)","description":"This is our 1.0 Milestone. ","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":235,"closed_issues":88,"state":"open","created_at":"2015-01-15T20:45:24Z","updated_at":"2015-04-01T20:42:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1463/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1463/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1463/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/80f22ff51fe99e9efe20cccb11ebe20b7f4e4f26","head":{"label":"AdamSpeight2008:Scanner(Unification)","ref":"Scanner(Unification)","sha":"80f22ff51fe99e9efe20cccb11ebe20b7f4e4f26","user":{"login":"AdamSpeight2008","id":900107,"avatar_url":"https://avatars.githubusercontent.com/u/900107?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamSpeight2008","html_url":"https://github.com/AdamSpeight2008","followers_url":"https://api.github.com/users/AdamSpeight2008/followers","following_url":"https://api.github.com/users/AdamSpeight2008/following{/other_user}","gists_url":"https://api.github.com/users/AdamSpeight2008/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSpeight2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSpeight2008/subscriptions","organizations_url":"https://api.github.com/users/AdamSpeight2008/orgs","repos_url":"https://api.github.com/users/AdamSpeight2008/repos","events_url":"https://api.github.com/users/AdamSpeight2008/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSpeight2008/received_events","type":"User","site_admin":false},"repo":{"id":30550436,"name":"roslyn-AdamSpeight2008","full_name":"AdamSpeight2008/roslyn-AdamSpeight2008","owner":{"login":"AdamSpeight2008","id":900107,"avatar_url":"https://avatars.githubusercontent.com/u/900107?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamSpeight2008","html_url":"https://github.com/AdamSpeight2008","followers_url":"https://api.github.com/users/AdamSpeight2008/followers","following_url":"https://api.github.com/users/AdamSpeight2008/following{/other_user}","gists_url":"https://api.github.com/users/AdamSpeight2008/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSpeight2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSpeight2008/subscriptions","organizations_url":"https://api.github.com/users/AdamSpeight2008/orgs","repos_url":"https://api.github.com/users/AdamSpeight2008/repos","events_url":"https://api.github.com/users/AdamSpeight2008/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSpeight2008/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AdamSpeight2008/roslyn-AdamSpeight2008","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008","forks_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/forks","keys_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/teams","hooks_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/hooks","issue_events_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/issues/events{/number}","events_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/events","assignees_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/assignees{/user}","branches_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/branches{/branch}","tags_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/tags","blobs_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/statuses/{sha}","languages_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/languages","stargazers_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/stargazers","contributors_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/contributors","subscribers_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/subscribers","subscription_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/subscription","commits_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/contents/{+path}","compare_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/merges","archive_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/downloads","issues_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/issues{/number}","pulls_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/pulls{/number}","milestones_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/milestones{/number}","notifications_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/labels{/name}","releases_url":"https://api.github.com/repos/AdamSpeight2008/roslyn-AdamSpeight2008/releases{/id}","created_at":"2015-02-09T18:12:45Z","updated_at":"2015-03-20T22:30:55Z","pushed_at":"2015-04-01T20:27:14Z","git_url":"git://github.com/AdamSpeight2008/roslyn-AdamSpeight2008.git","ssh_url":"git@github.com:AdamSpeight2008/roslyn-AdamSpeight2008.git","clone_url":"https://github.com/AdamSpeight2008/roslyn-AdamSpeight2008.git","svn_url":"https://github.com/AdamSpeight2008/roslyn-AdamSpeight2008","homepage":"","size":63501,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"9a48dff69585b642ccc8951c11c5c94084ad83e9","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-04-01T20:07:23Z","pushed_at":"2015-04-01T22:15:19Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":101013,"stargazers_count":1664,"watchers_count":1664,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":357,"mirror_url":null,"open_issues_count":664,"forks":357,"open_issues":664,"watchers":1664,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1463"},"html":{"href":"https://github.com/dotnet/roslyn/pull/1463"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/1463"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/1463/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1463/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1463/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/80f22ff51fe99e9efe20cccb11ebe20b7f4e4f26"}}}}