diff --git a/CHANGES.md b/CHANGES.md
index 112ed8561b..96dfc0bd69 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -18,6 +18,7 @@ Grammars:
- enh(scala) add missing `do` and `then` keyword (#3323) [Nicolas Stucki][]
- enh(scala) add missing `enum`, `export` and `given` keywords (#3328) [Nicolas Stucki][]
- enh(scala) remove symbol syntax and fix quoted code syntax (#3324) [Nicolas Stucki][]
+- enh(scala) add `inline` soft keyword (#3329) [Nicolas Stucki][]
[Austin Schick]: https://github.com/austin-schick
[Josh Goebel]: https://github.com/joshgoebel
diff --git a/src/languages/scala.js b/src/languages/scala.js
index ae84bff1f5..65dfa9240c 100644
--- a/src/languages/scala.js
+++ b/src/languages/scala.js
@@ -112,6 +112,16 @@ export default function(hljs) {
contains: [ NAME ]
};
+ // TODO: use negative look-behind in future
+ // /(?inline def pow(inline x: Int, inline n: Int) = ???
+transparent inline def f: Int = ???
+inline val a: Int = 9
+inline given Int = 9
+
+notinline given Int = 9
+
+def expressions =
+ inline if true then () else ()
+ inline x match ...
+
+ x.inline
+ x.inline(y)
+ x.inline[T]
+ `inline` + 1
diff --git a/test/markup/scala/inline.txt b/test/markup/scala/inline.txt
new file mode 100644
index 0000000000..857b82ac8c
--- /dev/null
+++ b/test/markup/scala/inline.txt
@@ -0,0 +1,15 @@
+inline def pow(inline x: Int, inline n: Int) = ???
+transparent inline def f: Int = ???
+inline val a: Int = 9
+inline given Int = 9
+
+notinline given Int = 9
+
+def expressions =
+ inline if true then () else ()
+ inline x match ...
+
+ x.inline
+ x.inline(y)
+ x.inline[T]
+ `inline` + 1