branch: elpa/swift-mode commit d6483e1729d25c050d7d3f63fb51a38c9e84e23f Author: ap4y <l...@pisem.net> Commit: ap4y <l...@pisem.net>
Add ?? to the lexer rule for operators --- swift-mode.el | 2 +- test/indentation-tests.el | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/swift-mode.el b/swift-mode.el index 967e8d2..96a0b37 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -200,7 +200,7 @@ "is" "as" "as?" ".." "..." "+" "-" "&+" "&-" "|" "^" "*" "/" "%" "&*" "&/" "&%" "&" - "<<" ">>"))) + "<<" ">>" "??"))) (defvar swift-smie--decl-specifier-regexp (rx (? (or "class" "mutating" "override" "static" "unowned" "weak")) diff --git a/test/indentation-tests.el b/test/indentation-tests.el index 39ada7c..f5abdfd 100644 --- a/test/indentation-tests.el +++ b/test/indentation-tests.el @@ -1156,6 +1156,15 @@ CGPoint(x: aaaaaaaaaaaaaaa.x + bbbbbbbbbbbbbbbb) ") +(check-indentation indents-multiline-expressions/20 + " +let x = foo ?? + |bar +" " +let x = foo ?? + |bar +") + (check-indentation indents-long-parameters/1 " func foo() {