{"action":"created","comment":{"url":"https://api.github.com/repos/atom/language-javascript/pulls/comments/50494231","id":50494231,"diff_hunk":"@@ -1251,3 +1322,82 @@\n         ]\n       }\n     ]\n+  'switch_statement':\n+    'patterns': [\n+      {\n+        'begin': '\\\\b(switch)\\\\b'\n+        'beginCaptures':\n+          '0':\n+            'name': 'keyword.control.switch.js'\n+        'end': '}'\n+        'endCaptures':\n+          '0':\n+            'name': 'punctuation.definition.section.switch-block.end.js'\n+        'patterns': [\n+          {\n+            'begin': '\\\\('\n+            'beginCaptures':\n+              '0':\n+                'name': 'punctuation.definition.switch-expression.begin.js'\n+            'end': '\\\\)'\n+            'endCaptures':\n+              '0':\n+                'name': 'punctuation.definition.switch-expression.end.js'\n+            'patterns': [\n+              'include': '$self'\n+            ]\n+          }\n+          {\n+            'begin': '{'\n+            'beginCaptures':\n+              '0':\n+                'name': 'punctuation.definition.section.switch-block.begin.js'\n+            'end': '(?=})'\n+            'patterns': [\n+              {\n+                'begin': '\\\\b(case)\\\\b'\n+                'end': ':'\n+                'beginCaptures':\n+                  '0':\n+                    'name': 'keyword.control.case.js'\n+                'endCaptures':\n+                  '0':\n+                    'name': 'punctuation.definition.section.case-statements.js'\n+                'patterns': [\n+                  {\n+                    'match': '(\\\\w+)(?=\\\\s*:)'\n+                    'captures':\n+                      '1':\n+                        'patterns': [\n+                          'include': '$self'\n+                        ]\n+                  }\n+                  {\n+                    'match': '(?:\".*\")|(?:\\'.*\\')(?=\\\\s*:\\\\s*\\\\.*)'\n+                    'captures':\n+                      '0':\n+                        'patterns': [\n+                          'include': '#strings'\n+                        ]\n+                  }\n+                  {\n+                    'include': '$self'\n+                  }\n+                ]\n+              }\n+              {\n+                'match': '(?:^\\\\s*)?\\\\b(default)\\\\b\\\\s*(:)'\n+                'captures':\n+                  '1':\n+                    'name': 'keyword.control.default.js'\n+                  '2':\n+                    'name': 'punctuation.definition.section.case-statements.js'","path":"grammars/javascript.cson","position":486,"original_position":486,"commit_id":"6dce6b145dae26139a7f31906ffd23921b6cea50","original_commit_id":"6dce6b145dae26139a7f31906ffd23921b6cea50","user":{"login":"50Wliu","id":2766036,"avatar_url":"https://avatars.githubusercontent.com/u/2766036?v=3","gravatar_id":"","url":"https://api.github.com/users/50Wliu","html_url":"https://github.com/50Wliu","followers_url":"https://api.github.com/users/50Wliu/followers","following_url":"https://api.github.com/users/50Wliu/following{/other_user}","gists_url":"https://api.github.com/users/50Wliu/gists{/gist_id}","starred_url":"https://api.github.com/users/50Wliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/50Wliu/subscriptions","organizations_url":"https://api.github.com/users/50Wliu/orgs","repos_url":"https://api.github.com/users/50Wliu/repos","events_url":"https://api.github.com/users/50Wliu/events{/privacy}","received_events_url":"https://api.github.com/users/50Wliu/received_events","type":"User","site_admin":false},"body":"Same, I think this should probably be either `case-statement` or `default-statement`","created_at":"2016-01-22T02:01:21Z","updated_at":"2016-01-22T02:01:21Z","html_url":"https://github.com/atom/language-javascript/pull/307#discussion_r50494231","pull_request_url":"https://api.github.com/repos/atom/language-javascript/pulls/307","_links":{"self":{"href":"https://api.github.com/repos/atom/language-javascript/pulls/comments/50494231"},"html":{"href":"https://github.com/atom/language-javascript/pull/307#discussion_r50494231"},"pull_request":{"href":"https://api.github.com/repos/atom/language-javascript/pulls/307"}}},"pull_request":{"url":"https://api.github.com/repos/atom/language-javascript/pulls/307","id":56387840,"html_url":"https://github.com/atom/language-javascript/pull/307","diff_url":"https://github.com/atom/language-javascript/pull/307.diff","patch_url":"https://github.com/atom/language-javascript/pull/307.patch","issue_url":"https://api.github.com/repos/atom/language-javascript/issues/307","number":307,"state":"open","locked":false,"title":"[WIP] Add support for object keys, labels","user":{"login":"MaximSokolov","id":2943616,"avatar_url":"https://avatars.githubusercontent.com/u/2943616?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximSokolov","html_url":"https://github.com/MaximSokolov","followers_url":"https://api.github.com/users/MaximSokolov/followers","following_url":"https://api.github.com/users/MaximSokolov/following{/other_user}","gists_url":"https://api.github.com/users/MaximSokolov/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximSokolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximSokolov/subscriptions","organizations_url":"https://api.github.com/users/MaximSokolov/orgs","repos_url":"https://api.github.com/users/MaximSokolov/repos","events_url":"https://api.github.com/users/MaximSokolov/events{/privacy}","received_events_url":"https://api.github.com/users/MaximSokolov/received_events","type":"User","site_admin":false},"body":"```js\r\nlabel:\r\n\r\nswitch (foo())\r\n{\r\n    case 'string':\r\n    case a:\r\n    case a + b:\r\n    case foo(bar):\r\n    case CON$TANT:\r\n    case 123:\r\n      foo(bar)\r\n      break;\r\n    default:\r\n}\r\n\r\n? a : b\r\n? \"abc\" : \"abc\"\r\n? (a.b(123)) : (b(\"c\"))\r\n? {key: value} : b\r\n? this : null\r\n? 'a'.b(':c(d)') :\r\n\r\nobj = {\r\n  key: value,\r\n  $abc$: value,\r\n  0abc: value,\r\n  123: 123,\r\n  'key': 'value',\r\n  KEY: VALUE\r\n}\r\n\r\nobj1 = {\r\n  name: function (){},\r\n  'name': function (){},\r\n  \"name\": function(){}\r\n}\r\n\r\nobj2 = {\r\n  null: 'abc',\r\n  module: 'abc',\r\n  this: 'abc',\r\n  class: 'abc',\r\n  NaN: 'abc'\r\n}\r\n```\r\n\r\n```less\r\natom-text-editor::shadow .source.js {\r\n  .meta.object-key {\r\n    // * {}\r\n    \r\n    .variable {}\r\n  \r\n    .constant.numeric {}\r\n  \r\n    .string {}\r\n      \r\n    .constant.other {}\r\n  }\r\n\r\n  .meta.function {\r\n    .meta.object-key {\r\n      .entity.name.function, .string {}\r\n    }\r\n  }\r\n}\r\n```","created_at":"2016-01-18T20:28:29Z","updated_at":"2016-01-22T02:01:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afe59d3cda7ac5ff02b412c75bddd3b5710497da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/language-javascript/pulls/307/commits","review_comments_url":"https://api.github.com/repos/atom/language-javascript/pulls/307/comments","review_comment_url":"https://api.github.com/repos/atom/language-javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/language-javascript/issues/307/comments","statuses_url":"https://api.github.com/repos/atom/language-javascript/statuses/6dce6b145dae26139a7f31906ffd23921b6cea50","head":{"label":"MaximSokolov:support-for-object-keys","ref":"support-for-object-keys","sha":"6dce6b145dae26139a7f31906ffd23921b6cea50","user":{"login":"MaximSokolov","id":2943616,"avatar_url":"https://avatars.githubusercontent.com/u/2943616?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximSokolov","html_url":"https://github.com/MaximSokolov","followers_url":"https://api.github.com/users/MaximSokolov/followers","following_url":"https://api.github.com/users/MaximSokolov/following{/other_user}","gists_url":"https://api.github.com/users/MaximSokolov/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximSokolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximSokolov/subscriptions","organizations_url":"https://api.github.com/users/MaximSokolov/orgs","repos_url":"https://api.github.com/users/MaximSokolov/repos","events_url":"https://api.github.com/users/MaximSokolov/events{/privacy}","received_events_url":"https://api.github.com/users/MaximSokolov/received_events","type":"User","site_admin":false},"repo":{"id":42680134,"name":"language-javascript","full_name":"MaximSokolov/language-javascript","owner":{"login":"MaximSokolov","id":2943616,"avatar_url":"https://avatars.githubusercontent.com/u/2943616?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximSokolov","html_url":"https://github.com/MaximSokolov","followers_url":"https://api.github.com/users/MaximSokolov/followers","following_url":"https://api.github.com/users/MaximSokolov/following{/other_user}","gists_url":"https://api.github.com/users/MaximSokolov/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximSokolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximSokolov/subscriptions","organizations_url":"https://api.github.com/users/MaximSokolov/orgs","repos_url":"https://api.github.com/users/MaximSokolov/repos","events_url":"https://api.github.com/users/MaximSokolov/events{/privacy}","received_events_url":"https://api.github.com/users/MaximSokolov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaximSokolov/language-javascript","description":"JavaScript language package for Atom","fork":true,"url":"https://api.github.com/repos/MaximSokolov/language-javascript","forks_url":"https://api.github.com/repos/MaximSokolov/language-javascript/forks","keys_url":"https://api.github.com/repos/MaximSokolov/language-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaximSokolov/language-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaximSokolov/language-javascript/teams","hooks_url":"https://api.github.com/repos/MaximSokolov/language-javascript/hooks","issue_events_url":"https://api.github.com/repos/MaximSokolov/language-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/MaximSokolov/language-javascript/events","assignees_url":"https://api.github.com/repos/MaximSokolov/language-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/MaximSokolov/language-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/MaximSokolov/language-javascript/tags","blobs_url":"https://api.github.com/repos/MaximSokolov/language-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaximSokolov/language-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaximSokolov/language-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaximSokolov/language-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaximSokolov/language-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/MaximSokolov/language-javascript/languages","stargazers_url":"https://api.github.com/repos/MaximSokolov/language-javascript/stargazers","contributors_url":"https://api.github.com/repos/MaximSokolov/language-javascript/contributors","subscribers_url":"https://api.github.com/repos/MaximSokolov/language-javascript/subscribers","subscription_url":"https://api.github.com/repos/MaximSokolov/language-javascript/subscription","commits_url":"https://api.github.com/repos/MaximSokolov/language-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaximSokolov/language-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaximSokolov/language-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaximSokolov/language-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaximSokolov/language-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/MaximSokolov/language-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaximSokolov/language-javascript/merges","archive_url":"https://api.github.com/repos/MaximSokolov/language-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaximSokolov/language-javascript/downloads","issues_url":"https://api.github.com/repos/MaximSokolov/language-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/MaximSokolov/language-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/MaximSokolov/language-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/MaximSokolov/language-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaximSokolov/language-javascript/labels{/name}","releases_url":"https://api.github.com/repos/MaximSokolov/language-javascript/releases{/id}","deployments_url":"https://api.github.com/repos/MaximSokolov/language-javascript/deployments","created_at":"2015-09-17T20:27:01Z","updated_at":"2015-09-17T20:27:02Z","pushed_at":"2016-01-21T19:40:16Z","git_url":"git://github.com/MaximSokolov/language-javascript.git","ssh_url":"git@github.com:MaximSokolov/language-javascript.git","clone_url":"https://github.com/MaximSokolov/language-javascript.git","svn_url":"https://github.com/MaximSokolov/language-javascript","homepage":"","size":583,"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":"23fe6d67cd35a586c7127881d7ea05b54a211b23","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":13712111,"name":"language-javascript","full_name":"atom/language-javascript","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-javascript","description":"JavaScript language package for Atom","fork":false,"url":"https://api.github.com/repos/atom/language-javascript","forks_url":"https://api.github.com/repos/atom/language-javascript/forks","keys_url":"https://api.github.com/repos/atom/language-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/language-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/language-javascript/teams","hooks_url":"https://api.github.com/repos/atom/language-javascript/hooks","issue_events_url":"https://api.github.com/repos/atom/language-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/atom/language-javascript/events","assignees_url":"https://api.github.com/repos/atom/language-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/atom/language-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/atom/language-javascript/tags","blobs_url":"https://api.github.com/repos/atom/language-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/language-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/language-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/language-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/language-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/language-javascript/languages","stargazers_url":"https://api.github.com/repos/atom/language-javascript/stargazers","contributors_url":"https://api.github.com/repos/atom/language-javascript/contributors","subscribers_url":"https://api.github.com/repos/atom/language-javascript/subscribers","subscription_url":"https://api.github.com/repos/atom/language-javascript/subscription","commits_url":"https://api.github.com/repos/atom/language-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/language-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/language-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/language-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/language-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/atom/language-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/language-javascript/merges","archive_url":"https://api.github.com/repos/atom/language-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/language-javascript/downloads","issues_url":"https://api.github.com/repos/atom/language-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/atom/language-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/language-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/language-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/language-javascript/labels{/name}","releases_url":"https://api.github.com/repos/atom/language-javascript/releases{/id}","deployments_url":"https://api.github.com/repos/atom/language-javascript/deployments","created_at":"2013-10-20T02:03:20Z","updated_at":"2016-01-21T02:29:14Z","pushed_at":"2016-01-22T01:33:12Z","git_url":"git://github.com/atom/language-javascript.git","ssh_url":"git@github.com:atom/language-javascript.git","clone_url":"https://github.com/atom/language-javascript.git","svn_url":"https://github.com/atom/language-javascript","homepage":"","size":908,"stargazers_count":78,"watchers_count":78,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":38,"forks":105,"open_issues":38,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/language-javascript/pulls/307"},"html":{"href":"https://github.com/atom/language-javascript/pull/307"},"issue":{"href":"https://api.github.com/repos/atom/language-javascript/issues/307"},"comments":{"href":"https://api.github.com/repos/atom/language-javascript/issues/307/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/language-javascript/pulls/307/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/language-javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/language-javascript/pulls/307/commits"},"statuses":{"href":"https://api.github.com/repos/atom/language-javascript/statuses/6dce6b145dae26139a7f31906ffd23921b6cea50"}}}}