branch: elpa/swift-mode commit fb2f48e30dd46812698184d112a384839aecb26e Author: ap4y <l...@pisem.net> Commit: ap4y <l...@pisem.net>
Add rule for assignment expression --- swift-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index b9eb3f5..e67b33c 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -113,6 +113,7 @@ (insts (inst) (insts ";" insts)) (inst (decl) + (exp "=" exp) (tern-exp) (in-exp) (dot-exp) @@ -154,7 +155,7 @@ (if-else-if (if-body) (if-else-if "else" if-else-if)) (if-clause (if-else-if))) ;; Conflicts - '((nonassoc "{") (assoc ",") (assoc ";") (assoc ":")) + '((nonassoc "{") (assoc ",") (assoc ";") (assoc ":") (right "=")) '((assoc "in") (assoc "where") (assoc "OP")) '((assoc "else")) '((assoc ";") (assoc "ecase")) @@ -201,7 +202,7 @@ (defun swift-smie--implicit-semi-p () (save-excursion - (not (or (memq (char-before) '(?\{ ?\[ ?, ?. ?\? ?\:)) + (not (or (memq (char-before) '(?\{ ?\[ ?, ?. ?\? ?\: ?=)) (looking-at "[ \n\t]+[.?:]") (looking-back swift-smie--operators-regexp (- (point) 3) t) ))))