branch: elpa/swift-mode
commit c08c3a16ed4089fe0e140c00f51213dd15058d0d
Author: ap4y <l...@pisem.net>
Commit: ap4y <l...@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