[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 41d38bd 117/496: Clarify syntax table for synta
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 41d38bd 117/496: Clarify syntax table for syntactic fontification. |
Date: |
Sun, 29 Aug 2021 11:33:19 -0400 (EDT) |
branch: elpa/swift-mode
commit 41d38bde60abf20f948483f338669e3747fbbb9f
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>
Clarify syntax table for syntactic fontification.
Remove comment about rust-mode.
---
swift-mode.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/swift-mode.el b/swift-mode.el
index 4447b58..4f9b4b5 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -546,27 +546,33 @@ You can send text to the REPL process from other buffers
containing source.
;;; Mode definition
-;; HACK: This syntax table is lifted directly from `rust-mode'. There may be
-;; corner cases in the Swift syntax that are not accounted for.
(defvar swift-mode-syntax-table
(let ((table (make-syntax-table)))
;; Operators
- (dolist (i '(?+ ?- ?* ?/ ?& ?| ?^ ?! ?< ?> ?~ ?@))
+ (dolist (i '(?+ ?- ?* ?/ ?& ?| ?^ ?! ?< ?> ?~))
(modify-syntax-entry i "." table))
;; Strings
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?\\ "\\" table)
- ;; _ is a word-char
- (modify-syntax-entry ?_ "w" table)
+ ;; Additional symbols
+ (modify-syntax-entry ?_ "-" table)
+ (modify-syntax-entry ?: "_" table)
;; Comments
(modify-syntax-entry ?/ ". 124b" table)
(modify-syntax-entry ?* ". 23" table)
(modify-syntax-entry ?\n "> b" table)
- (modify-syntax-entry ?\^m "> b" table)
+
+ ;; Parenthesis, braces and brackets
+ (modify-syntax-entry ?\( "()" table)
+ (modify-syntax-entry ?\) ")(" table)
+ (modify-syntax-entry ?\{ "(}" table)
+ (modify-syntax-entry ?\} "){" table)
+ (modify-syntax-entry ?\[ "(]" table)
+ (modify-syntax-entry ?\] ")[" table)
table))
- [nongnu] elpa/swift-mode 0bf214b 030/496: Update readme, (continued)
- [nongnu] elpa/swift-mode 0bf214b 030/496: Update readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cb745d5 029/496: Define basic indentation command., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0344f63 036/496: Merge pull request #11 from bbatsov/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 89ce39c 050/496: Format file sections, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0f99a5a 067/496: Tweak docstring to supress checkdoc error, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 821d9af 064/496: Make switch-case indent offset customisable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode bbd8f91 096/496: Add tests for all implemented smie grammars, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cfbc318 092/496: Merge pull request #24 from ap4y/fix_paragraph_movements, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a8fa421 086/496: Use a more descriptive map variable name inside its definition, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0c908ad 103/496: Remove an outdated statement about the indentation code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 41d38bd 117/496: Clarify syntax table for syntactic fontification.,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 18e1e4a 107/496: Highlight attributes as keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 98556c1 120/496: Start work on version 0.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8be19fb 108/496: Highlight self and super as keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3caacf3 007/496: Highlight attributes and _ wildcards, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c8f1dbd 014/496: Update readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode adb3c13 039/496: Restore Emacs 24.1 requirement, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ab5e170 044/496: Add a few links, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a44a755 052/496: Add docstrings for internal indent commands, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 62276c3 061/496: Indent cases in enums, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e168b34 128/496: Don't use implicit semicolon for multi-line dot expressions, ELPA Syncer, 2021/08/29