Skip to content

Commit e804377

Browse files
authored
Merge pull request #42 from trepidacious/master
Add missing symbolic operator characters. Remove non-keywords.
2 parents f3f5d58 + 8a7d5ba commit e804377

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

grammars/scala.cson

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
'name': 'keyword.declaration.scala'
318318
'2':
319319
'name': 'entity.name.function.declaration'
320-
'match': '(?x)\n\t\t\t\t\t\t\\b(def)\\s+\n\t\t\t\t\t\t(`[^`]+`|[_$\\p{L}][_$\\p{L}0-9]*(?:_[^\\s])(?=[(\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)'
320+
'match': '(?x)\n\t\t\t\t\t\t\\b(def)\\s+\n\t\t\t\t\t\t(`[^`]+`|[_$\\p{L}][_$\\p{L}0-9]*(?:_[^\\s])(?=[(\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[!#%&*+\-/:<=>?@\\\\^|~]+)'
321321
}
322322
{
323323
'captures':
@@ -335,7 +335,7 @@
335335
'name': 'keyword.declaration.scala'
336336
'2':
337337
'name': 'entity.name.type.declaration'
338-
'match': '\\b(type)\\s+(`[^`]+`|[_$\\p{L}][_$a-z\\p{L}]*(?:_[^\\s])(?=[\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)'
338+
'match': '\\b(type)\\s+(`[^`]+`|[_$\\p{L}][_$a-z\\p{L}]*(?:_[^\\s])(?=[\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[!#%&*+\-/:<=>?@\\\\^|~]+)'
339339
}
340340
{
341341
'captures':
@@ -345,7 +345,7 @@
345345
'name': 'keyword.declaration.volatile.scala'
346346
'3':
347347
'name': 'entity.name.val.declaration'
348-
'match': '\\b(?:(val)|(var))\\s+(?:(`[^`]+`|[_$\\p{L}][_$\\p{L}0-9]*(?:_[^\\s])(?=[\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)|(?=\\())'
348+
'match': '\\b(?:(val)|(var))\\s+(?:(`[^`]+`|[_$\\p{L}][_$\\p{L}0-9]*(?:_[^\\s])(?=[\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[!#%&*+\-/:<=>?@\\\\^|~]+)|(?=\\())'
349349
}
350350
{
351351
'captures':
@@ -455,20 +455,16 @@
455455
'name': 'keyword.control.exception.scala'
456456
}
457457
{
458-
'match': '(<-|←|->>|->|→|=>|⇒|~>|>>=|\\?|\\:+|@|\\|)+'
459-
'name': 'keyword.operator.scala'
460-
}
461-
{
462-
'match': '\\b(===|==|=|!=|<=|>=|<>|<|>)\\b'
463-
'name': 'keyword.operator.comparison.scala'
464-
}
465-
{
466-
'match': '(\\-|\\+|\\*|/(?![/*])|%|~)'
467-
'name': 'keyword.operator.arithmetic.scala'
458+
'captures':
459+
'2':
460+
'name': 'keyword.operator.scala'
461+
'match': '([^!#%&*+\-/:<=>?@\\\\^|~_])(<-|←|->|→|=>|⇒|\\?|\\:+|@|\\|)+([^!#%&*+\-/:<=>?@\\\\^|~])'
468462
}
469463
{
470-
'match': '(!|&&|\\|\\|)'
471-
'name': 'keyword.operator.logical.scala'
464+
'captures':
465+
'2':
466+
'name': 'keyword.operator.assignment.scala'
467+
'match': '([^!#%&*+\-/:<=>?@\\\\^|~_])(=)([^!#%&*+\-/:<=>?@\\\\^|~])'
472468
}
473469
]
474470
'meta-brackets':
@@ -496,7 +492,7 @@
496492
'2':
497493
'name': 'meta.colon.scala'
498494
'comment': 'We do not match param names that start with a Capital letter'
499-
'match': '(?<=[^\\._$\\p{L}0-9])(`[^`]+`|[_$\\p{Ll}][_$\\p{L}0-9]*(?:_[^\\s])(?=[\\t ])|[_$\\p{Ll}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)\\s*(:)\\s+'
495+
'match': '(?<=[^\\._$\\p{L}0-9])(`[^`]+`|[_$\\p{Ll}][_$\\p{L}0-9]*(?:_[^\\s])(?=[\\t ])|[_$\\p{Ll}][_$\\p{L}0-9]*|[!#%&*+\-/:<=>?@\\\\^|~]+)\\s*(:)\\s+'
500496
}
501497
]
502498
'qualifiedClassName':

0 commit comments

Comments
 (0)