Skip to content

Commit a891266

Browse files
committed
Fix scala#84: Support with followed by a String literal
1 parent 6c995f9 commit a891266

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/typescript/Scala.tmLanguage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ export const scalaTmLanguage: TmLanguage = {
847847
inheritance: {
848848
patterns: [
849849
{
850-
match: '(extends|with|derives)\\s+([^\\s\\{\\[\\]]+)',
850+
match: '(extends|with|derives)\\s+([^\\s\\{\\[\\]"]+|(?="))',
851851
captures: {
852852
'1': {
853853
name: 'keyword.declaration.scala'

tests/unit/#84.test.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SYNTAX TEST "source.scala"
2+
3+
4+
Type[A with "user profided string" with B]
5+
// ^ entity.name.class
6+
// ^^^^ keyword.declaration.scala
7+
// ^ string.quoted.double.scala punctuation.definition.string.begin.scala
8+
// ^^^^^^^^^^^^^^^^^^^^ string.quoted.double.scala
9+
// ^ string.quoted.double.scala punctuation.definition.string.end.scala
10+
// ^^^^ keyword.declaration.scala
11+
// ^ entity.other.inherited-class.scala

0 commit comments

Comments
 (0)