Skip to content

Commit efaf1bb

Browse files
Merge pull request #232 from barklan/fix/exceptionEndHighlight
fix(syntax): add missing highlight for end try
2 parents bcf0f33 + 5f9ab47 commit efaf1bb

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/typescript/Scala.tmLanguage.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,14 @@ export const scalaTmLanguage: TmLanguage = {
622622
}
623623
}
624624
},
625+
{
626+
match: '\\b(catch|finally|try)\\b',
627+
name: 'keyword.control.exception.scala'
628+
},
629+
{
630+
match: `^\\s*(end)\\s+(try)${endOfLineMaybeWithComment}`,
631+
name: 'keyword.control.exception.end.scala'
632+
},
625633
{
626634
match: `^\\s*(end)\\s+(${backQuotedId}|${plainid})?${endOfLineMaybeWithComment}`,
627635
captures: {
@@ -633,10 +641,6 @@ export const scalaTmLanguage: TmLanguage = {
633641
}
634642
}
635643
},
636-
{
637-
match: '\\b(catch|finally|try)\\b',
638-
name: 'keyword.control.exception.scala'
639-
},
640644
{
641645
match: '(==?|!=|<=|>=|<>|<|>)',
642646
name: 'keyword.operator.comparison.scala'

0 commit comments

Comments
 (0)