]> git.r.bdr.sh - rbdr/api-notation.tmLanguage/commitdiff
Fixes language files so they work on sublime
authorBen Beltran <redacted>
Sat, 5 Sep 2015 20:35:21 +0000 (15:35 -0500)
committerBen Beltran <redacted>
Sat, 5 Sep 2015 20:35:21 +0000 (15:35 -0500)
api-notation.YAML-tmLanguage
api-notation.tmLanguage

index e1f84624d569143a9b7ce39a5eb85b8312e3e35e..d7312523e0c47a1f0f41304a81a0814127cb6512 100644 (file)
@@ -5,13 +5,16 @@ scopeName: source.api-notation
 fileTypes: ['api']
 uuid: fc8dc5cf-b7aa-4b64-a665-80e8dc1b2553
 patterns:
-  - begin: '^([a-zA-Z0-9_.]+)'
+  - begin: '([a-zA-Z0-9_.]+)'
     end: '\n'
     name: constant.language
     patterns:
       - include: '#dataTypes'
       - include: '#comment'
-  - begin: '[ \t]*'
+  - begin: '^//.*'
+    end: '\n'
+    name: 'comment.line'
+  - begin: '[ \t]+'
     end: '\n'
     patterns:
       - include: '#apiMember'
@@ -26,15 +29,15 @@ patterns:
       - include: '#comment'
 repository:
   dataTypes:
-    begin: '\\<'
-    end: '\\>'
+    begin: '\<'
+    end: '\>'
     name: 'keyword.operator'
     patterns:
       - include: '#dataType'
       - include: '#separators'
   parameterList:
-    begin: '\\('
-    end: '\\)'
+    begin: '\('
+    end: '\)'
     name: 'keyword.operator'
     patterns:
       - 'include': '#parameters'
@@ -48,18 +51,18 @@ repository:
     match: '[a-zA-Z0-9_.]+'
     name: 'string.other'
   optionalParameters:
-    begin: '\\['
-    end: '\\]'
+    begin: '\['
+    end: '\]'
     patterns:
       - 'include': '#optionalParameter'
   optionalParameter:
     match: '[a-zA-Z0-9_.]+'
-    name: 'meta.separator'
+    name: 'comment.line'
   separators:
-    match: '\\||,'
+    match: '\||,'
     name: 'comment.line'
   apiMember:
-    match: '((?:<\\+)|(?:<\\~)|(?:<\\-)|(?:\\+>)|(?:\\~>)|(?:\\->)|\\-|\\+|(?:::)|#)([a-zA-z0-9_]+)'
+    match: '((?:<\+)|(?:<\~)|(?:<\-)|(?:\+>)|(?:\~>)|(?:\->)|\-|\+|(?:::)|#)([a-zA-z0-9_]+)'
     captures:
       '1':
         name: 'keyword.control'
@@ -69,5 +72,5 @@ repository:
     match: '[ \t]*//[ \t]*.*'
     name: 'comment.line'
   operators:
-    match: '(?:\\->)|(?:\\=>)'
+    match: '(?:\->)|(?:\=>)'
     name: 'keyword.control'
\ No newline at end of file
index a7200de33259fe600a23ba6e4df16024d6baf42b..e546929e10d0a4681bfdd9b4c301a264aff5f70d 100644 (file)
@@ -12,7 +12,7 @@
        <array>
                <dict>
                        <key>begin</key>
-                       <string>^([a-zA-Z0-9_.]+)</string>
+                       <string>([a-zA-Z0-9_.]+)</string>
                        <key>end</key>
                        <string>\n</string>
                        <key>name</key>
                </dict>
                <dict>
                        <key>begin</key>
-                       <string>[ \t]*</string>
+                       <string>^//.*</string>
+                       <key>end</key>
+                       <string>\n</string>
+                       <key>name</key>
+                       <string>comment.line</string>
+               </dict>
+               <dict>
+                       <key>begin</key>
+                       <string>[ \t]+</string>
                        <key>end</key>
                        <string>\n</string>
                        <key>patterns</key>
                                </dict>
                        </dict>
                        <key>match</key>
-                       <string>((?:&lt;\\+)|(?:&lt;\\~)|(?:&lt;\\-)|(?:\\+&gt;)|(?:\\~&gt;)|(?:\\-&gt;)|\\-|\\+|(?:::)|#)([a-zA-z0-9_]+)</string>
+                       <string>((?:&lt;\+)|(?:&lt;\~)|(?:&lt;\-)|(?:\+&gt;)|(?:\~&gt;)|(?:\-&gt;)|\-|\+|(?:::)|#)([a-zA-z0-9_]+)</string>
                </dict>
                <key>comment</key>
                <dict>
                <key>dataTypes</key>
                <dict>
                        <key>begin</key>
-                       <string>\\&lt;</string>
+                       <string>\&lt;</string>
                        <key>end</key>
-                       <string>\\&gt;</string>
+                       <string>\&gt;</string>
                        <key>name</key>
                        <string>keyword.operator</string>
                        <key>patterns</key>
                <key>operators</key>
                <dict>
                        <key>match</key>
-                       <string>(?:\\-&gt;)|(?:\\=&gt;)</string>
+                       <string>(?:\-&gt;)|(?:\=&gt;)</string>
                        <key>name</key>
                        <string>keyword.control</string>
                </dict>
                        <key>match</key>
                        <string>[a-zA-Z0-9_.]+</string>
                        <key>name</key>
-                       <string>meta.separator</string>
+                       <string>comment.line</string>
                </dict>
                <key>optionalParameters</key>
                <dict>
                        <key>begin</key>
-                       <string>\\[</string>
+                       <string>\[</string>
                        <key>end</key>
-                       <string>\\]</string>
+                       <string>\]</string>
                        <key>patterns</key>
                        <array>
                                <dict>
                <key>parameterList</key>
                <dict>
                        <key>begin</key>
-                       <string>\\(</string>
+                       <string>\(</string>
                        <key>end</key>
-                       <string>\\)</string>
+                       <string>\)</string>
                        <key>name</key>
                        <string>keyword.operator</string>
                        <key>patterns</key>
                <key>separators</key>
                <dict>
                        <key>match</key>
-                       <string>\\||,</string>
+                       <string>\||,</string>
                        <key>name</key>
                        <string>comment.line</string>
                </dict>