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

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

[nongnu] elpa/swift-mode c08c3a1 138/496: Define dot-exp smie rule as co


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode c08c3a1 138/496: Define dot-exp smie rule as combination of ids rather than expressions
Date: Sun, 29 Aug 2021 11:33:23 -0400 (EDT)

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

    Define dot-exp smie rule as combination of ids rather than expressions
---
 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 c7d1d16..4561d38 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -121,7 +121,7 @@
              ("for" for-head "{" insts "}")
              ("while" exp "{" insts "}"))
 
-       (dot-exp (exp "." exp))
+       (dot-exp (id "." id))
 
        (method-call (dot-exp "(" method-args ")"))
        (method-args (method-arg) (method-arg "," method-arg))
diff --git a/test/indentation-tests.el b/test/indentation-tests.el
index 203d0d5..fd3d30c 100644
--- a/test/indentation-tests.el
+++ b/test/indentation-tests.el
@@ -811,6 +811,15 @@ let json_ary = NSJSONSerialization
                |.JSONObjectWithData(data, options: nil, error: &json_err) as 
NSArray
 ")
 
+(check-indentation indents-multiline-expressions/8
+                   "
+let options = NSRegularExpressionOptions.CaseInsensitive &
+|NSRegularExpressionOptions.DotMatchesLineSeparators
+" "
+let options = NSRegularExpressionOptions.CaseInsensitive &
+              |NSRegularExpressionOptions.DotMatchesLineSeparators
+")
+
 (check-indentation indents-multiline-expressions-to-user-defined-offset/1
                    "
 NSNotificationCenter.defaultCenter().



reply via email to

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