branch: elpa/swift-mode commit c51eaf824422c8e39d13738ff1ecfe8dc51bcf67 Author: uk-ar <yuuki....@gmail.com> Commit: uk-ar <yuuki....@gmail.com>
Fix token for ! & ? --- swift-mode.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index 451e6f8..3570651 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -218,7 +218,7 @@ "<<" ">>" "??"))) (defvar swift-smie--decl-specifier-regexp - "\\(?1:class\\|mutating\\|override\\|static\\|unowned\\|weak\\)") + "\\(?1:mutating\\|override\\|static\\|unowned\\|weak\\)") (defvar swift-smie--access-modifier-regexp (regexp-opt '("private" "public" "internal"))) @@ -350,6 +350,10 @@ (goto-char (match-beginning 0)) (if (looking-back "[[:space:]]" 1 t) "OP" "T>")) + ((looking-back (regexp-opt swift-mode--type-decl-keywords) (- (point) 9) t) + (goto-char (match-beginning 0)) + (match-string-no-properties 0)) + ((looking-back swift-smie--operators-regexp (- (point) 3) t) (goto-char (match-beginning 0)) "OP") @@ -762,7 +766,7 @@ You can send text to the REPL process from other buffers containing source. (let ((table (make-syntax-table))) ;; Operators - (dolist (i '(?+ ?- ?* ?/ ?& ?| ?^ ?! ?< ?> ?~)) + (dolist (i '(?+ ?- ?* ?/ ?& ?| ?^ ?< ?> ?~)) (modify-syntax-entry i "." table)) ;; Strings @@ -771,6 +775,8 @@ You can send text to the REPL process from other buffers containing source. ;; Additional symbols (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?? "_" table) + (modify-syntax-entry ?! "_" table) (modify-syntax-entry ?: "_" table) ;; Comments