{"action":"created","comment":{"url":"https://api.github.com/repos/atom/language-ruby/pulls/comments/31049772","id":31049772,"diff_hunk":"@@ -45,6 +45,38 @@ describe \"Ruby grammar\", ->\n     expect(tokens[4]).toEqual value: ' ', scopes: ['source.ruby']\n     expect(tokens[5]).toEqual value: '1', scopes: ['source.ruby', 'constant.numeric.ruby']\n \n+  it \"tokenizes :: separators\", ->\n+    {tokens} = grammar.tokenizeLine('File::read \"test\"')\n+    expect(tokens[0]).toEqual value: 'File', scopes: ['source.ruby', 'support.class.ruby']\n+    expect(tokens[1]).toEqual value: '::', scopes: ['source.ruby', 'punctuation.separator.method.ruby']\n+    expect(tokens[2]).toEqual value: 'read ', scopes: ['source.ruby']\n+\n+    {tokens} = grammar.tokenizeLine('File:: read \"test\"')\n+    expect(tokens[0]).toEqual value: 'File', scopes: ['source.ruby', 'variable.other.constant.ruby']\n+    expect(tokens[1]).toEqual value: ':: ', scopes: ['source.ruby', 'punctuation.separator.method.ruby']\n+    expect(tokens[2]).toEqual value: 'read ', scopes: ['source.ruby']\n+\n+    {tokens} = grammar.tokenizeLine('RbConfig::CONFIG')\n+    expect(tokens[0]).toEqual value: 'RbConfig', scopes: ['source.ruby', 'support.class.ruby']\n+    expect(tokens[1]).toEqual value: '::', scopes: ['source.ruby', 'punctuation.separator.namespace.ruby']\n+    expect(tokens[2]).toEqual value: 'CONFIG', scopes: ['source.ruby', 'variable.other.constant.ruby']\n+\n+    {tokens} = grammar.tokenizeLine('RbConfig:: CONFIG')\n+    expect(tokens[0]).toEqual value: 'RbConfig', scopes: ['source.ruby', 'variable.other.constant.ruby']\n+    expect(tokens[1]).toEqual value: ':: ', scopes: ['source.ruby', 'punctuation.separator.namespace.ruby']","path":"spec/ruby-spec.coffee","position":22,"original_position":22,"commit_id":"c99c50b98792f779d5d89299eaec96c555e8232d","original_commit_id":"c99c50b98792f779d5d89299eaec96c555e8232d","user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"body":"I'd prefer to not include the whitespace in punctuation scope, would you mind adjusting the patterns to not do that?","created_at":"2015-05-26T15:58:48Z","updated_at":"2015-05-26T15:58:48Z","html_url":"https://github.com/atom/language-ruby/pull/101#discussion_r31049772","pull_request_url":"https://api.github.com/repos/atom/language-ruby/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/atom/language-ruby/pulls/comments/31049772"},"html":{"href":"https://github.com/atom/language-ruby/pull/101#discussion_r31049772"},"pull_request":{"href":"https://api.github.com/repos/atom/language-ruby/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/atom/language-ruby/pulls/101","id":36089006,"html_url":"https://github.com/atom/language-ruby/pull/101","diff_url":"https://github.com/atom/language-ruby/pull/101.diff","patch_url":"https://github.com/atom/language-ruby/pull/101.patch","issue_url":"https://api.github.com/repos/atom/language-ruby/issues/101","number":101,"state":"open","locked":false,"title":"Feature/add constant separator","user":{"login":"nn2242","id":2596124,"avatar_url":"https://avatars.githubusercontent.com/u/2596124?v=3","gravatar_id":"","url":"https://api.github.com/users/nn2242","html_url":"https://github.com/nn2242","followers_url":"https://api.github.com/users/nn2242/followers","following_url":"https://api.github.com/users/nn2242/following{/other_user}","gists_url":"https://api.github.com/users/nn2242/gists{/gist_id}","starred_url":"https://api.github.com/users/nn2242/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nn2242/subscriptions","organizations_url":"https://api.github.com/users/nn2242/orgs","repos_url":"https://api.github.com/users/nn2242/repos","events_url":"https://api.github.com/users/nn2242/events{/privacy}","received_events_url":"https://api.github.com/users/nn2242/received_events","type":"User","site_admin":false},"body":"Currently there are two issues with the '::' token in the Ruby grammar. \r\n\r\n1. \":\" is preferred over \"::\", so \"::\" method separators are always erroneously marked with the 'punctuation.separator.other.ruby' scope instead of 'punctuation.separator.method.ruby'.\r\n2. \"::\" isn't always a method separator in Ruby, it's also allows you to access module hierarchies and other constants. Constants are signified by starting with a capital letter. Solution is to create a new scope 'punctuation.separator.constant.ruby' that looks ahead to see if the next letter is a capital. ","created_at":"2015-05-23T15:25:27Z","updated_at":"2015-05-26T15:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"904442df2dff308b9bbdc81d7c436b4e5a0c9310","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/language-ruby/pulls/101/commits","review_comments_url":"https://api.github.com/repos/atom/language-ruby/pulls/101/comments","review_comment_url":"https://api.github.com/repos/atom/language-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/language-ruby/issues/101/comments","statuses_url":"https://api.github.com/repos/atom/language-ruby/statuses/c99c50b98792f779d5d89299eaec96c555e8232d","head":{"label":"nn2242:feature/add-constant-separator","ref":"feature/add-constant-separator","sha":"c99c50b98792f779d5d89299eaec96c555e8232d","user":{"login":"nn2242","id":2596124,"avatar_url":"https://avatars.githubusercontent.com/u/2596124?v=3","gravatar_id":"","url":"https://api.github.com/users/nn2242","html_url":"https://github.com/nn2242","followers_url":"https://api.github.com/users/nn2242/followers","following_url":"https://api.github.com/users/nn2242/following{/other_user}","gists_url":"https://api.github.com/users/nn2242/gists{/gist_id}","starred_url":"https://api.github.com/users/nn2242/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nn2242/subscriptions","organizations_url":"https://api.github.com/users/nn2242/orgs","repos_url":"https://api.github.com/users/nn2242/repos","events_url":"https://api.github.com/users/nn2242/events{/privacy}","received_events_url":"https://api.github.com/users/nn2242/received_events","type":"User","site_admin":false},"repo":{"id":35459656,"name":"language-ruby","full_name":"nn2242/language-ruby","owner":{"login":"nn2242","id":2596124,"avatar_url":"https://avatars.githubusercontent.com/u/2596124?v=3","gravatar_id":"","url":"https://api.github.com/users/nn2242","html_url":"https://github.com/nn2242","followers_url":"https://api.github.com/users/nn2242/followers","following_url":"https://api.github.com/users/nn2242/following{/other_user}","gists_url":"https://api.github.com/users/nn2242/gists{/gist_id}","starred_url":"https://api.github.com/users/nn2242/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nn2242/subscriptions","organizations_url":"https://api.github.com/users/nn2242/orgs","repos_url":"https://api.github.com/users/nn2242/repos","events_url":"https://api.github.com/users/nn2242/events{/privacy}","received_events_url":"https://api.github.com/users/nn2242/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nn2242/language-ruby","description":"Ruby package for Atom","fork":true,"url":"https://api.github.com/repos/nn2242/language-ruby","forks_url":"https://api.github.com/repos/nn2242/language-ruby/forks","keys_url":"https://api.github.com/repos/nn2242/language-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nn2242/language-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nn2242/language-ruby/teams","hooks_url":"https://api.github.com/repos/nn2242/language-ruby/hooks","issue_events_url":"https://api.github.com/repos/nn2242/language-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/nn2242/language-ruby/events","assignees_url":"https://api.github.com/repos/nn2242/language-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/nn2242/language-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/nn2242/language-ruby/tags","blobs_url":"https://api.github.com/repos/nn2242/language-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nn2242/language-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nn2242/language-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/nn2242/language-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nn2242/language-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/nn2242/language-ruby/languages","stargazers_url":"https://api.github.com/repos/nn2242/language-ruby/stargazers","contributors_url":"https://api.github.com/repos/nn2242/language-ruby/contributors","subscribers_url":"https://api.github.com/repos/nn2242/language-ruby/subscribers","subscription_url":"https://api.github.com/repos/nn2242/language-ruby/subscription","commits_url":"https://api.github.com/repos/nn2242/language-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/nn2242/language-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/nn2242/language-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/nn2242/language-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/nn2242/language-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/nn2242/language-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nn2242/language-ruby/merges","archive_url":"https://api.github.com/repos/nn2242/language-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nn2242/language-ruby/downloads","issues_url":"https://api.github.com/repos/nn2242/language-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/nn2242/language-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/nn2242/language-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/nn2242/language-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nn2242/language-ruby/labels{/name}","releases_url":"https://api.github.com/repos/nn2242/language-ruby/releases{/id}","created_at":"2015-05-12T01:31:00Z","updated_at":"2015-05-12T01:31:01Z","pushed_at":"2015-05-23T22:16:37Z","git_url":"git://github.com/nn2242/language-ruby.git","ssh_url":"git@github.com:nn2242/language-ruby.git","clone_url":"https://github.com/nn2242/language-ruby.git","svn_url":"https://github.com/nn2242/language-ruby","homepage":null,"size":451,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":"atom:master","ref":"master","sha":"bf3e136e3260d0346338deaa821a11db56d65ff0","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":13712764,"name":"language-ruby","full_name":"atom/language-ruby","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/language-ruby","description":"Ruby package for Atom","fork":false,"url":"https://api.github.com/repos/atom/language-ruby","forks_url":"https://api.github.com/repos/atom/language-ruby/forks","keys_url":"https://api.github.com/repos/atom/language-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/language-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/language-ruby/teams","hooks_url":"https://api.github.com/repos/atom/language-ruby/hooks","issue_events_url":"https://api.github.com/repos/atom/language-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/atom/language-ruby/events","assignees_url":"https://api.github.com/repos/atom/language-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/atom/language-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/atom/language-ruby/tags","blobs_url":"https://api.github.com/repos/atom/language-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/language-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/language-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/language-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/language-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/language-ruby/languages","stargazers_url":"https://api.github.com/repos/atom/language-ruby/stargazers","contributors_url":"https://api.github.com/repos/atom/language-ruby/contributors","subscribers_url":"https://api.github.com/repos/atom/language-ruby/subscribers","subscription_url":"https://api.github.com/repos/atom/language-ruby/subscription","commits_url":"https://api.github.com/repos/atom/language-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/language-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/language-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/language-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/language-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/atom/language-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/language-ruby/merges","archive_url":"https://api.github.com/repos/atom/language-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/language-ruby/downloads","issues_url":"https://api.github.com/repos/atom/language-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/atom/language-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/language-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/language-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/language-ruby/labels{/name}","releases_url":"https://api.github.com/repos/atom/language-ruby/releases{/id}","created_at":"2013-10-20T03:04:39Z","updated_at":"2015-05-23T16:08:10Z","pushed_at":"2015-05-23T22:16:37Z","git_url":"git://github.com/atom/language-ruby.git","ssh_url":"git@github.com:atom/language-ruby.git","clone_url":"https://github.com/atom/language-ruby.git","svn_url":"https://github.com/atom/language-ruby","homepage":null,"size":1225,"stargazers_count":27,"watchers_count":27,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":30,"forks":51,"open_issues":30,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/language-ruby/pulls/101"},"html":{"href":"https://github.com/atom/language-ruby/pull/101"},"issue":{"href":"https://api.github.com/repos/atom/language-ruby/issues/101"},"comments":{"href":"https://api.github.com/repos/atom/language-ruby/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/language-ruby/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/language-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/language-ruby/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/atom/language-ruby/statuses/c99c50b98792f779d5d89299eaec96c555e8232d"}}}}