From 29d3c61624f4235bee7c8662ab1bb61144fded31 Mon Sep 17 00:00:00 2001 From: Joel Jones Date: Fri, 4 Jan 2013 18:55:24 +0000 Subject: [PATCH] Add Textmate bundle for Tablegen syntax-highlighting git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171496 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/textmate/README | 7 + .../Syntaxes/TableGen.tmLanguage | 132 ++++++++++++++++++ utils/textmate/TableGen.tmbundle/info.plist | 12 ++ 3 files changed, 151 insertions(+) create mode 100644 utils/textmate/README create mode 100644 utils/textmate/TableGen.tmbundle/Syntaxes/TableGen.tmLanguage create mode 100644 utils/textmate/TableGen.tmbundle/info.plist diff --git a/utils/textmate/README b/utils/textmate/README new file mode 100644 index 00000000000..195a0e6fae8 --- /dev/null +++ b/utils/textmate/README @@ -0,0 +1,7 @@ +This directory contains a "bundle" for doing syntax highlighting of TableGen +files for the TextMate editor for OS X. The highlighting follows that done +by the TextMate "C" bundle. Currently, keywords, comments, and strings are +highlighted. + +To install this bundle, copy it to + ~/Library/Application\ Support/TextMate/Bundles diff --git a/utils/textmate/TableGen.tmbundle/Syntaxes/TableGen.tmLanguage b/utils/textmate/TableGen.tmbundle/Syntaxes/TableGen.tmLanguage new file mode 100644 index 00000000000..cf5c41e5a1b --- /dev/null +++ b/utils/textmate/TableGen.tmbundle/Syntaxes/TableGen.tmLanguage @@ -0,0 +1,132 @@ + + + + + fileTypes + + foldingStartMarker + /\*\*|\{\s*$ + foldingStopMarker + \*\*/|^\s*\} + name + TableGen + patterns + + + include + #comments + + + match + \b(def|let|in|code|dag|string|list|bits|bit|field|include|defm|foreach|class|multiclass)\b + name + keyword.control.tablegen + + + begin + " + end + " + name + string.quoted.double.untitled + patterns + + + match + \\. + name + constant.character.escape.tablegen + + + + + repository + + comments + + patterns + + + captures + + 1 + + name + meta.toc-list.banner.block.tablegen + + + match + ^/\* =(\s*.*?)\s*= \*/$\n? + name + comment.block.tablegen + + + begin + /\* + captures + + 0 + + name + punctuation.definition.comment.tablegen + + + end + \*/ + name + comment.block.tablegen + + + match + \*/.*\n + name + invalid.illegal.stray-comment-end.tablegen + + + captures + + 1 + + name + meta.toc-list.banner.line.tablegen + + + match + ^// =(\s*.*?)\s*=\s*$\n? + name + comment.line.banner.tablegen + + + begin + // + beginCaptures + + 0 + + name + punctuation.definition.comment.tablegen + + + end + $\n? + name + comment.line.double-slash.tablegen + patterns + + + match + (?>\\\s*\n) + name + punctuation.separator.continuation.tablegen + + + + + + + scopeName + source.tablegen + uuid + 3A090BFC-E74B-4993-8DAE-7CCF6D238A32 + + diff --git a/utils/textmate/TableGen.tmbundle/info.plist b/utils/textmate/TableGen.tmbundle/info.plist new file mode 100644 index 00000000000..54d5eff61cb --- /dev/null +++ b/utils/textmate/TableGen.tmbundle/info.plist @@ -0,0 +1,12 @@ + + + + + name + TableGen Bundle + ordering + + uuid + 96925448-7219-41E9-A7F0-8D5B70E9B877 + + -- 2.34.1