Commit 7975b8ce authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

[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: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53421}
parent 0dbac434
# Torque syntax support
This extensions adds rudimentary syntax highlighting support for the WIP
Torque language used in V8.
## Installation
Since the extension is not published to the marketplace, the easiest way to
install the extension is to symlink the extension to your local extension
directory:
```
ln -s $V8/tools/torque/vscode-torque $HOME/.vscode/extensions/vscode-torque
```
\ No newline at end of file
{
"comments": {
"lineComment": "//",
"blockComment": [ "/*", "*/" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
\ No newline at end of file
{
"name": "vscode-torque",
"displayName": "Torque syntax support",
"description": "Basic Torque syntax highlighting support",
"version": "0.0.1",
"publisher": "szuend",
"engines": {
"vscode": "^1.22.0"
},
"categories": [
"Languages"
],
"contributes": {
"languages": [{
"id": "torque",
"aliases": ["Torque", "torque"],
"extensions": [".tq"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "torque",
"scopeName": "source.torque",
"path": "./syntaxes/torque.tmLanguage.json"
}]
}
}
\ No newline at end of file
{
"$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"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment