Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
made all rust operators tokenize as unit
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Nov 23, 2015
1 parent 7a9e1d8 commit ce3fff7
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions grammars/rust.cson
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,29 @@
{ 'include': '#ref_lifetime' }
# Operators
{
'comment': 'Operator'
'name': 'keyword.operator.rust'
'match': '(\\+|-|/|\\*|=|<=|>=|\\^|&|\\||!|%|::|\\bas\\b|<<|>>|>|<)'
'comment': 'Miscellaneous operator'
'name': 'keyword.operator.misc.rust'
'match': '(=>|::|\\bas\\b)'
}
{
'comment': 'Comparison operator'
'name': 'keyword.operator.comparison.rust'
'match': '(&&|\\|\\||==|!=)'
}
{
'comment': 'Assignment operator'
'name': 'keyword.operator.assignment.rust'
'match': '(\\+=|-=|/=|\\*=|%=|\\^=|&=|\\|=|<<=|>>=|=)'
}
{
'comment': 'Arithmetic operator'
'name': 'keyword.operator.arithmetic.rust'
'match': '(\\+|-|/|\\*|%|\\^|&|\\||<<|>>)'
}
{
'comment': 'Comparison operator'
'name': 'keyword.operator.comparison.rust'
'match': '(<=|>=|<|>)'
}
# Standard types and traits
{ 'include': '#core_types' }
Expand Down

0 comments on commit ce3fff7

Please sign in to comment.