Skip to content

Commit a73eb26

Browse files
committed
Fix #135: Idnetify package names in extension clause
1 parent bca5480 commit a73eb26

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "scala",
33
"displayName": "Scala Syntax (official)",
44
"description": "Official Scala Syntax",
5-
"version": "0.4.1",
5+
"version": "0.4.2",
66
"publisher": "scala-lang",
77
"license": "SEE LICENSE IN LICENSE.md",
88
"engines": {

src/typescript/Scala.tmLanguage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ export const scalaTmLanguage: TmLanguage = {
992992
inheritance: {
993993
patterns: [
994994
{
995-
match: `(extends|with|derives)\\s+(${plainid}|${backQuotedId}|(?=\\([^\\)]+=>)|(?="))`,
995+
match: `(extends|with|derives)\\s+(${idUpper}|${backQuotedId}|(?=\\([^\\)]+=>)|(?=${plainid})|(?="))`,
996996
captures: {
997997
'1': {
998998
name: 'keyword.declaration.scala'

tests/unit/#135.test.scala

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SYNTAX TEST "source.scala"
2+
3+
class Foo extends scala.collection.Seq[Int]
4+
// ^^^^^ keyword.declaration.scala
5+
// ^^^ entity.name.class.declaration
6+
// ^^^^^^^ keyword.declaration.scala
7+
// ^^^^^ source.scala
8+
// ^^^^^^^^^^ source.scala
9+
// ^^^ entity.name.class
10+
// ^ meta.bracket.scala
11+
// ^^^ entity.name.class
12+
// ^ meta.bracket.scala

0 commit comments

Comments
 (0)