{"id":2006,"date":"2024-05-02T10:36:25","date_gmt":"2024-05-02T02:36:25","guid":{"rendered":"https:\/\/wp.minicoda.com\/?p=2006"},"modified":"2024-05-02T10:36:25","modified_gmt":"2024-05-02T02:36:25","slug":"%e5%a6%82%e4%bd%95%e7%90%86%e8%a7%a3swift-case-let-xxx","status":"publish","type":"post","link":"https:\/\/wp.minicoda.com\/index.php\/%e5%a6%82%e4%bd%95%e7%90%86%e8%a7%a3swift-case-let-xxx\/","title":{"rendered":"\u5982\u4f55\u7406\u89e3Swift \"case let xxx:\"?"},"content":{"rendered":"\n<p>  \u4e00\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u627e\u5230Swift switch\u8bed\u6cd5\u5b9a\u4e49\uff1a<a href=\"https:\/\/docs.swift.org\/swift-book\/documentation\/the-swift-programming-language\/statements#Execution-Does-Not-Fall-Through-Cases-Implicitly\">Switch Statements | swift.org<\/a><\/p>\n\n\n\n<p>  <em>case-label<\/em>\u00a0\u2192\u00a0<em>attributes?<\/em>\u00a0case\u00a0<em><strong>case-item-list<\/strong><\/em>\u00a0<strong><code>:<\/code><\/strong><br>  <em>case-item-list<\/em>\u00a0\u2192\u00a0<strong><em>pattern\u00a0<\/em><\/strong><em>where-clause?<\/em>\u00a0|\u00a0<em>pattern<\/em>\u00a0<em>where-clause?<\/em>\u00a0<strong><code>,<\/code><\/strong>\u00a0<em>case-item-list<\/em><\/p>\n\n\n\n<p>  \u5176\u5b9e\uff0clet xxx\u662f\u4e00\u79cdidenfifier pattern (<a href=\"https:\/\/docs.swift.org\/swift-book\/documentation\/the-swift-programming-language\/patterns#Identifier-Pattern\">Identifier Patterns | swift.org<\/a>), \u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>wildcard-pattern<\/em>\u00a0<em>type-annotation?<\/em><br>  <em>pattern<\/em>\u00a0\u2192<strong><em>\u00a0identifier-pattern<\/em><\/strong>\u00a0<em>type-annotation?<\/em><br>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>value-binding-pattern<\/em><br>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>tuple-pattern<\/em>\u00a0<em>type-annotation?<\/em><br>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>enum-case-pattern<\/em><br>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>optional-pattern<\/em><br>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>type-casting-pattern<\/em><br>  <em>pattern<\/em>\u00a0\u2192\u00a0<em>expression-pattern<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u627e\u5230Swift switch\u8bed\u6cd5\u5b9a\u4e49\uff1aSwitch Statements | swift.org case-label\u00a0\u2192\u00a0attributes?\u00a0case\u00a0case-item-list&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299],"tags":[],"class_list":["post-2006","post","type-post","status-publish","format-standard","hentry","category-think"],"views":132,"_links":{"self":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/2006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/comments?post=2006"}],"version-history":[{"count":1,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/2006\/revisions"}],"predecessor-version":[{"id":2007,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/2006\/revisions\/2007"}],"wp:attachment":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=2006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=2006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=2006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}