[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
{
}
- [nongnu] elpa/swift-mode b7cc115 293/496: Merge pull request #116 from syohex/use-cl-lib, (continued)
- [nongnu] elpa/swift-mode b7cc115 293/496: Merge pull request #116 from syohex/use-cl-lib, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e9648b1 296/496: Use .el for file extension in distributed package., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1563e8b 300/496: Bump the development version to 0.5.0-snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a5e1acf 297/496: Merge pull request #122 from N4tr0n/make-install-fix-issue120, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cfaeaff 294/496: Update MELPA URL, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9471669 304/496: Merge taku0/swift3-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 848d088 310/496: Fix indentation after attributes with arguments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cad72a1 306/496: Fix a link in README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0a75736 317/496: Fix indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c1f7ec2 321/496: Fix indentation of switch-case body, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7423f68 324/496: Simplify code,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 58f31cc 340/496: Speed-up indentation for colon, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0b1f29d 334/496: Fix indentation of setter, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 812d202 341/496: Fix REPL prompt corruption, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode f755479 333/496: Fix anchor highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 56ee9b2 359/496: Add comment style option, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode dba539e 394/496: Tweak and clean-up font-lock, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode dca378a 400/496: Rename constants, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c532c1e 402/496: Update documents, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d35275b 417/496: Remove unused variables, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8a7be9c 424/496: Use remap for keymap, ELPA Syncer, 2021/08/29