Skip to content

Commit

Permalink
Update rust.tmLanguage.json file
Browse files Browse the repository at this point in the history
Updated Rust grammar definition from VS Code project.

CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21345

This time an unmodified version of the file plus an update of the
NOTICE.md file explaining the chain of origins.

Signed-off-by: Max Bureck <max.bureck@fokus.fraunhofer.de>
  • Loading branch information
Boereck committed Jan 8, 2020
1 parent f89f50a commit 140f13b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
5 changes: 4 additions & 1 deletion NOTICE.md
Expand Up @@ -43,7 +43,10 @@ Rustup (Workswith)
[rustup-init.sh](https://raw.githubusercontent.com/rust-lang/rustup.rs/1.20.2/rustup-init.sh)
* License: Apache-2.0 OR MIT

[Rust.tmLanguage](https://github.com/Microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/rust/syntaxes/rust.tmLanguage.json)
[Rust.tmLanguage](https://github.com/microsoft/vscode/blob/1.41.1/extensions/rust/syntaxes/rust.tmLanguage.json)
* Note: This file is taken from the VS Code project, which itself gets the file from the atom-language-rust project
please contribute to [this](https://github.com/zargony/atom-language-rust/blob/master/grammars/rust.cson) file, if
you want to contribute changes. The change will eventually end up in this project when picked up by VS Code.
* License: MIT

[TOML.tmLanguage](https://github.com/LucasBullen/corrosion/commit/c2b13af2e08622c177df4b12e48c47a61de01e69)
Expand Down
46 changes: 42 additions & 4 deletions org.eclipse.corrosion/grammar/rust.tmLanguage.json
@@ -1,9 +1,10 @@
{
"information_for_contributors": [
"File is taken from VSCode https://github.com/Microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/rust/syntaxes/rust.tmLanguage.json as a translation of https://github.com/zargony/atom-language-rust/blob/master/grammars/rust.cson .",
"Please contribute to those 2 files and then request Corrosion project to fetch latest version"
"This file has been converted from https://github.com/zargony/atom-language-rust/blob/master/grammars/rust.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/zargony/atom-language-rust/commit/179f449a69182cae4fcdf644d59d842b7e445f89",
"version": "https://github.com/zargony/atom-language-rust/commit/7d59e2ad79fbe5925bd2fd3bd3857bf9f421ff6f",
"name": "Rust",
"scopeName": "source.rust",
"patterns": [
Expand All @@ -29,6 +30,9 @@
{
"include": "#mut"
},
{
"include": "#dyn"
},
{
"include": "#ref_lifetime"
},
Expand Down Expand Up @@ -156,7 +160,7 @@
{
"comment": "Control keyword",
"name": "keyword.control.rust",
"match": "\\b(break|continue|else|if|in|for|loop|match|return|while)\\b"
"match": "\\b(async|await|break|continue|else|if|in|for|loop|match|return|try|while)\\b"
},
{
"comment": "Keyword",
Expand All @@ -180,6 +184,12 @@
{
"include": "#mut"
},
{
"include": "#dyn"
},
{
"include": "#impl"
},
{
"include": "#box"
},
Expand Down Expand Up @@ -322,6 +332,12 @@
{
"include": "#mut"
},
{
"include": "#dyn"
},
{
"include": "#impl"
},
{
"include": "#ref_lifetime"
},
Expand Down Expand Up @@ -423,6 +439,12 @@
{
"include": "#mut"
},
{
"include": "#dyn"
},
{
"include": "#impl"
},
{
"include": "#lifetime"
},
Expand Down Expand Up @@ -527,6 +549,16 @@
"name": "storage.modifier.mut.rust",
"match": "\\bmut\\b"
},
"dyn": {
"comment": "Dynamic modifier",
"name": "storage.modifier.dyn.rust",
"match": "\\bdyn\\b"
},
"impl": {
"comment": "Existential type modifier",
"name": "storage.modifier.impl.rust",
"match": "\\bimpl\\b"
},
"box": {
"comment": "Box storage modifier",
"name": "storage.modifier.box.rust",
Expand Down Expand Up @@ -627,6 +659,12 @@
{
"include": "#mut"
},
{
"include": "#dyn"
},
{
"include": "#impl"
},
{
"include": "#lifetime"
},
Expand Down

0 comments on commit 140f13b

Please sign in to comment.