[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 49cf361c02 1/7: Fix indentation for async let
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 49cf361c02 1/7: Fix indentation for async let |
Date: |
Sat, 18 Jun 2022 04:58:56 -0400 (EDT) |
branch: elpa/swift-mode
commit 49cf361c02f05f68646059c2087a094737661565
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Fix indentation for async let
---
swift-mode-lexer.el | 4 ++--
test/swift-files/indent/declarations.swift | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el
index bbb4e6afc0..6c91d4b41c 100644
--- a/swift-mode-lexer.el
+++ b/swift-mode-lexer.el
@@ -455,7 +455,7 @@ Return nil otherwise."
;; async -> Int
;; let b = t as (Int, Int)
;; async
- ;; let c = 1
+ ;; let c = 1
((equal (swift-mode:token:text next-token) "async")
(equal (swift-mode:token:text (save-excursion
(swift-mode:forward-token-simple)
@@ -532,7 +532,7 @@ Return nil otherwise."
;; Suppress implicit semicolon after keywords that cannot end statements.
((member (swift-mode:token:text previous-token)
'("while" "for" "switch" "case" "default" "catch" "if" "guard"
- "let" "var" "throw" "import"))
+ "let" "var" "throw" "import" "async"))
nil)
;; Inserts implicit semicolon before keywords that starts a new
diff --git a/test/swift-files/indent/declarations.swift
b/test/swift-files/indent/declarations.swift
index 45fa4e3587..30a96363d9 100644
--- a/test/swift-files/indent/declarations.swift
+++ b/test/swift-files/indent/declarations.swift
@@ -742,8 +742,10 @@ class Foo {
func foo(f: @escaping (Int, Int) async -> Int, t: (Int, Int)) async {
let a = f as (Int, Int)
- async -> Int
+ async
+ ->
+ Int
let b = t as (Int, Int)
async
- let c = 1
+ let c = 1
}
- [nongnu] elpa/swift-mode updated (c92e780530 -> da673f995f), ELPA Syncer, 2022/06/18
- [nongnu] elpa/swift-mode 3f22042ca9 2/7: Support existential any, ELPA Syncer, 2022/06/18
- [nongnu] elpa/swift-mode 49cf361c02 1/7: Fix indentation for async let,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 7de00af05f 4/7: Add #unavailable keyword, ELPA Syncer, 2022/06/18
- [nongnu] elpa/swift-mode 00ec81fe40 6/7: Add noasync keyword, ELPA Syncer, 2022/06/18
- [nongnu] elpa/swift-mode c7cc7a3b74 3/7: Add tests for opaque result types (some), ELPA Syncer, 2022/06/18
- [nongnu] elpa/swift-mode 01191281f9 5/7: Add unavailable keyword for @available annotation, ELPA Syncer, 2022/06/18
- [nongnu] elpa/swift-mode da673f995f 7/7: Support distributed actor, ELPA Syncer, 2022/06/18