Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix identifers in package/import declarations

  • Loading branch information...
commit 1054a3bcfbfbac71fb5daf3fa3ccd4372e1c6996 1 parent fa5cb91
Curt Sellmer authored
Showing with 34 additions and 13 deletions.
  1. +34 −13 Syntaxes/Scala.tmLanguage
47 Syntaxes/Scala.tmLanguage
View
@@ -471,35 +471,56 @@
<key>1</key>
<dict>
<key>name</key>
- <string>keyword.declaration.scala</string>
+ <string>keyword.other.scoping.scala</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
+ <string>keyword.declaration.scala</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
<string>entity.name.class.declaration</string>
</dict>
</dict>
<key>match</key>
- <string>\b(package object)\s+([^\s\{\(\[]+)</string>
+ <string>\b(package)\s+(object)\s+([^\s\{\(\[]+)</string>
</dict>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>\b(package)\s+</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>keyword.other.scoping.scala</string>
+ <string>keyword.other.import.scala</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(?&lt;=[\n;])</string>
+ <key>name</key>
+ <string>meta.package.scala</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
</dict>
- <key>2</key>
<dict>
+ <key>match</key>
+ <string>(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*)</string>
<key>name</key>
<string>entity.name.package.scala</string>
</dict>
- </dict>
- <key>match</key>
- <string>\b(package)\s+([\w\.]+)</string>
- <key>name</key>
- <string>meta.package.scala</string>
+ <dict>
+ <key>match</key>
+ <string>\.</string>
+ <key>name</key>
+ <string>punctuation.definition.package</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>
@@ -542,7 +563,7 @@
</dict>
<dict>
<key>match</key>
- <string>([^\s{;.]+)\s*</string>
+ <string>(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*)</string>
<key>name</key>
<string>variable.import.scala</string>
</dict>
@@ -598,9 +619,9 @@
</dict>
<key>match</key>
<string>(?x) \s*
- ([^\s.,}]+) \s*
+ (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) \s*
(=&gt;) \s*
- ([^\s.,}]+) \s*
+ (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) \s*
</string>
</dict>
<dict>
Please sign in to comment.
Something went wrong with that request. Please try again.