Skip to content

Commit

Permalink
Fix examples from the documentation
Browse files Browse the repository at this point in the history
With this the examples from
[the documentation](https://docs.scala-lang.org/tour/operators.html)
work.
  • Loading branch information
Jentsch committed Oct 9, 2024
1 parent 7db8560 commit ec31fa5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/typescript/Scala.tmLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,12 +678,12 @@ export const scalaTmLanguage: TmLanguage = {
},
{ // Higher precedence than other kinds of operators to prevent
// decomposition of operators like ->
match: `(<-|←|->|→|=>|⇒|\\?|\\:|@)+${opchar}*`,
match: `(<-|←|->|→|=>|⇒|\\?|\\:|@|\\^)+${opchar}*`,
name: 'keyword.operator.scala'
},
{ // Arithmetic operators directly follower by another symbol are
// just operators like +:, /:, ++
match: `(\\-|\\+|\\*|/(?![/*])|%|~)${opchar}+`,
{ // The 'special' below operators directly follower by another symbol
// are just operators for example +:, /:, ++ and ==>
match: `(\\-|\\+|\\*|/(?![/*])|%|~|==|!=|<=|>=|<>)${opchar}+`,
name: 'keyword.operator.scala'
},
{
Expand Down
Loading

0 comments on commit ec31fa5

Please sign in to comment.