Skip to content

Commit

Permalink
Fix #84: Support with followed by a String literal
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Jun 29, 2020
1 parent 5f79e18 commit c445656
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/typescript/Scala.tmLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ export const scalaTmLanguage: TmLanguage = {
inheritance: {
patterns: [
{
match: '(extends|with|derives)\\s+([^\\s\\(\\{\\[\\]\\)\\};]+|(?=\\([^\\)]+=>))',
match: '(extends|with|derives)\\s+([^\\s\\(\\{\\[\\]\\)\\};"]+|(?=\\([^\\)]+=>)|(?="))',
captures: {
'1': {
name: 'keyword.declaration.scala'
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/#84.test.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SYNTAX TEST "source.scala"


Type[A with "user provided string" with B]
// ^ entity.name.class
// ^^^^ keyword.declaration.scala
// ^ string.quoted.double.scala punctuation.definition.string.begin.scala
// ^^^^^^^^^^^^^^^^^^^^ string.quoted.double.scala
// ^ string.quoted.double.scala punctuation.definition.string.end.scala
// ^^^^ keyword.declaration.scala
// ^ entity.other.inherited-class.scala

0 comments on commit c445656

Please sign in to comment.