Skip to content

Commit 044ea66

Browse files
committed
Fix examples from the documentation
With this the examples from [the documentation](https://docs.scala-lang.org/tour/operators.html) work.
1 parent 502446d commit 044ea66

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/typescript/Scala.tmLanguage.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,12 +678,12 @@ export const scalaTmLanguage: TmLanguage = {
678678
},
679679
{ // Higher precedence than other kinds of operators to prevent
680680
// decomposition of operators like ->
681-
match: `(<-|←|->|→|=>|⇒|\\?|\\:|@)+${opchar}*`,
681+
match: `(<-|←|->|→|=>|⇒|\\?|\\:|@|\\^)+${opchar}*`,
682682
name: 'keyword.operator.scala'
683683
},
684-
{ // Arithmetic operators directly follower by another symbol are
685-
// just operators like +:, /:, ++
686-
match: `(\\-|\\+|\\*|/(?![/*])|%|~)${opchar}+`,
684+
{ // The 'special' below operators directly follower by another symbol
685+
// are just operators for example +:, /:, ++ and ==>
686+
match: `(\\-|\\+|\\*|/(?![/*])|%|~|==|!=|<=|>=|<>)${opchar}+`,
687687
name: 'keyword.operator.scala'
688688
},
689689
{

0 commit comments

Comments
 (0)