[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 922dc52 445/496: Fix code format
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 922dc52 445/496: Fix code format |
Date: |
Sun, 29 Aug 2021 11:34:24 -0400 (EDT) |
branch: elpa/swift-mode
commit 922dc52723dcd6bc6050aee4a936d302710fae4d
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Fix code format
---
swift-mode-lexer.el | 130 ++++++++++++++++++++++++++--------------------------
1 file changed, 65 insertions(+), 65 deletions(-)
diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el
index 0f18757..ab93cae 100644
--- a/swift-mode-lexer.el
+++ b/swift-mode-lexer.el
@@ -528,7 +528,7 @@ Return nil otherwise." ;; FIXME pound-count
;; Suppress implicit semicolon after declaration starters.
((member (swift-mode:token:text previous-token)
'("class" "struct" "protocol" "enum" "extension" "func"
- "typealias""associatedtype" "precedencegroup" "operator"))
+ "typealias" "associatedtype" "precedencegroup" "operator"))
nil)
;; Inserts implicit semicolon before declaration starters.
@@ -553,70 +553,70 @@ Return nil otherwise." ;; FIXME pound-count
(swift-mode:forward-token-simple)))
"<")))
- ;; Suppress implicit semicolon after keywords that behave like method
- ;; names.
- ;;
- ;; Note that binary operators take precedence over this:
- ;;
- ;; self . // not insert semicolon here
- ;; init
- ;;
- ;; var x {
- ;; set // not insert semicolon here
- ;; (x) {
- ;; }
- ;; }
- ;;
- ;; var x {
- ;; set // inserts semicolon here
- ;; {
- ;; }
- ;; }
- ((member (swift-mode:token:text previous-token)
- '("set" "willSet" "didSet" "subscript" "init" "deinit"))
- nil)
-
- ;; Inserts implicit semicolon before open square bracket.
- ;;
- ;; Open square bracket for array indexing cannot appear at the start of a
- ;; line.
- ;;
https://github.com/apple/swift/blob/8d4b1cc3c47c7624d57f188d5b227152ccb03163/lib/Parse/ParseExpr.cpp#L1525
- ;;
- ;; Note that the following pattern (i.e. after binary-operator) is handled
- ;; by above case.
- ;;
- ;; let x =
- ;; [
- ;; 1
- ;; ]
- ((eq (swift-mode:token:type next-token) '\[) t)
-
- ;; Inserts implicit semicolon before open parenthesis, unless it is a
- ;; function parameter clause. Suppress implicit semicolon before function
- ;; parameter clause.
- ;;
- ;; Open parenthesis for function arguments cannot appear at the start of a
- ;; line.
- ;;
https://github.com/apple/swift/blob/8d4b1cc3c47c7624d57f188d5b227152ccb03163/lib/Parse/ParseExpr.cpp#L1251
- ;;
- ;; Note that the following pattern (i.e. after binary-operator) is handled
- ;; by above case.
- ;;
- ;; let x =
- ;; (
- ;; 1
- ;; )
- ((eq (swift-mode:token:type next-token) '\()
- (not (swift-mode:function-parameter-clause-p)))
-
- ;; Suppress implicit semicolon after the beginning of an interpolated
- ;; expression.
- ((eq (swift-mode:token:type previous-token)
- 'string-chunk-before-interpolated-expression)
- nil)
-
- ;; Otherwise, inserts implicit semicolon.
- (t t))))
+ ;; Suppress implicit semicolon after keywords that behave like method
+ ;; names.
+ ;;
+ ;; Note that binary operators take precedence over this:
+ ;;
+ ;; self . // not insert semicolon here
+ ;; init
+ ;;
+ ;; var x {
+ ;; set // not insert semicolon here
+ ;; (x) {
+ ;; }
+ ;; }
+ ;;
+ ;; var x {
+ ;; set // inserts semicolon here
+ ;; {
+ ;; }
+ ;; }
+ ((member (swift-mode:token:text previous-token)
+ '("set" "willSet" "didSet" "subscript" "init" "deinit"))
+ nil)
+
+ ;; Inserts implicit semicolon before open square bracket.
+ ;;
+ ;; Open square bracket for array indexing cannot appear at the start of a
+ ;; line.
+ ;;
https://github.com/apple/swift/blob/8d4b1cc3c47c7624d57f188d5b227152ccb03163/lib/Parse/ParseExpr.cpp#L1525
+ ;;
+ ;; Note that the following pattern (i.e. after binary-operator) is handled
+ ;; by above case.
+ ;;
+ ;; let x =
+ ;; [
+ ;; 1
+ ;; ]
+ ((eq (swift-mode:token:type next-token) '\[) t)
+
+ ;; Inserts implicit semicolon before open parenthesis, unless it is a
+ ;; function parameter clause. Suppress implicit semicolon before function
+ ;; parameter clause.
+ ;;
+ ;; Open parenthesis for function arguments cannot appear at the start of a
+ ;; line.
+ ;;
https://github.com/apple/swift/blob/8d4b1cc3c47c7624d57f188d5b227152ccb03163/lib/Parse/ParseExpr.cpp#L1251
+ ;;
+ ;; Note that the following pattern (i.e. after binary-operator) is handled
+ ;; by above case.
+ ;;
+ ;; let x =
+ ;; (
+ ;; 1
+ ;; )
+ ((eq (swift-mode:token:type next-token) '\()
+ (not (swift-mode:function-parameter-clause-p)))
+
+ ;; Suppress implicit semicolon after the beginning of an interpolated
+ ;; expression.
+ ((eq (swift-mode:token:type previous-token)
+ 'string-chunk-before-interpolated-expression)
+ nil)
+
+ ;; Otherwise, inserts implicit semicolon.
+ (t t))))
(defun swift-mode:function-parameter-clause-p ()
"Return t if the cursor is before a function parameter clause.
- [nongnu] elpa/swift-mode 0b1f29d 334/496: Fix indentation of setter, (continued)
- [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
- [nongnu] elpa/swift-mode 56e21f8 427/496: Simplify autoloads, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 922dc52 445/496: Fix code format,
ELPA Syncer <=
- [nongnu] elpa/swift-mode b260308 451/496: Declare local variables, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1268425 455/496: Add links to various formatters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a84f5c8 460/496: Support multi-parttern catch clauses, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode edec7d5 471/496: Suppress a doccheck warning for old versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b93b97e 466/496: Bump version to 8.1.1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0bc8d8d 477/496: Use isAvailable when reading simctl device JSON, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 800efe2 496/496: Fix tags of customization, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 370caa7 494/496: Update copyright notices, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 69b8934 080/496: Update readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 37fb4d0 119/496: Release 0.2.0, ELPA Syncer, 2021/08/29