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