Permalink
Browse files

Added language keyshortcut for citrus grammar, added matching for rul…

…e references and super + proper punctuation scopes for module names
  • Loading branch information...
joachimm committed Feb 11, 2011
1 parent 0bb4595 commit 81b182175af6538e2c80453f7dcbea2651432795
Showing with 38 additions and 2 deletions.
  1. +38 −2 extras/Citrus.tmbundle/Syntaxes/Citrus Grammar.tmLanguage
@@ -10,6 +10,8 @@
<string>(grammer|rule).*$</string>
<key>foldingStopMarker</key>
<string>^\s*end</string>
+ <key>keyEquivalent</key>
+ <string>^~C</string>
<key>name</key>
<string>Citrus Grammar</string>
<key>patterns</key>
@@ -43,7 +45,7 @@
</dict>
<dict>
<key>begin</key>
- <string>^\s*(grammar)\s+((?:(?:::)?[A-Z]\w*)+)</string>
+ <string>^\s*(grammar)\s+((?:(::)?[A-Z]\w*)+)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -56,6 +58,11 @@
<key>name</key>
<string>entity.name.grammar.citrus</string>
</dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.grammar.citrus</string>
+ </dict>
</dict>
<key>end</key>
<string>\bend\b</string>
@@ -88,9 +95,14 @@
<key>name</key>
<string>entity.name.module.citrus</string>
</dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.grammar.citrus</string>
+ </dict>
</dict>
<key>match</key>
- <string>\b(include)\s+((?:(?:::)?[A-Z]\w*)+)</string>
+ <string>\b(include)\s+((?:(::)?[A-Z]\w*)+)</string>
<key>name</key>
<string>meta.include.citrus</string>
</dict>
@@ -110,6 +122,8 @@
<string>entity.name.rule.citrus</string>
</dict>
</dict>
+ <key>contentName</key>
+ <string>meta.scope.rule.citrus</string>
<key>end</key>
<string>\bend\b</string>
<key>endCaptures</key>
@@ -148,6 +162,14 @@
<key>include</key>
<string>#operator</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#super</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#rule-reference</string>
+ </dict>
<dict>
<key>begin</key>
<string>\{</string>
@@ -276,6 +298,13 @@
<key>name</key>
<string>string.regexp.citrus</string>
</dict>
+ <key>rule-reference</key>
+ <dict>
+ <key>match</key>
+ <string>[a-zA-Z][a-zA-Z0-9_-]*</string>
+ <key>name</key>
+ <string>variable.other.citrus</string>
+ </dict>
<key>string</key>
<dict>
<key>patterns</key>
@@ -346,6 +375,13 @@
</dict>
</array>
</dict>
+ <key>super</key>
+ <dict>
+ <key>match</key>
+ <string>\bsuper\b</string>
+ <key>name</key>
+ <string>variable.language.citrus</string>
+ </dict>
</dict>
<key>scopeName</key>
<string>source.citrus</string>

0 comments on commit 81b1821

Please sign in to comment.