From 7a0825f100e2ad68e891f941cee1bf346f2c2fb8 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 1 Jul 2020 15:55:20 +0200 Subject: [PATCH] Support `end extension` --- src/typescript/Scala.tmLanguage.ts | 2 +- tests/unit/#107.test.scala | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/typescript/Scala.tmLanguage.ts b/src/typescript/Scala.tmLanguage.ts index 0077f99..77dfbe0 100644 --- a/src/typescript/Scala.tmLanguage.ts +++ b/src/typescript/Scala.tmLanguage.ts @@ -490,7 +490,7 @@ export const scalaTmLanguage: TmLanguage = { name: 'keyword.control.flow.end.scala' }, { - match: `^\\s*(end)\\s+(?:(new)|(${idUpper}))${endOfLineMaybeWithComment}`, + match: `^\\s*(end)\\s+(?:(new|extension)|(${idUpper}))${endOfLineMaybeWithComment}`, captures: { '1': { name: 'keyword.declaration.end.scala' diff --git a/tests/unit/#107.test.scala b/tests/unit/#107.test.scala index 48b86a5..f20904b 100644 --- a/tests/unit/#107.test.scala +++ b/tests/unit/#107.test.scala @@ -7,6 +7,10 @@ // ^^^ keyword.declaration.end.scala // ^^^ keyword.declaration.end.scala + end extension +// ^^^ keyword.declaration.end.scala +// ^^^^^^^^^ keyword.declaration.end.scala + end if // ^^^ keyword.control.flow.end.scala // ^^ keyword.control.flow.end.scala