Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[add] Mocha.tmLanguage

  • Loading branch information...
commit 2900dde28e857a6c60e7533bafff5160d43b7053 1 parent a0bc2ac
Lennart Melzer authored
Showing with 166 additions and 0 deletions.
  1. +50 −0 Mocha.JSON-tmLanguage
  2. +116 −0 Mocha.tmLanguage
50 Mocha.JSON-tmLanguage
View
@@ -0,0 +1,50 @@
+{ "name": "Mocha",
+ "scopeName": "source.nodejs_mocha",
+ "fileTypes": [".js"],
+ "patterns": [
+ {
+ "include": "source.js"
+ },
+ {
+ "name": "entity.section",
+ "begin": "(describe)\\(\"([^\"]+)\",\\s*function\\(\\)\\s*{",
+ "beginCaptures": {
+ "1": { "name": "storage.function" }
+ },
+ "patterns": [
+ { "include": "$self" },
+ {
+ "name": "entity.section",
+ "begin": "(it)\\(\"([^\"]+)\",\\s*function\\((done)?\\)\\s*{",
+ "beginCaptures": {
+ "1": { "name": "support.function" },
+ "3": { "name": "keyword.control"}
+ },
+ "patterns": [
+ { "include": "source.js" },
+ {
+ "name": "entity.tag",
+ "match": "(done)\\([^\\)]*\\)",
+ "captures": { "1": { "name": "keyword.control" } }
+ }
+ ],
+ "end": "}\\);"
+ },
+ {
+ "name": "entity.tag",
+ "begin": "(beforeEach)\\(function\\((done)?\\)\\s*{",
+ "beginCaptures": {
+ "1": { "name": "support.function" },
+ "2": { "name": "keyword.control" }
+ },
+ "patterns": [
+ { "include": "source.js" }
+ ],
+ "end": "}\\);"
+ }
+ ],
+ "end": "}\\);"
+ }
+ ],
+ "uuid": "82997f2b-0c9a-45f8-b46e-b3f3ed147fe7"
+}
116 Mocha.tmLanguage
View
@@ -0,0 +1,116 @@
+<?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>fileTypes</key>
+ <array>
+ <string>.js</string>
+ </array>
+ <key>name</key>
+ <string>Mocha</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.js</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(describe)\("([^"]+)",\s*function\(\)\s*{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>storage.function</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>}\);</string>
+ <key>name</key>
+ <string>entity.section</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(it)\("([^"]+)",\s*function\((done)?\)\s*{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>support.function</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>}\);</string>
+ <key>name</key>
+ <string>entity.section</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.js</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(done)\([^\)]*\)</string>
+ <key>name</key>
+ <string>entity.tag</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(beforeEach)\(function\((done)?\)\s*{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>support.function</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>}\);</string>
+ <key>name</key>
+ <string>entity.tag</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.js</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ <key>scopeName</key>
+ <string>source.nodejs_mocha</string>
+ <key>uuid</key>
+ <string>82997f2b-0c9a-45f8-b46e-b3f3ed147fe7</string>
+</dict>
+</plist>
Please sign in to comment.
Something went wrong with that request. Please try again.