{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/4156","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/4156/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/4156/comments","events_url":"https://api.github.com/repos/apple/swift/issues/4156/events","html_url":"https://github.com/apple/swift/pull/4156","id":170233327,"number":4156,"title":"[syntax-map] Fix array-of-object-literal syntax map, argument label keywords","user":{"login":"benlangmuir","id":3412956,"avatar_url":"https://avatars.githubusercontent.com/u/3412956?v=3","gravatar_id":"","url":"https://api.github.com/users/benlangmuir","html_url":"https://github.com/benlangmuir","followers_url":"https://api.github.com/users/benlangmuir/followers","following_url":"https://api.github.com/users/benlangmuir/following{/other_user}","gists_url":"https://api.github.com/users/benlangmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/benlangmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlangmuir/subscriptions","organizations_url":"https://api.github.com/users/benlangmuir/orgs","repos_url":"https://api.github.com/users/benlangmuir/repos","events_url":"https://api.github.com/users/benlangmuir/events{/privacy}","received_events_url":"https://api.github.com/users/benlangmuir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-09T18:10:50Z","updated_at":"2016-08-09T19:19:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/4156","html_url":"https://github.com/apple/swift/pull/4156","diff_url":"https://github.com/apple/swift/pull/4156.diff","patch_url":"https://github.com/apple/swift/pull/4156.patch"},"body":"<!-- Please complete this template before creating the pull request. -->\r\n#### What's in this pull request?\r\n<!-- Description about pull request. -->\r\n* Explanation: The syntax-map incorrectly classifies the second and later object literals inside an array expression as \"identifier\" instead of \"object-literal\".  There are also several ways to get keywords or other syntax entities misclassified as identifiers in other corner cases.  These are all caused by some logic that is attempting to handle keywords used as argument labels running amok.\r\n* Scope: This is a regression in preview 3.  It affects editors that rely on the syntax map for syntax highlighting, and generally results in mis-coloring.  If an editor uses the syntax map to identify object literals for special UI, then they will not recognize object literals in array expressions correctly.  Note: editors that use the document structure instead of the syntax map for this purpose were not affected.\r\n* Risk: Low; this only affects the syntax map and in the worst case could only result in mis-categorizing a keyword as an identifier.\r\n* Reviewed by: _pending_\r\n* Testing: Regression tests added.\r\n\r\n#### Resolved bug number: ([SR-](https://bugs.swift.org/browse/SR-))\r\nrdar://problem/27726422\r\n<!-- If this pull request resolves any bugs from Swift bug tracker -->\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        All supported platforms     | @swift-ci Please smoke test and merge\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\nA smoke test on macOS does the following:\r\n\r\n1. Builds the compiler incrementally.\r\n2. Builds the standard library only for macOS. Simulator standard libraries and\r\n   device standard libraries are not built.\r\n3. lldb is not built.\r\n4. The test and validation-test targets are run only for macOS. The optimized\r\n   version of these tests are not run.\r\n\r\nA smoke test on Linux does the following:\r\n\r\n1. Builds the compiler incrementally.\r\n2. Builds the standard library incrementally.\r\n3. lldb is built incrementally.\r\n4. The swift test and validation-test targets are run. The optimized version of these\r\n   tests are not run.\r\n5. lldb is tested.\r\n\r\n**Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        All supported platforms     | @swift-ci Please test and merge\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        OS X platform               | @swift-ci Please benchmark\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\n\r\n**Lint Testing**\r\n\r\n        Language     | Comment\r\n        ------------ | -------------\r\n        Python       | @swift-ci Please Python lint\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->\r\n\r\n…\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/238661379","html_url":"https://github.com/apple/swift/pull/4156#issuecomment-238661379","issue_url":"https://api.github.com/repos/apple/swift/issues/4156","id":238661379,"user":{"login":"benlangmuir","id":3412956,"avatar_url":"https://avatars.githubusercontent.com/u/3412956?v=3","gravatar_id":"","url":"https://api.github.com/users/benlangmuir","html_url":"https://github.com/benlangmuir","followers_url":"https://api.github.com/users/benlangmuir/followers","following_url":"https://api.github.com/users/benlangmuir/following{/other_user}","gists_url":"https://api.github.com/users/benlangmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/benlangmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlangmuir/subscriptions","organizations_url":"https://api.github.com/users/benlangmuir/orgs","repos_url":"https://api.github.com/users/benlangmuir/repos","events_url":"https://api.github.com/users/benlangmuir/events{/privacy}","received_events_url":"https://api.github.com/users/benlangmuir/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T19:19:43Z","updated_at":"2016-08-09T19:19:43Z","body":"@swift-ci Please test"}}
{"actor":{"display_login":"benlangmuir"}}