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

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

[nongnu] elpa/swift-mode d6483e1 207/496: Add ?? to the lexer rule for o


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode d6483e1 207/496: Add ?? to the lexer rule for operators
Date: Sun, 29 Aug 2021 11:33:37 -0400 (EDT)

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

    Add ?? to the lexer rule for operators
---
 swift-mode.el             | 2 +-
 test/indentation-tests.el | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/swift-mode.el b/swift-mode.el
index 967e8d2..96a0b37 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -200,7 +200,7 @@
                 "is" "as" "as?" ".." "..."
                 "+" "-" "&+" "&-" "|" "^"
                 "*" "/" "%" "&*" "&/" "&%" "&"
-                "<<" ">>")))
+                "<<" ">>" "??")))
 
 (defvar swift-smie--decl-specifier-regexp
   (rx (? (or "class" "mutating" "override" "static" "unowned" "weak"))
diff --git a/test/indentation-tests.el b/test/indentation-tests.el
index 39ada7c..f5abdfd 100644
--- a/test/indentation-tests.el
+++ b/test/indentation-tests.el
@@ -1156,6 +1156,15 @@ CGPoint(x: aaaaaaaaaaaaaaa.x +
            bbbbbbbbbbbbbbbb)
 ")
 
+(check-indentation indents-multiline-expressions/20
+                   "
+let x = foo ??
+            |bar
+" "
+let x = foo ??
+        |bar
+")
+
 (check-indentation indents-long-parameters/1
                    "
 func foo() {



reply via email to

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