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

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

[nongnu] elpa/swift-mode 69289fe 180/496: Lexer improvement: don't use i


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 69289fe 180/496: Lexer improvement: don't use implicit semicolon when ":" and "?" token
Date: Sun, 29 Aug 2021 11:33:32 -0400 (EDT)

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

    Lexer improvement: don't use implicit semicolon when ":" and "?" token
    is a last or first symbol on the line. Important for ternary operator.
---
 swift-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index 7efd717..a8dca0b 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -197,8 +197,8 @@
 
 (defun swift-smie--implicit-semi-p ()
   (save-excursion
-    (not (or (memq (char-before) '(?\{ ?\[ ?, ?.))
-             (looking-at "[ \n\t]+[.]")
+    (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]