Skip to content

Commit abc2a56

Browse files
authored
Merge pull request #44 from pleira/master
Improve unicode support in Scala.
2 parents 2b64d3b + e572447 commit abc2a56

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

grammars/scala.cson

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
'name': 'keyword.declaration.scala'
317317
'2':
318318
'name': 'entity.name.function.declaration'
319-
'match': '(?x)\n\t\t\t\t\t\t\\b(def)\\s+\n\t\t\t\t\t\t(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\s])(?=[(\\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\\\]+)'
319+
'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]*|[-?~><^+*%:!#|/@\\\\]+)'
320320
}
321321
{
322322
'captures':
@@ -334,7 +334,7 @@
334334
'name': 'keyword.declaration.scala'
335335
'2':
336336
'name': 'entity.name.type.declaration'
337-
'match': '\\b(type)\\s+(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\s])(?=[\\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\\\]+)'
337+
'match': '\\b(type)\\s+(`[^`]+`|[_$\\p{L}][_$a-z\\p{L}]*(?:_[^\\s])(?=[\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)'
338338
}
339339
{
340340
'captures':
@@ -344,7 +344,7 @@
344344
'name': 'keyword.declaration.volatile.scala'
345345
'3':
346346
'name': 'entity.name.val.declaration'
347-
'match': '\\b(?:(val)|(var))\\s+(?:(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\s])(?=[\\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\\\]+)|(?=\\())'
347+
'match': '\\b(?:(val)|(var))\\s+(?:(`[^`]+`|[_$\\p{L}][_$\\p{L}0-9]*(?:_[^\\s])(?=[\\t ])|[_$\\p{L}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)|(?=\\())'
348348
}
349349
{
350350
'captures':
@@ -494,8 +494,8 @@
494494
'name': 'variable.parameter.scala'
495495
'2':
496496
'name': 'meta.colon.scala'
497-
'comment': 'We do not match param names that start with a Capitol letter'
498-
'match': '(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_$a-z][_$a-zA-Z0-9]*(?:_[^\\s])(?=[\\t ])|[_$a-z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\\\]+)\\s*(:)\\s+'
497+
'comment': 'We do not match param names that start with a Capital letter'
498+
'match': '(?<=[^\\._$\\p{L}0-9])(`[^`]+`|[_$\\p{Ll}][_$\\p{L}0-9]*(?:_[^\\s])(?=[\\t ])|[_$\\p{Ll}][_$\\p{L}0-9]*|[-?~><^+*%:!#|/@\\\\]+)\\s*(:)\\s+'
499499
}
500500
]
501501
'qualifiedClassName':

0 commit comments

Comments
 (0)