[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode a1ff6f3 202/217: feat: add Scala 3 keywords
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode a1ff6f3 202/217: feat: add Scala 3 keywords |
Date: |
Sun, 29 Aug 2021 11:31:12 -0400 (EDT) |
branch: elpa/scala-mode
commit a1ff6f38b6d5e3585ade3d466cdd6cc147ba7436
Author: Keith Pinson <keith.pinson@banno.com>
Commit: Keith Pinson <keith.pinson@banno.com>
feat: add Scala 3 keywords
Based on [the docs](https://dotty.epfl.ch/docs/internals/syntax.html).
1. Scala 3 is not perfectly backwards compatible, but is significantly
backwards
compatible, with Scala 2. Therefore, it seems reasonable at a syntax
level to
begin with the assumption that they are sufficiently compatible that we
can
just start migrating towards the grammar of Scala 3.
2. Scala 3 has reserved more keywords. Arguably it's a benefit, even if you
are
writing Scala 2 code, to be made aware of the Scala 3 keywords by way of
syntax highlighting. That way you have an opportunity to rename your
variables before ever upgrading to 3.
3. The lack of highlighting new keywords is probably the most obvious lack
of
highlighting w.r.t. to the new syntax; i.e., this is a "do 20%, get 80%"
scenario.
Overall this seems to me like a fairly simple and safe step toward adopting
Scala 3 syntax.
---
scala-mode-syntax.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scala-mode-syntax.el b/scala-mode-syntax.el
index 1817868..6d65008 100644
--- a/scala-mode-syntax.el
+++ b/scala-mode-syntax.el
@@ -283,11 +283,12 @@
(concat "\\(^\\|[^`'_]\\)\\(" scala-syntax:value-keywords-unsafe-re "\\)"))
(defconst scala-syntax:other-keywords-unsafe-re
- (regexp-opt '("abstract" "case" "catch" "class" "def" "do" "else" "extends"
- "final" "finally" "for" "forSome" "if" "implicit" "import"
- "lazy" "match" "new" "object" "override" "package" "private"
- "protected" "return" "sealed" "throw" "trait" "try" "type"
- "val" "var" "while" "with" "yield" "inline") 'words))
+ (regexp-opt '("abstract" "case" "catch" "class" "def" "do" "else" "enum"
+ "export" "extends" "final" "finally" "for" "given" "forSome"
+ "if" "implicit" "import" "lazy" "match" "new" "object"
+ "override" "package" "private" "protected" "return" "sealed"
+ "then" "throw" "trait" "try" "type" "val" "var" "while"
+ "with" "yield" "inline") 'words))
(defconst scala-syntax:other-keywords-re
(concat "\\(^\\|[^`'_]\\)\\(" scala-syntax:other-keywords-unsafe-re "\\)"))
- [nongnu] elpa/scala-mode 34888c0 142/217: Update README.md, (continued)
- [nongnu] elpa/scala-mode 34888c0 142/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f03a582 141/217: Merge pull request #83 from ancane/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 461f9a5 134/217: Fix issue #63 and names with _ and reserved word, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ababc73 151/217: remove interactive, update filename., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 27efa44 019/217: updated README, added LICENSE, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d6f8cee 135/217: scala 2.10 preamble, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 03cfbe4 148/217: Add types to index items., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ed645d2 153/217: move create index function for imenu to big setq with everything else., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 618f0fb 163/217: remove 'scala-indent:indent-on-parentheses in preference of smartparens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 56cba29 194/217: Fix bad syntax when `*/` is prefixed by an opcode. (#143), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a1ff6f3 202/217: feat: add Scala 3 keywords,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 46bb948 198/217: Fix #155, remove ob-scala.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a2a1b1d 208/217: compile mode with sbt thin client, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 54fa36f 200/217: Merge pull request #159 from kpbochenek/fix-files-association-alist, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5058a85 204/217: doc: clarify Scala versions supported, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0c5ed9e 022/217: deleted example files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 61a511f 021/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode fe5c2c4 031/217: Fixes #11: was still using the slow regexp, not faster, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1a3d958 029/217: forward/backward-sexp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e30b35a 008/217: Indentation working, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 59cdd94 074/217: Add `scala-indent:use-javadoc-style` defcustom., ELPA Syncer, 2021/08/29