v8/tools/torque/vscode-torque/syntaxes/torque.tmLanguage.json
Simon Zünd 7975b8cef9 [vscode-torque] Add vscode extension with basic Torque support.
This CL creates the "tools/torque" directory. It moves the existing
two scripts (making the parser and formatting Torque code) into that
director.

The extension lives in "tools/torque/vscode-torque" and currently only
provides basic syntax highlighting support. The easiest way to
install the extension is to simply create a symlink into your local
vscode extension directory (see README.md).

R=jgruber@chromium.org, tebbi@chromium.org

Change-Id: Ifc22b615341ed18f91c9b046090f569fcc083ab6
Reviewed-on: https://chromium-review.googlesource.com/1076548
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53421}
2018-05-29 16:03:38 +00:00

88 lines
1.9 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Torque",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
},
{
"name": "comment.line.double-slash.torque",
"begin": "//",
"end": "$"
},
{
"name": "comment.block.torque",
"begin": "/\\*",
"end": "\\*/"
},
{
"name": "string.quoted.single.torque",
"begin": "'",
"end": "'",
"patterns": [
{
"name": "constant.character.escape.torque",
"match": "\\\\."
}]
},
{
"name": "support.function.torque",
"match": "\\b(min|max|assert|check|debug|unreachable)\\b"
},
{
"name": "support.variable.torque",
"match": "\\b(true|True|false|False|Undefined|Hole|Null)\\b"
},
{
"begin": "<(?=[A-Za-z][0-9A-Za-z_]*>)",
"end": ">",
"patterns": [
{
"name": "support.type.torque",
"match": "([A-Za-z][0-9A-Za-z_]*)"
}
]
},
{
"begin": ":(\\s*)?",
"end": "(?=[^0-9A-Za-z_])",
"patterns": [
{
"name": "support.type.torque",
"match": "([A-Za-z][0-9A-Za-z_]*)"
}
]
}
],
"repository": {
"keywords": {
"patterns": [{
"name": "keyword.control.torque",
"match": "\\b(if|else|while|for|return|continue|break|goto|otherwise|try|catch)\\b"
},
{
"name": "keyword.other.torque",
"match": "\\b(constexpr|module|macro|builtin|runtime|javascript|implicit|deferred|cast|convert|label|labels|tail|isnt|is|let|generates|type|extends|extern|const)\\b"
},
{
"name": "keyword.operator.torque",
"match": "\\b(=|\\*=)\\b"
}]
},
"strings": {
"name": "string.quoted.double.torque",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.torque",
"match": "\\\\."
}
]
}
},
"scopeName": "source.torque"
}