llvm.org GIT mirror llvm / 92fa368
Adding VSCode syntax colorizer to utils (generated from textmate colorizer). --This line, and those below, will be igored-- A utils/vscode A utils/vscode/README A utils/vscode/tablegen A utils/vscode/tablegen/.vscode A utils/vscode/tablegen/.vscode/launch.json A utils/vscode/tablegen/CHANGELOG.md A utils/vscode/tablegen/README.md A utils/vscode/tablegen/language-configuration.json A utils/vscode/tablegen/package.json A utils/vscode/tablegen/syntaxes A utils/vscode/tablegen/syntaxes/TableGen.tmLanguage A utils/vscode/tablegen/vsc-extension-quickstart.md git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302553 91177308-0d34-0410-b5e6-96231b3b80d8 Puyan Lotfi 2 years ago
8 changed file(s) with 263 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 This directory contains a "bundle" for doing syntax highlighting of TableGen
1 files for the Microsoft VSCode editor. The highlighting follows that done by
2 the TextMate "C" bundle as it is a translation of the textmate bundle to VSCode
3 using the "yo code" npm package. Currently, keywords, comments, and strings are
4 highlighted.
5
6 This colorizer was generate by the vscode-generator tool "Yo Code"
7 (https://github.com/Microsoft/vscode-generator-code) from the existing TableGen
8 text TableGen.tmLanguage syntax colorizer in utils/textmate. This README was
9 copied from utils/textmate/README.
10
11 To install this VSCode .td file colorizer, copy it to the following locations
12 per your Operating System:
13
14 - Windows: %USERPROFILE%\.vscode\extensions
15 - Mac: ~/.vscode/extensions
16 - Linux: ~/.vscode/extensions
17
0 // A launch configuration that launches the extension inside a new window
1 {
2 "version": "0.1.0",
3 "configurations": [
4 {
5 "name": "Launch Extension",
6 "type": "extensionHost",
7 "request": "launch",
8 "runtimeExecutable": "${execPath}",
9 "args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
10 }
11 ]
12 }
0 # Change Log
1
2 - Initial release
3
0 # tablegen README
1
2 This VSCode colorizer extension is a translation of the textmate bunble to
3 VSCode using the "yo code" npm package. Currently, keywords, comments, and
4 strings are highlighted.
5
6 To install this VSCode .td file colorizer, copy it to the following locations
7 per your Operating System:
8
9 - Windows: %USERPROFILE%\.vscode\extensions
10 - Mac: ~/.vscode/extensions
11 - Linux: ~/.vscode/extensions
12
0 {
1 "comments": {
2 // symbol used for single line comment. Remove this entry if your language does not support line comments
3 "lineComment": "//",
4 // symbols used for start and end a block comment. Remove this entry if your language does not support block comments
5 "blockComment": [ "/*", "*/" ]
6 },
7 // symbols used as brackets
8 "brackets": [
9 ["{", "}"],
10 ["[", "]"],
11 ["(", ")"]
12 ],
13 // symbols that are auto closed when typing
14 "autoClosingPairs": [
15 ["{", "}"],
16 ["[", "]"],
17 ["(", ")"],
18 ["\"", "\""],
19 ["'", "'"]
20 ],
21 // symbols that that can be used to surround a selection
22 "surroundingPairs": [
23 ["{", "}"],
24 ["[", "]"],
25 ["(", ")"],
26 ["\"", "\""],
27 ["'", "'"]
28 ]
29 }
0 {
1 "name": "tablegen",
2 "displayName": "TableGen",
3 "description": "VSCode Language Colorizer for LLVM's TableGen language.",
4 "version": "0.0.1",
5 "publisher": "llvm",
6 "engines": {
7 "vscode": "^1.12.0"
8 },
9 "categories": [
10 "Languages"
11 ],
12 "contributes": {
13 "languages": [{
14 "id": "tablegen",
15 "aliases": ["TableGen", "tablegen"],
16 "extensions": [".td"],
17 "configuration": "./language-configuration.json"
18 }],
19 "grammars": [{
20 "language": "tablegen",
21 "scopeName": "source.tablegen",
22 "path": "./syntaxes/TableGen.tmLanguage"
23 }]
24 }
25 }
0
1
2
3
4 fileTypes
5 td
6 foldingStartMarker
7 /\*\*|\{\s*$
8 foldingStopMarker
9 \*\*/|^\s*\}
10 name
11 TableGen
12 patterns
13
14
15 include
16 #comments
17
18
19 match
20 \b(def|let|in|code|dag|string|list|bits|bit|field|include|defm|foreach|class|multiclass|int)\b
21 name
22 keyword.control.tablegen
23
24
25 begin
26 "
27 end
28 "
29 name
30 string.quoted.double.untitled
31 patterns
32
33
34 match
35 \\.
36 name
37 constant.character.escape.tablegen
38
39
40
41
42 repository
43
44 comments
45
46 patterns
47
48
49 captures
50
51 1
52
53 name
54 meta.toc-list.banner.block.tablegen
55
56
57 match
58 ^/\* =(\s*.*?)\s*= \*/$\n?
59 name
60 comment.block.tablegen
61
62
63 begin
64 /\*
65 captures
66
67 0
68
69 name
70 punctuation.definition.comment.tablegen
71
72
73 end
74 \*/
75 name
76 comment.block.tablegen
77
78
79 match
80 \*/.*\n
81 name
82 invalid.illegal.stray-comment-end.tablegen
83
84
85 captures
86
87 1
88
89 name
90 meta.toc-list.banner.line.tablegen
91
92
93 match
94 ^// =(\s*.*?)\s*=\s*$\n?
95 name
96 comment.line.banner.tablegen
97
98
99 begin
100 //
101 beginCaptures
102
103 0
104
105 name
106 punctuation.definition.comment.tablegen
107
108
109 end
110 $\n?
111 name
112 comment.line.double-slash.tablegen
113 patterns
114
115
116 match
117 (?>\\\s*\n)
118 name
119 punctuation.separator.continuation.tablegen
120
121
122
123
124
125
126 scopeName
127 source.tablegen
128 uuid
129 3A090BFC-E74B-4993-8DAE-7CCF6D238A32
130
131
0 # Welcome to your VS Code Extension
1
2 ## What's in the folder
3 * This folder contains all of the files necessary for your extension
4 * `package.json` - this is the manifest file in which you declare your language support and define
5 the location of the grammar file that has been copied into you extension.
6 * `syntaxes/TableGen.tmLanguage` - this is the Text mate grammar file that is used for tokenization
7 * `language-configuration.json` - this the language configuration, defining the tokens that are used for
8 comments and brackets.
9
10 ## Get up and running straight away
11 * Make sure the language configuration settings in `language-configuration.json` are accurate
12 * press `F5` to open a new window with your extension loaded
13 * create a new file with a file name suffix matching your language
14 * verify that syntax highlight works and that the language configuration settings are working
15
16 ## Make changes
17 * you can relaunch the extension from the debug toolbar after making changes to the files listed above
18 * you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
19
20 ## Add more language features
21 * To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at
22 https://code.visualstudio.com/docs
23
24 ## Install your extension
25 * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code.
26 * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.