Skip to content

Commit e4db3fb

Browse files
author
Andrew Laucius
committed
Highlighting ??? as an error
In Predef.scala, ??? throws a NotImplementedException and returns Nothing, making it a useful placeholder for development.
1 parent 80a16cf commit e4db3fb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

syntax/scala.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ syn match scalaInstanceHash /#/ contained nextgroup=scalaInstanceDeclaration
5858
hi link scalaInstanceDeclaration Special
5959
hi link scalaInstanceHash Type
6060

61+
syn match scalaUnimplemented /???/
62+
hi link scalaUnimplemented ERROR
63+
6164
syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/
6265
hi link scalaCapitalWord Special
6366

syntax/testfile.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class ScalaClass(i: Int = 12, b: Trait[A, Trait[B, C]]) extends B with SomeTrait
7171
where id = $id and name = ${s"$name Jr"} and age > ${age + 10}
7272
"""
7373

74+
val notImplemented = ???
75+
7476
implicit val somethingImplicit = true
7577

7678
// Ripped off from Scalaz

0 commit comments

Comments
 (0)