emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode 69783af 243/496: added guard statement


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 69783af 243/496: added guard statement
Date: Sun, 29 Aug 2021 11:33:44 -0400 (EDT)

branch: elpa/swift-mode
commit 69783af7194091d3f52f721ee589d5f150b5ec7b
Author: Anthony Green <akoaysigod@gmail.com>
Commit: Anthony Green <akoaysigod@gmail.com>

    added guard statement
---
 swift-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/swift-mode.el b/swift-mode.el
index 9597644..aca877c 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -131,6 +131,7 @@
              (method-call "{" closure "}")
              ("enum" decl-exp "{" enum-body "}")
              ("switch" exp "{" switch-body "}")
+             (guard-statement)
              (if-clause)
              ("for" for-head "{" insts "}")
              ("while" exp "{" insts "}"))
@@ -159,6 +160,9 @@
 
        (for-head (in-exp) (op-exp) (for-head ";" for-head))
 
+       (guard-conditional (exp) (let-decl) (var-decl))
+       (guard-statement ("guard" guard-conditional "else" "{" insts "return" 
"}"))
+
        (if-conditional (exp) (let-decl))
        (if-body ("if" if-conditional "{" insts "}"))
        (if-clause (if-body)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]