Permalink
Browse files

* Add the compiled WDL.tmLanguage file to the repo

* Update the README with updated instructions on building the tmLanguage file, as well as other miscellaneous documentation cleanups
  • Loading branch information...
1 parent 30c838f commit 8a8c736847e3b5958b2a97af30b149846559757a @coreone coreone committed Feb 18, 2016
Showing with 352 additions and 18 deletions.
  1. +22 −18 highlighters/SublimeText/README.md
  2. +330 −0 highlighters/SublimeText/WDL.tmLanguage
@@ -1,29 +1,33 @@
-WDL Syntax Highlighter for SublimeText and TextMate +WDL Syntax Highlighter for [SublimeText][1] and TextMate
=================================================== ===================================================
-Building .tmLanguage file +Installation ([SublimeText][1])
--------------------------
-This set of instructions assumes SublimeText running on a Mac
-
-* Install SublimeText 2 or 3 (see http://www.sublimetext.com)
-* Install Package Control (see https://packagecontrol.io/installation)
-* Use Package Control to install `AAAPackageDev` (CMD+SHIFT+P | Package Control : Install Package)
-* Open the `WDL.YAML-tmLanguage` file (File | Open...)
-* Open the Command Palette (CMD+SHIFT+P)
-* Select the "AAAPackageDev: Convert (YAML,JSON, Plist) to..." option
-* This should write the `WDL.tmLanguage` file to the same directory as `WDL.YAML-tmLanguage`
-
-Installation (SublimeText)
-------------------------- --------------------------
-This set of instructions assumes SublimeText running on a Mac +This set of instructions assumes [SublimeText][1] running on a Mac
* Create a directory `~/Library/Application Support/Sublime Text 3/Packages/WDL Syntax Highlighting` * Create a directory `~/Library/Application Support/Sublime Text 3/Packages/WDL Syntax Highlighting`
* For version 2, replace *Sublime Text 3* with *Sublime Text 2* * For version 2, replace *Sublime Text 3* with *Sublime Text 2*
* Copy the `WDL.tmLanguage` file to this new directory * Copy the `WDL.tmLanguage` file to this new directory
-* Restart SublimeText, open a WDL file, enjoy! +* Restart [SublimeText][1], open a WDL file, enjoy!
-Installation (TextMate) +Installation ([TextMate][2])
-------------------------- --------------------------
-* Drag the WDL.tmLanguage generated above onto the TextMate application. +* Drag the `WDL.tmLanguage` generated above onto the [TextMate][2] application.
* This will convert it and leave you in the BundleEditor window, close the window. * This will convert it and leave you in the BundleEditor window, close the window.
* Open a WDL file, enjoy! * Open a WDL file, enjoy!
+
+Building .tmLanguage file
+-------------------------
+This repository has the `WDL.tmLanguage` file that you can use in the installation section to start using the syntax highlighter immediately. However, if you care to make changes to the current tmLanguage file, you will need to edit `WDL.YAML-tmLanguage` and then use [SublimeText][1] to recompile the `WDL.tmLanguage` file. To do this, you can use the following set of instructions (assumes [SublimeText][1] running on a Mac):
+
+* Install [SublimeText][1] 2 or 3
+* Install the [Package Control][3] package
+* Use [Package Control][3] to install `PackageDev` (CMD+SHIFT+P | Package Control : Install Package)
+* Open the `WDL.YAML-tmLanguage` file (File | Open...)
+* Open the Command Palette (CMD+SHIFT+P)
+* Select the "PackageDev: Convert (YAML,JSON, Plist) to..." option
+* This should write the `WDL.tmLanguage` file to the same directory as `WDL.YAML-tmLanguage`
+
+[1]: http://www.sublimetext.com/ "SublimeText"
+[2]: https://macromates.com/ "TextMate"
+[3]: https://packagecontrol.io/ "Package Control"
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>author</key>
+ <string>Andrew Teixeira &lt;teixeira@broadinstitute.org&gt;</string>
+ <key>fileTypes</key>
+ <array>
+ <string>wdl</string>
+ </array>
+ <key>name</key>
+ <string>WDL</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\b(?:(import|as))\b</string>
+ <key>name</key>
+ <string>keyword.control.import.wdl</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\=</string>
+ <key>name</key>
+ <string>keyword.operator.assignment.wdl</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>&lt;\=|&gt;\=|\=\=|&lt;|&gt;|\!\=</string>
+ <key>name</key>
+ <string>keyword.operator.comparison.wdl</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\+\=|-\=|\*\=|/\=|//\=|%\=|&amp;\=|\|\=|\^\=|&gt;&gt;\=|&lt;&lt;\=|\*\*\=</string>
+ <key>name</key>
+ <string>keyword.operator.assignment.augmented.wdl</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\+|\-|\*|\*\*|/|//|%|&lt;&lt;|&gt;&gt;|&amp;|\||\^|~</string>
+ <key>name</key>
+ <string>keyword.operator.arithmetic.wdl</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(true|false)\b</string>
+ <key>name</key>
+ <string>constant.language.wdl</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>input output keywords</string>
+ <key>match</key>
+ <string>\b(input|output)\b</string>
+ <key>name</key>
+ <string>support.inout.wdl</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#builtin_types</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#input_output</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#keywords</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string_quoted_single</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string_quoted_double</string>
+ </dict>
+ </array>
+ <key>repository</key>
+ <dict>
+ <key>builtin_types</key>
+ <dict>
+ <key>match</key>
+ <string>(?&lt;!\.)\b(Array|Boolean|File|Float|Int|Map|Object|String|Uri)\b</string>
+ <key>name</key>
+ <string>support.type.wdl</string>
+ </dict>
+ <key>comments</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.wdl</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(#).*$\n?</string>
+ <key>name</key>
+ <string>comment.line.number-sign.wdl</string>
+ </dict>
+ </array>
+ </dict>
+ <key>constant_placeholder</key>
+ <dict>
+ <key>match</key>
+ <string>(?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])</string>
+ <key>name</key>
+ <string>constant.other.placeholder.wdl</string>
+ </dict>
+ <key>escaped_char</key>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.hex.wdl</string>
+ </dict>
+ <key>10</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.linefeed.wdl</string>
+ </dict>
+ <key>11</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.return.wdl</string>
+ </dict>
+ <key>12</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.tab.wdl</string>
+ </dict>
+ <key>13</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.vertical-tab.wdl</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.octal.wdl</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.newline.wdl</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.backlash.wdl</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.double-quote.wdl</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.single-quote.wdl</string>
+ </dict>
+ <key>7</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.bell.wdl</string>
+ </dict>
+ <key>8</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.backspace.wdl</string>
+ </dict>
+ <key>9</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.formfeed.wdl</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(\\x[0-9a-fA-F]{2})|(\\[0-7]{3})|(\\\n)|(\\\\)|(\\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)</string>
+ </dict>
+ <key>escaped_unicode_char</key>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.unicode.16-bit-hex.wdl</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.unicode.32-bit-hex.wdl</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>constant.character.escape.unicode.name.wdl</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})|(\\N\{[a-zA-Z0-9\, ]+\})</string>
+ </dict>
+ <key>keywords</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\s*(call|command|output|runtime|task|workflow)\s+</string>
+ <key>name</key>
+ <string>keyword.other.wdl</string>
+ </dict>
+ </array>
+ </dict>
+ <key>string_quoted_double</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(")</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.wdl</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>double quoted string</string>
+ <key>end</key>
+ <string>(")</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.wdl</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.unclosed-string.wdl</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.double.single-line.wdl</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#constant_placeholder</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#escaped_char</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <key>string_quoted_single</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(')</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.wdl</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>single quoted string</string>
+ <key>end</key>
+ <string>(')</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.wdl</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.unclosed-string.wdl</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.single.single-line.wdl</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#constant_placeholder</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#escaped_char</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>scopeName</key>
+ <string>source.wdl</string>
+ <key>uuid</key>
+ <string>29cdcefa-8185-46f9-988a-2310d2244661</string>
+</dict>
+</plist>

0 comments on commit 8a8c736

Please sign in to comment.