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

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

[nongnu] elpa/swift-mode fb2f48e 187/496: Add rule for assignment expres


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode fb2f48e 187/496: Add rule for assignment expression
Date: Sun, 29 Aug 2021 11:33:33 -0400 (EDT)

branch: elpa/swift-mode
commit fb2f48e30dd46812698184d112a384839aecb26e
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>

    Add rule for assignment expression
---
 swift-mode.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index b9eb3f5..e67b33c 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -113,6 +113,7 @@
 
        (insts (inst) (insts ";" insts))
        (inst (decl)
+             (exp "=" exp)
              (tern-exp)
              (in-exp)
              (dot-exp)
@@ -154,7 +155,7 @@
        (if-else-if (if-body) (if-else-if "else" if-else-if))
        (if-clause (if-else-if)))
      ;; Conflicts
-     '((nonassoc "{") (assoc ",") (assoc ";") (assoc ":"))
+     '((nonassoc "{") (assoc ",") (assoc ";") (assoc ":") (right "="))
      '((assoc "in") (assoc "where") (assoc "OP"))
      '((assoc "else"))
      '((assoc ";") (assoc "ecase"))
@@ -201,7 +202,7 @@
 
 (defun swift-smie--implicit-semi-p ()
   (save-excursion
-    (not (or (memq (char-before) '(?\{ ?\[ ?, ?. ?\? ?\:))
+    (not (or (memq (char-before) '(?\{ ?\[ ?, ?. ?\? ?\: ?=))
              (looking-at "[ \n\t]+[.?:]")
              (looking-back swift-smie--operators-regexp (- (point) 3) t)
              ))))



reply via email to

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