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

[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.



reply via email to

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