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

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

[nongnu] elpa/swift-mode 7423f68 324/496: Simplify code


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 7423f68 324/496: Simplify code
Date: Sun, 29 Aug 2021 11:33:59 -0400 (EDT)

branch: elpa/swift-mode
commit 7423f68d4d0b7914335608920ff0e001ec088a91
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Simplify code
---
 swift-mode-indent.el                |  5 +----
 test/swift-files/declarations.swift |  1 +
 test/swift-files/statements.swift   | 19 +++++++++++++++++++
 test/swift-files/types.swift        | 18 +++++++++++++-----
 4 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/swift-mode-indent.el b/swift-mode-indent.el
index cdfcc5d..8e7da2c 100644
--- a/swift-mode-indent.el
+++ b/swift-mode-indent.el
@@ -1014,10 +1014,7 @@ comma at eol."
             ;;       foo()
             ;;
             ;; TODO make customizable
-            (setq result parent))
-
-           ((eq (swift-mode:token:type next-token) 'supertype-:)
-            parent))
+            (setq result parent)))
 
           (forward-comment (point-max))
           (if (< (point) pos)
diff --git a/test/swift-files/declarations.swift 
b/test/swift-files/declarations.swift
index e16fed6..b11294c 100644
--- a/test/swift-files/declarations.swift
+++ b/test/swift-files/declarations.swift
@@ -323,6 +323,7 @@ enum Foo
 }
 
 // Struct declarations
+// See also types.swift
 
 @A
 fileprivate
diff --git a/test/swift-files/statements.swift 
b/test/swift-files/statements.swift
index cde6127..f1c9851 100644
--- a/test/swift-files/statements.swift
+++ b/test/swift-files/statements.swift
@@ -108,6 +108,25 @@ for
     foo()
 }
 
+for case
+      Foo
+      .Bar(x)
+    in
+    xs {
+    foo()
+    foo()
+}
+
+for
+  case
+    Foo
+    .Bar(x)
+  in
+  xs {
+    foo()
+    foo()
+}
+
 
 
 for x as
diff --git a/test/swift-files/types.swift b/test/swift-files/types.swift
index cacf1e5..af2d4c3 100644
--- a/test/swift-files/types.swift
+++ b/test/swift-files/types.swift
@@ -15,26 +15,30 @@ let foo
   :A = abc
 
 class Foo:
-  A,
+  A
+    .A,
   B, C,
   D {
 }
 
 class Foo
-  : A,
+  : A
+      .A,
     B, C,
     D {
 }
 
 
 class Foo: A
+             .A
          , B , C
          , D
 {
 }
 
 class Foo
-  : A
+  : A.
+      A
   , B , C
   , D
 {
@@ -59,18 +63,21 @@ let foo
 
 class Foo:
   @A
-  A, // swift-mode:test:known-bug
+  A // swift-mode:test:known-bug
+    .A, // swift-mode:test:known-bug
   B {
 }
 
 class Foo
   : @A
-    A, // swift-mode:test:known-bug
+    A // swift-mode:test:known-bug
+      .A, // swift-mode:test:known-bug
     B {
 }
 
 class Foo: @A
            A // swift-mode:test:known-bug
+             .A // swift-mode:test:known-bug
          , B
 {
 }
@@ -78,6 +85,7 @@ class Foo: @A
 class Foo
   : @A
     A // swift-mode:test:known-bug
+      .A // swift-mode:test:known-bug
   , B
 {
 }



reply via email to

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